[asterisk-commits] rmudgett: trunk r364082 - in /trunk: ./	main/features.c
    SVN commits to the Asterisk project 
    asterisk-commits at lists.digium.com
       
    Thu Apr 26 15:35:46 CDT 2012
    
    
  
Author: rmudgett
Date: Thu Apr 26 15:35:41 2012
New Revision: 364082
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=364082
Log:
Fix DTMF atxfer running h exten after the wrong bridge ends.
When party B does an attended transfer of party A to party C, the
attending bridge between party B and C should not be running an h exten
when the bridge ends.  Running an h exten now sets a softhangup flag to
ensure that an AGI will run in dead AGI mode.
* Set the AST_FLAG_BRIDGE_HANGUP_DONT on the party B channel for the
attending bridge between party B and C.
(closes issue AST-870)
(closes issue ASTERISK-19717)
Reported by: Mario
(closes issue ASTERISK-19633)
Reported by: Andrey Solovyev
Patches:
      jira_asterisk_19633_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: rmudgett, Andrey Solovyev, Mario
........
Merged revisions 364060 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 364065 from http://svn.asterisk.org/svn/asterisk/branches/10
Modified:
    trunk/   (props changed)
    trunk/main/features.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.
Modified: trunk/main/features.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/features.c?view=diff&rev=364082&r1=364081&r2=364082
==============================================================================
--- trunk/main/features.c (original)
+++ trunk/main/features.c Thu Apr 26 15:35:41 2012
@@ -2686,16 +2686,30 @@
 		ast_set_flag(&(bconfig.features_caller), AST_FEATURE_DISCONNECT);
 		ast_set_flag(&(bconfig.features_callee), AST_FEATURE_DISCONNECT);
 
-		/* ast_bridge_call clears AST_FLAG_BRIDGE_HANGUP_DONT, but we don't
-		   want that to happen here because we're also in another bridge already
+		/*
+		 * ast_bridge_call clears AST_FLAG_BRIDGE_HANGUP_DONT, but we
+		 * don't want that to happen here because the transferer is in
+		 * another bridge already.
 		 */
-		if (ast_test_flag(ast_channel_flags(chan), AST_FLAG_BRIDGE_HANGUP_DONT)) {
+		if (ast_test_flag(ast_channel_flags(transferer), AST_FLAG_BRIDGE_HANGUP_DONT)) {
 			hangup_dont = 1;
 		}
-		/* Let party B and party C talk as long as they want. */
+
+		/*
+		 * Don't let the after-bridge code run the h-exten.  It is the
+		 * wrong bridge to run the h-exten after.
+		 */
+		ast_set_flag(ast_channel_flags(transferer), AST_FLAG_BRIDGE_HANGUP_DONT);
+
+		/*
+		 * Let party B and C talk as long as they want while party A
+		 * languishes in autoservice listening to MOH.
+		 */
 		ast_bridge_call(transferer, newchan, &bconfig);
+
 		if (hangup_dont) {
-			ast_set_flag(ast_channel_flags(chan), AST_FLAG_BRIDGE_HANGUP_DONT);
+			/* Restore the AST_FLAG_BRIDGE_HANGUP_DONT flag */
+			ast_set_flag(ast_channel_flags(transferer), AST_FLAG_BRIDGE_HANGUP_DONT);
 		}
 
 		if (ast_check_hangup(newchan) || !ast_check_hangup(transferer)) {
    
    
More information about the asterisk-commits
mailing list