我正在使用 linphone 制作一个项目,帐户中有“替换 + 为 00”选项。
示例:- 如果号码
在使用此选项“替换 + 00”后保存在我们的手机 +91-12345678 中,它会将这个号码更改为 0091-12345678。
我需要的是我想将“replace + 00”更改为“replace + 900”意味着
数字应该是 90091-12345678 我无法找到该字符串在哪里我可以将 00 更改为 900。如果有人在使用linphone 或任何其他用户请帮助我。
谢谢
问问题
931 次
1 回答
2
恐怕配置只支持用“+”更改 ICP(国际电话前缀)。
结构 _LinphoneDialplan 在 core_utils.h 中定义
typedef struct _LinphoneDialPlan {
const char *country;
const char* iso_country_code; /* ISO 3166-1 alpha-2 code, ex: FR for France*/
char ccc[8]; /*country calling code*/
int nnl; /*maximum national number length*/
const char * icp; /*international call prefix, ex: 00 in europe*/
} LinphoneDialPlan;
在 dial_plan.c 中,ICP 是每个国家/地区的常量
static LinphoneDialPlan const dial_plans[]={
//Country , iso country code, e164 country calling code, number length, international usual prefix
...
{"India" ,"IN" , "91" , 10 , "00" },
...
};
并且从配置中获取的值 dial_escape_plus 仅在 proxy.c 中以这种方式使用:
result = ms_strdup_printf("%s%s%s"
, tmpproxy->dial_escape_plus ? dialplan.icp : "+"
, dialplan.ccc
, nationnal_significant_number_start);
这一切都在 linphone 3.11 版本中,在之前的版本中,“+”和“00”之间的转换更加“显式”。
因此,如果不修补库,我认为您无法以您想要的方式更改数字。始终可以根据您的需要操作字符串
于 2017-10-29T19:03:55.293 回答