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
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to