diff options
author | Richard Mudgett <rmudgett@digium.com> | 2013-03-25 23:25:32 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2013-03-25 23:25:32 +0000 |
commit | 23f363fcb1898d651371c75f1a996dc38c3498f5 (patch) | |
tree | 8136a56967ed6d14dd125972d4217e198bdb1492 /channels/sig_pri.c | |
parent | f073c27b6066ff55e180853ddb0438511ecf39a2 (diff) |
Set the CALLERID(dnid-num-plan) for incoming ISDN calls.
The CALLEDTON channel variable is set for incoming ISDN calls to the lower
7 bits of the Q.931 type-of-number/numbering-plan octet. The
CALLERID(dnid-num-plan) should have the same value.
(closes issue ASTERISK-21248)
Reported by: rmudgett
........
Merged revisions 383796 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 383798 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sig_pri.c')
-rw-r--r-- | channels/sig_pri.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/channels/sig_pri.c b/channels/sig_pri.c index e3b9b3fb6..f91a0a43f 100644 --- a/channels/sig_pri.c +++ b/channels/sig_pri.c @@ -6410,6 +6410,10 @@ static void *pri_dchannel(void *vpri) snprintf(calledtonstr, sizeof(calledtonstr), "%d", e->ring.calledplan); pbx_builtin_setvar_helper(c, "CALLEDTON", calledtonstr); + ast_channel_lock(c); + ast_channel_dialed(c)->number.plan = e->ring.calledplan; + ast_channel_unlock(c); + if (e->ring.redirectingreason >= 0) { /* This is now just a status variable. Use REDIRECTING() dialplan function. */ pbx_builtin_setvar_helper(c, "PRIREDIRECTREASON", redirectingreason2str(e->ring.redirectingreason)); @@ -6548,6 +6552,9 @@ static void *pri_dchannel(void *vpri) snprintf(calledtonstr, sizeof(calledtonstr), "%d", e->ring.calledplan); pbx_builtin_setvar_helper(c, "CALLEDTON", calledtonstr); + ast_channel_lock(c); + ast_channel_dialed(c)->number.plan = e->ring.calledplan; + ast_channel_unlock(c); sig_pri_handle_subcmds(pri, chanpos, e->e, e->ring.subcmds, e->ring.call); |