From: Matthew Fredrickson Date: Mon, 18 Feb 2008 21:57:50 +0000 (+0000) Subject: Commit chan_zap portion of #11964: add the ability to get ORIG_CALLED_NUM X-Git-Tag: 1.6.0-beta4~32 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=05ead467bd4c4d65ff2d658a31e6639f1f93c7e4;p=thirdparty%2Fasterisk.git Commit chan_zap portion of #11964: add the ability to get ORIG_CALLED_NUM git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103794 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_zap.c b/channels/chan_zap.c index e3d97ce045..a51e019203 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -684,6 +684,7 @@ static struct zt_pvt { char charge_number[50]; char gen_add_number[50]; char gen_dig_number[50]; + char orig_called_num[50]; unsigned char gen_add_num_plan; unsigned char gen_add_nai; unsigned char gen_add_pres_ind; @@ -9105,6 +9106,11 @@ static void ss7_start_call(struct zt_pvt *p, struct zt_ss7 *linkset) /* Clear this after we set it */ p->gen_dig_number[0] = 0; } + if (!ast_strlen_zero(p->orig_called_num)) { + pbx_builtin_setvar_helper(c, "SS7_ORIG_CALLED_NUM", p->orig_called_num); + /* Clear this after we set it */ + p->orig_called_num[0] = 0; + } snprintf(tmp, sizeof(tmp), "%d", p->gen_dig_type); pbx_builtin_setvar_helper(c, "SS7_GENERIC_DIGTYPE", tmp); @@ -9414,6 +9420,7 @@ static void *ss7_linkset(void *data) p->gen_dig_type = e->iam.gen_dig_type; p->gen_dig_scheme = e->iam.gen_dig_scheme; ast_copy_string(p->jip_number, e->iam.jip_number, sizeof(p->jip_number)); + ast_copy_string(p->orig_called_num, e->iam.orig_called_num, sizeof(p->orig_called_num)); /* Set DNID */ if (!ast_strlen_zero(e->iam.called_party_num))