提交 2a8e9751 authored 作者: Anthony Minessale's avatar Anthony Minessale

add type of num var for pri

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@622 a93c3328-9c30-0410-af19-c9cd2b2d52af
上级 ac845fb5
......@@ -900,6 +900,8 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
switch_event_header_t *h;
char *argv[3];
int argc = 0;
const char *var;
if (!outbound_profile) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing caller profile\n");
......@@ -966,6 +968,16 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
if (!switch_strlen_zero(dest)) {
zap_set_string(caller_data.ani.digits, dest);
}
if ((var = switch_event_get_header(var_event, "openzap_outbound_ton"))) {
if (!strcasecmp(var, "national")) {
caller_data.ani.type = Q931_TON_NATIONAL;
}
} else {
caller_data.ani.type = outbound_profile->destination_number_ton;
}
caller_data.ani.plan = outbound_profile->destination_number_numplan;
#if 0
if (!switch_strlen_zero(outbound_profile->rdnis)) {
......
......@@ -1009,7 +1009,7 @@ static __inline__ void state_advance(zap_channel_t *zchan)
* CallingNum IE
*/
Q931InitIECallingNum(&CallingNum);
CallingNum.TypNum = Q931_TON_UNKNOWN;
CallingNum.TypNum = zchan->caller_data.ani.type;
CallingNum.NumPlanID = Q931_NUMPLAN_E164;
CallingNum.PresInd = Q931_PRES_ALLOWED;
CallingNum.ScreenInd = Q931_SCREEN_USER_NOT_SCREENED;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论