Read own numbers from EFmsisdn instead of AT+CNUM.
PATCH 1/1 Read own numbers from EFmsisdn instead of AT+CNUM.
This was found to be more portable. On the other hand this doesn't give the service type or speed information per number.
Depends on "[PATCH] Change sim_ops plugin interface to allow acces to linear fixed files."
--- drivers/atmodem/sim.c | 1 + src/driver.h | 22 +++++++++++ src/sim.c | 99 +++++++++++++++++++++++++++++++++++++++++------- 3 files changed, 107 insertions(+), 15 deletions(-)
drivers/atmodem/sim.c +1 -0
@@ -430,6 +430,7 @@ static void at_cnum_cb(gboolean ok, GAtResult *result, gpointer user_data) numbers[count].speed =-1 ; numbers[count].service =-1 ; numbers[count].itc =-1 ; + numbers[count].npi =-1 ;g_at_result_iter_skip_next (&iter);g_at_result_iter_next_number (&iter, &numbers[count].service);
src/driver.h +22 -0
@@ -96,6 +96,28 @@ struct ofono_own_number {int speed;int service;int itc; +int npi; +}; + +/* 24.008 Section 10.5.4.7 */ +enum ofono_number_type { +OFONO_NUMBER_TYPE_UNKNOWN =0 , +OFONO_NUMBER_TYPE_INTERNATIONAL =1 , +OFONO_NUMBER_TYPE_NATIONAL =2 , +OFONO_NUMBER_TYPE_NETWORK_SPECIFIC =3 , +OFONO_NUMBER_TYPE_DEDICATED_ACCESS =4 , +OFONO_NUMBER_TYPE_RESERVED =7 +}; + +enum ofono_numbering_plan { +OFONO_NUMBERING_PLAN_UNKNOWN =0 , +OFONO_NUMBERING_PLAN_ISDN =1 , +OFONO_NUMBERING_PLAN_DATA =3 , +OFONO_NUMBERING_PLAN_TELEX =4 , +OFONO_NUMBERING_PLAN_NATIONAL =8 , +OFONO_NUMBERING_PLAN_PRIVATE =9 , +OFONO_NUMBERING_PLAN_RESERVED_CTS =11 , +OFONO_NUMBERING_PLAN_RESERVED =15 };/* 51.011 Section 9.3 */
src/sim.c +84 -15
141 lines not on this page · raw message
Signature · 1 line
1.6.0
Hi,
Quoted 3 lines · On Wednesday 17 June 2009 22:44:56 Andrzej Zaborowski wrote:
This was found to be more portable. On the other hand this doesn't give the service type or speed information per number.
Patch has been applied. The service type and speed information is mostly fudged by the modems anyway. This can still be obtained by parsing the EFccp2 record if one is provided in the EFmsisdn.
Regards,
-Denis