[asterisk-commits] rmudgett: branch 10 r363734 - in /branches/10: ./ channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Apr 25 15:48:27 CDT 2012


Author: rmudgett
Date: Wed Apr 25 15:48:22 2012
New Revision: 363734

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=363734
Log:
Make DAHDISendCallreroutingFacility wait 5 seconds for a reply before disconnecting the call.

Some switches may not handle the call-deflection/call-rerouting message if
the call is disconnected too soon after being sent.  Asteisk was not
waiting for any reply before disconnecting the call.

* Added a 5 second delay before disconnecting the call to wait for a
potential response if the peer does not disconnect first.

(closes issue ASTERISK-19708)
Reported by: mehdi Shirazi
Patches:
      jira_asterisk_19708_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: rmudgett
........

Merged revisions 363730 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/10/   (props changed)
    branches/10/channels/chan_dahdi.c
    branches/10/channels/sig_pri.c

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/channels/chan_dahdi.c?view=diff&rev=363734&r1=363733&r2=363734
==============================================================================
--- branches/10/channels/chan_dahdi.c (original)
+++ branches/10/channels/chan_dahdi.c Wed Apr 25 15:48:22 2012
@@ -5977,7 +5977,7 @@
 	/* Data will be our digit string */
 	struct dahdi_pvt *pvt;
 	char *parse;
-	int res = -1;
+	int res;
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(destination);
 		AST_APP_ARG(original);
@@ -6024,10 +6024,17 @@
 		args.reason = NULL;
 	}
 
-	pri_send_callrerouting_facility_exec(pvt->sig_pvt, chan->_state, args.destination,
-		args.original, args.reason);
-
-	return res;
+	res = pri_send_callrerouting_facility_exec(pvt->sig_pvt, chan->_state,
+		args.destination, args.original, args.reason);
+	if (!res) {
+		/*
+		 * Wait up to 5 seconds for a reply before hanging up this call
+		 * leg if the peer does not disconnect first.
+		 */
+		ast_safe_sleep(chan, 5000);
+	}
+
+	return -1;
 }
 #endif	/* defined(HAVE_PRI_PROG_W_CAUSE) */
 #endif	/* defined(HAVE_PRI) */

Modified: branches/10/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/channels/sig_pri.c?view=diff&rev=363734&r1=363733&r2=363734
==============================================================================
--- branches/10/channels/sig_pri.c (original)
+++ branches/10/channels/sig_pri.c Wed Apr 25 15:48:22 2012
@@ -9020,7 +9020,7 @@
 
 int pri_send_callrerouting_facility_exec(struct sig_pri_chan *p, enum ast_channel_state chanstate, const char *destination, const char *original, const char *reason)
 {
-	int res = -1;
+	int res;
 
 	sig_pri_lock_private(p);
 




More information about the asterisk-commits mailing list