[asterisk-commits] jpeeler: branch 1.6.0 r223404 - /branches/1.6.0/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Oct 9 18:08:57 CDT 2009


Author: jpeeler
Date: Fri Oct  9 18:08:50 2009
New Revision: 223404

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=223404
Log:
Fix interpretation of PRIREDIRECTIONREASON set by chan_sip.

This commit is the simplest way to solve a problem that has already been solved
in trunk with the "COLP/CONP and Redirecting party information into Asterisk"
commit. In trunk the redirection reason is translated into a generic redirect 
reason. I would have had to do the same fix except chan_sip never reads
PRIREDIRECTREASON. So both chan_dahdi and chan_h323 have been modified to
interpret the one different redirect reason of "no-answer" properly and set the
ISDN reason code 2 of "no reply".

(closes issue #15033)
Reported by: steinwej

Modified:
    branches/1.6.0/channels/chan_dahdi.c
    branches/1.6.0/channels/chan_h323.c

Modified: branches/1.6.0/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/channels/chan_dahdi.c?view=diff&rev=223404&r1=223403&r2=223404
==============================================================================
--- branches/1.6.0/channels/chan_dahdi.c (original)
+++ branches/1.6.0/channels/chan_dahdi.c Fri Oct  9 18:08:50 2009
@@ -3090,7 +3090,8 @@
 				redirect_reason = 0;
 			else if (!strcasecmp(rr_str, "BUSY"))
 				redirect_reason = 1;
-			else if (!strcasecmp(rr_str, "NO_REPLY"))
+			else if (!strcasecmp(rr_str, "NO_REPLY") || !strcasecmp(rr_str, "NOANSWER"))
+			/* the NOANSWER is to match diversion-reason from chan_sip, (which never reads PRIREDIRECTREASON) */
 				redirect_reason = 2;
 			else if (!strcasecmp(rr_str, "UNCONDITIONAL"))
 				redirect_reason = 15;

Modified: branches/1.6.0/channels/chan_h323.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/channels/chan_h323.c?view=diff&rev=223404&r1=223403&r2=223404
==============================================================================
--- branches/1.6.0/channels/chan_h323.c (original)
+++ branches/1.6.0/channels/chan_h323.c Fri Oct  9 18:08:50 2009
@@ -631,7 +631,8 @@
 			pvt->options.redirect_reason = 0;
 		else if (!strcasecmp(addr, "BUSY"))
 			pvt->options.redirect_reason = 1;
-		else if (!strcasecmp(addr, "NO_REPLY"))
+		else if (!strcasecmp(addr, "NO_REPLY") || !strcasecmp(addr, "NOANSWER"))
+		/* the NOANSWER is to match diversion-reason from chan_sip, (which never reads PRIREDIRECTREASON) */
 			pvt->options.redirect_reason = 2;
 		else if (!strcasecmp(addr, "UNCONDITIONAL"))
 			pvt->options.redirect_reason = 15;




More information about the asterisk-commits mailing list