]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix interpretation of PRIREDIRECTIONREASON set by chan_sip.
authorJeff Peeler <jpeeler@digium.com>
Fri, 9 Oct 2009 23:11:42 +0000 (23:11 +0000)
committerJeff Peeler <jpeeler@digium.com>
Fri, 9 Oct 2009 23:11:42 +0000 (23:11 +0000)
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@223405 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_dahdi.c
channels/chan_h323.c

index cdfb867b396ac8154204ee9cd6d6afeb42559c5d..bbb883056f38fe39eaf9ed832c3061d01536243c 100644 (file)
@@ -3105,7 +3105,8 @@ static int dahdi_call(struct ast_channel *ast, char *rdest, int timeout)
                                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;
index b574421841541dce0aed1a855639a3a9f8f0afb5..7600cb8c3546e71664ca81720c8ce60ee0f46ad0 100644 (file)
@@ -626,7 +626,8 @@ static int oh323_call(struct ast_channel *c, char *dest, int timeout)
                        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;