[asterisk-commits] mmichelson: branch 10 r352228 - in /branches/10: ./ main/features.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 23 14:28:13 CST 2012


Author: mmichelson
Date: Mon Jan 23 14:28:04 2012
New Revision: 352228

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=352228
Log:
Fix blind transfers from failing if an 'h' extension is present.

This prevents the 'h' extension from being run on the transferee
channel when it is transferred via a native transfer mechanism such
as SIP REFER.

(closes ASTERISK-19173)
Reported by: Ross Beer
Tested by: Kristjan Vrban
Patches:
	ASTERISK-19173 by Mark Michelson (license 5049)

Review: https://reviewboard.asterisk.org/r/1685
........

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

Modified:
    branches/10/   (props changed)
    branches/10/main/features.c

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

Modified: branches/10/main/features.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/main/features.c?view=diff&rev=352228&r1=352227&r2=352228
==============================================================================
--- branches/10/main/features.c (original)
+++ branches/10/main/features.c Mon Jan 23 14:28:04 2012
@@ -4110,6 +4110,17 @@
 		if (!f || (f->frametype == AST_FRAME_CONTROL &&
 				(f->subclass.integer == AST_CONTROL_HANGUP || f->subclass.integer == AST_CONTROL_BUSY ||
 					f->subclass.integer == AST_CONTROL_CONGESTION))) {
+			/*
+			 * If the bridge was broken for a hangup that isn't real, then
+			 * then don't run the h extension, because the channel isn't
+			 * really hung up. This should really only happen with AST_SOFTHANGUP_ASYNCGOTO,
+			 * but it doesn't hurt to check AST_SOFTHANGUP_UNBRIDGE either.
+			 */
+			ast_channel_lock(chan);
+			if (chan->_softhangup & (AST_SOFTHANGUP_ASYNCGOTO | AST_SOFTHANGUP_UNBRIDGE)) {
+				ast_set_flag(chan, AST_FLAG_BRIDGE_HANGUP_DONT);
+			}
+			ast_channel_unlock(chan);
 			res = -1;
 			break;
 		}




More information about the asterisk-commits mailing list