[asterisk-commits] rmudgett: branch 1.8 r383796 - /branches/1.8/channels/sig_pri.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 25 18:19:11 CDT 2013


Author: rmudgett
Date: Mon Mar 25 18:19:06 2013
New Revision: 383796

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=383796
Log:
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

Modified:
    branches/1.8/channels/sig_pri.c

Modified: branches/1.8/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/sig_pri.c?view=diff&rev=383796&r1=383795&r2=383796
==============================================================================
--- branches/1.8/channels/sig_pri.c (original)
+++ branches/1.8/channels/sig_pri.c Mon Mar 25 18:19:06 2013
@@ -5349,6 +5349,10 @@
 
 							snprintf(calledtonstr, sizeof(calledtonstr), "%d", e->ring.calledplan);
 							pbx_builtin_setvar_helper(c, "CALLEDTON", calledtonstr);
+							ast_channel_lock(c);
+							c->dialed.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));
@@ -5487,10 +5491,12 @@
 
 							snprintf(calledtonstr, sizeof(calledtonstr), "%d", e->ring.calledplan);
 							pbx_builtin_setvar_helper(c, "CALLEDTON", calledtonstr);
+							ast_channel_lock(c);
+							c->dialed.number.plan = e->ring.calledplan;
+							ast_channel_unlock(c);
 
 							sig_pri_handle_subcmds(pri, chanpos, e->e, e->ring.channel,
 								e->ring.subcmds, e->ring.call);
-
 						}
 						if (c && !ast_pbx_start(c)) {
 							ast_verb(3, "Accepting call from '%s' to '%s' on channel %d/%d, span %d\n",




More information about the asterisk-commits mailing list