开启FDN时,紧急拨号被禁止
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
FDN中没有预置紧急号码,开启FDN,拨号界面拨打紧急号码(911等),拨号不成功。
[SOLUTION]
查看build\projectname\bin\log\info.log,有没有__OP01_3G__这个option,如果没有的话,在Modem\l4\phb\src\phb_handler_approve.c的phb_approve_handler()作如下修改,注释掉红色标示的code。
注意:如果拨打的号码在下面的code里没有包含,还需要自行添加,如蓝色标示的code.
//#if def __OP01_3G__ /* special requested by CMCC TD test case: 12.2 */
if ((phb_ptr->dn_type == TYPE_FDN) || (phb_ptr->dn_type == TYPE_FDN_BDN))
{
if ((tel_number->addr_length == 3 && tel_number->addr_bcd[1] == 0x00 &&
tel_number->addr_bcd[2] == 0xF0) ||
(tel_number->addr_length == 2 && tel_number->addr_bcd[1] == 0x80) ||
(tel_number->addr_length == 3 && tel_number->addr_bcd[1] == 0x11 &&
tel_number->addr_bcd[2] == 0xF0) ||
(tel_number->addr_length == 3 && tel_number->addr_bcd[1] == 0x21 &&
tel_number->addr_bcd[2] == 0xF0) ||
(tel_number->addr_length == 3 && tel_number->addr_bcd[1] == 0x11 &&
tel_number->addr_bcd[2] == 0xF8) ||
(tel_number->addr_length == 3 && tel_number->addr_bcd[1] == 0x11 &&
tel_number->addr_bcd[2] == 0xF9) ||
(tel_number->addr_length == 3 && tel_number->addr_bcd[1] == 0x19 &&
tel_number->addr_bcd[2] == 0xF1) ||
(tel_number->addr_length == 3 && tel_number->addr_bcd[1] == 0x99 &&
tel_number->addr_bcd[2] == 0xF9))
{
/* CMCC does not support BDN now */
control_block->actual_count = control_block->total = 1;
control_block->type = PHB_FDN;
phb_approve_confirm(
PHB_ERRNO_SUCCESS,
control_block->type,
control_block->src_id,
control_block,
NULL,
esc);
return;
}
}
//#endif
例如:
添加ECC Number 为: 158,1915
在if 中或上下面两项即可:
(tel_number->addr_length== 3 && tel_number->addr_bcd[1] == 0x51
&&tel_number->addr_bcd[2] == 0xF8) ||
(tel_number->addr_length== 3 && tel_number->addr_bcd[1] == 0x91
&&tel_number->addr_bcd[2] == 0x51 && tel_number->addr_bcd[3] ==0xFF) ||
其中addr_bcd[] 是 bcd 编码,低字节和高字节分别表示一个数字;号码要以F为结束符。
addr_length 是 addr_bcd[] 实际保存号码长度, addr_bcd[0] 是保存类型,默认是0x81, 这里不用判断。
FDN中没有预置紧急号码,开启FDN,拨号界面拨打紧急号码(911等),拨号不成功。
[SOLUTION]
查看build\projectname\bin\log\info.log,有没有__OP01_3G__这个option,如果没有的话,在Modem\l4\phb\src\phb_handler_approve.c的phb_approve_handler()作如下修改,注释掉红色标示的code。
注意:如果拨打的号码在下面的code里没有包含,还需要自行添加,如蓝色标示的code.
//#if def __OP01_3G__ /* special requested by CMCC TD test case: 12.2 */
if ((phb_ptr->dn_type == TYPE_FDN) || (phb_ptr->dn_type == TYPE_FDN_BDN))
{
if ((tel_number->addr_length == 3 && tel_number->addr_bcd[1] == 0x00 &&
tel_number->addr_bcd[2] == 0xF0) ||
(tel_number->addr_length == 2 && tel_number->addr_bcd[1] == 0x80) ||
(tel_number->addr_length == 3 && tel_number->addr_bcd[1] == 0x11 &&
tel_number->addr_bcd[2] == 0xF0) ||
(tel_number->addr_length == 3 && tel_number->addr_bcd[1] == 0x21 &&
tel_number->addr_bcd[2] == 0xF0) ||
(tel_number->addr_length == 3 && tel_number->addr_bcd[1] == 0x11 &&
tel_number->addr_bcd[2] == 0xF8) ||
(tel_number->addr_length == 3 && tel_number->addr_bcd[1] == 0x11 &&
tel_number->addr_bcd[2] == 0xF9) ||
(tel_number->addr_length == 3 && tel_number->addr_bcd[1] == 0x19 &&
tel_number->addr_bcd[2] == 0xF1) ||
(tel_number->addr_length == 3 && tel_number->addr_bcd[1] == 0x99 &&
tel_number->addr_bcd[2] == 0xF9))
{
/* CMCC does not support BDN now */
control_block->actual_count = control_block->total = 1;
control_block->type = PHB_FDN;
phb_approve_confirm(
PHB_ERRNO_SUCCESS,
control_block->type,
control_block->src_id,
control_block,
NULL,
esc);
return;
}
}
//#endif
例如:
添加ECC Number 为: 158,1915
在if 中或上下面两项即可:
(tel_number->addr_length== 3 && tel_number->addr_bcd[1] == 0x51
&&tel_number->addr_bcd[2] == 0xF8) ||
(tel_number->addr_length== 3 && tel_number->addr_bcd[1] == 0x91
&&tel_number->addr_bcd[2] == 0x51 && tel_number->addr_bcd[3] ==0xFF) ||
其中addr_bcd[] 是 bcd 编码,低字节和高字节分别表示一个数字;号码要以F为结束符。
addr_length 是 addr_bcd[] 实际保存号码长度, addr_bcd[0] 是保存类型,默认是0x81, 这里不用判断。