From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 1/7] src: Introduced enum called_number_type
Date: Mon, 24 Jan 2011 16:19:09 -0600 [thread overview]
Message-ID: <4D3DFADD.1090905@gmail.com> (raw)
In-Reply-To: <1295777796-19978-2-git-send-email-george@matveev.se>
[-- Attachment #1: Type: text/plain, Size: 1281 bytes --]
Hi George,
> +/* 24.008 Section 10.5.4.7 Called party BCD number */
> +enum called_number_type {
> + CALLED_NUMBER_TYPE_UNKNOWN = 0,
> + CALLED_NUMBER_TYPE_INTERNATIONAL = 1,
> + CALLED_NUMBER_TYPE_NATIONAL = 2,
> + CALLED_NUMBER_TYPE_NETWORK_SPECIFIC = 3,
> + CALLED_NUMBER_TYPE_DEDICATED_ACCESS = 4,
> + CALLED_NUMBER_TYPE_RESERVED = 7
> +};
> +
This isn't going to work. Your patches basically break all voice call
drivers that we have. I refer you to stemodem ecav_notify function or
the calypsomodem cpi parser. The number type is not handled properly there.
27.007 uses three main ton/npi combinations:
unknown / unknown (128)
unknown / isdn (129)
international / isdn (145)
If you want to be pedantic, then define an enum something like this:
enum number_type {
NUMBER_TYPE_UNKNOWN,
NUMBER_TYPE_UNKNOWN_ISDN,
NUMBER_TYPE_INTERNATIONAL_ISDN,
};
And just handle these three appropriately.
Alternatively decompose the value into the appropriate bit-fields and
compare the bit-field values. E.g. bits 1..4 -> npi. Bits 5..7 -> ton
and define enums for them appropriately. This will still be a messier
solution than assigning the values 128/129 (in fact 27.007 recommends
assigning these values anyway).
Regards,
-Denis
next prev parent reply other threads:[~2011-01-24 22:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-23 10:16 [PATCH 0/7] Add enum called_number_type George Matveev
2011-01-23 10:16 ` [PATCH 1/7] src: Introduced " George Matveev
2011-01-24 22:19 ` Denis Kenzior [this message]
2011-01-23 10:16 ` [PATCH 2/7] atmodem: Phone type defined using " George Matveev
2011-01-23 10:16 ` [PATCH 3/7] huaweimodem: " George Matveev
2011-01-23 10:16 ` [PATCH 4/7] hfpmodem: " George Matveev
2011-01-23 10:16 ` [PATCH 5/7] ifxmodem: " George Matveev
2011-01-23 10:16 ` [PATCH 6/7] calypsomodem: " George Matveev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D3DFADD.1090905@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox