Re: [RFC PATCH 0/3] Long phone numbers
Hi Rafael, On 01/18/2011 03:39 AM, Rafael Ignacio Zurita wrote: > On Mon, Jan 17, 2011 at 11:18:51PM +0200, Pekka Pessi wrote: >> Hi Rafael, >> >> 2011/1/17 Rafael Ignacio Zurita : >>> This is a proposal for the "long phone number" task (80 digits max length). >>> It changes OFONO_MAX_PHONE_NUMBER_LENGTH and splits >>> common:valid_phone_number_format(), to make sure long numbers are handled >>> appropriately for functions that need manage shorter numbers, like >>> numbers written to the SIM, or sms SCA. >> >> Perhaps a validator and type for long phone numbers is better than for >> short numbers? I guess long numbers are mostly used when reporting an >> outgoing call back to oFono. > > No completely sure if it is better. Maybe it is the same?. With a new > type for long number we will have modifications on other parts of the code > which use OFONO_MAX_PHONE_NUMBER_LENGTH. The first idea could be simpler > because we just have one type and would check for the format and length on the > proper places. So I actually agree with Pekka on this one, validating the long phone number might actually be a bit easier. Basically the long phone number only happens when we place an outgoing call. For the rest we can keep the limit to 20. However, do note that this function is being (ab)used for: - Checking valid destination for an SMS (20 chars max) - Checking valid phone number to be written to SIM (currently no extension records, so 20 chars max) - Checking valid phone number to be sent to ATD (80 chars max) - Checking valid phone number to be uses for deflection (? chars max) Perhaps we should use an enumeration of the type of number we want, similar to how is_valid_pin is implemented. > >> BTW, with call forwarding you could have numbers up to 16 digits or if >> longForwardedToNumber is supported (by modem and both home and visited >> networks) even 28 digits. See TS 29.002 for merry details. > > Thanks for that. I am checking, and going to add an extra validator > surely. > This might be a good idea, but keep in mind that if we set a long number into CFU, we might not be able to support writing it out to the SIM's EFcfis record. So 20 characters might be all you have anyway. Regards, -Denis ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [RFC PATCH 0/3] Long phone numbers
On Mon, Jan 17, 2011 at 11:18:51PM +0200, Pekka Pessi wrote: > Hi Rafael, > > 2011/1/17 Rafael Ignacio Zurita : > > This is a proposal for the "long phone number" task (80 digits max length). > > It changes OFONO_MAX_PHONE_NUMBER_LENGTH and splits > > common:valid_phone_number_format(), to make sure long numbers are handled > > appropriately for functions that need manage shorter numbers, like > > numbers written to the SIM, or sms SCA. > > Perhaps a validator and type for long phone numbers is better than for > short numbers? I guess long numbers are mostly used when reporting an > outgoing call back to oFono. No completely sure if it is better. Maybe it is the same?. With a new type for long number we will have modifications on other parts of the code which use OFONO_MAX_PHONE_NUMBER_LENGTH. The first idea could be simpler because we just have one type and would check for the format and length on the proper places. > BTW, with call forwarding you could have numbers up to 16 digits or if > longForwardedToNumber is supported (by modem and both home and visited > networks) even 28 digits. See TS 29.002 for merry details. Thanks for that. I am checking, and going to add an extra validator surely. Rafael Zurita ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [RFC PATCH 0/3] Long phone numbers
Hi Rafael, 2011/1/17 Rafael Ignacio Zurita : > This is a proposal for the "long phone number" task (80 digits max length). > It changes OFONO_MAX_PHONE_NUMBER_LENGTH and splits > common:valid_phone_number_format(), to make sure long numbers are handled > appropriately for functions that need manage shorter numbers, like > numbers written to the SIM, or sms SCA. Perhaps a validator and type for long phone numbers is better than for short numbers? I guess long numbers are mostly used when reporting an outgoing call back to oFono. BTW, with call forwarding you could have numbers up to 16 digits or if longForwardedToNumber is supported (by modem and both home and visited networks) even 28 digits. See TS 29.002 for merry details. -- Pekka.Pessi mail at nokia.com ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[RFC PATCH 0/3] Long phone numbers
This is a proposal for the "long phone number" task (80 digits max length). It changes OFONO_MAX_PHONE_NUMBER_LENGTH and splits common:valid_phone_number_format(), to make sure long numbers are handled appropriately for functions that need manage shorter numbers, like numbers written to the SIM, or sms SCA. Rafael Ignacio Zurita (3): types: change OFONO_MAX_PHONE_NUMBER_LENGTH value to 80 common: split valid_phone_number_format and adapt atoms smart-messaging: Adapt to use new number format validation function include/types.h |2 +- plugins/smart-messaging.c |4 ++-- src/call-forwarding.c |4 src/common.c | 20 ++-- src/common.h |2 ++ src/message-waiting.c | 14 ++ src/sim.c |2 +- src/sms.c |5 +++-- 8 files changed, 45 insertions(+), 8 deletions(-) -- 1.7.2.3 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono