aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-18 21:57:50 +0000
committermattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-18 21:57:50 +0000
commit71aeddffbe095d3264fc184e59af113663cfd704 (patch)
tree52f56f54d76ff410d874cca4c6916d25fa90b2b8
parent9c4d1139101f268831bd2d9aa9ec260c22d0ca38 (diff)
Commit chan_zap portion of #11964: add the ability to get ORIG_CALLED_NUM
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103794 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_zap.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index e3d97ce04..a51e01920 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))