[asterisk-commits] mmichelson: branch mmichelson/atxfer_features r393238 - /team/mmichelson/atxf...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jun 28 17:11:32 CDT 2013


Author: mmichelson
Date: Fri Jun 28 17:11:30 2013
New Revision: 393238

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=393238
Log:
Tie up some loose ends with regards to bridge destruction on failure.

Now the transferee bridge will die automatically when a transfer fails.
This allowed me to remove a couple of superfluous softhangups of the transferer
channel.


Modified:
    team/mmichelson/atxfer_features/main/bridging_basic.c

Modified: team/mmichelson/atxfer_features/main/bridging_basic.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/main/bridging_basic.c?view=diff&rev=393238&r1=393237&r2=393238
==============================================================================
--- team/mmichelson/atxfer_features/main/bridging_basic.c (original)
+++ team/mmichelson/atxfer_features/main/bridging_basic.c Fri Jun 28 17:11:30 2013
@@ -692,10 +692,6 @@
 	case STIMULUS_RECALL_TARGET_ANSWER:
 		ast_assert(0);
 	case STIMULUS_TRANSFEREE_HANGUP:
-		/* We soft hangup the transferer to prevent him from sitting in
-		 * a bridge by himself after the transfer fails
-		 */
-		ast_softhangup(props->transferer, AST_SOFTHANGUP_EXPLICIT);
 		return TRANSFER_FAIL;
 	case STIMULUS_DTMF_ATXFER_COMPLETE:
 	case STIMULUS_TRANSFERER_HANGUP:
@@ -821,10 +817,6 @@
 	case STIMULUS_RECALL_TARGET_ANSWER:
 		ast_assert(0);
 	case STIMULUS_TRANSFEREE_HANGUP:
-		/* We soft hangup the transferer to prevent him from sitting in
-		 * a bridge by himself after the transfer fails
-		 */
-		ast_softhangup(props->transferer, AST_SOFTHANGUP_EXPLICIT);
 		return TRANSFER_FAIL;
 	case STIMULUS_TRANSFERER_HANGUP:
 	case STIMULUS_DTMF_ATXFER_COMPLETE:
@@ -1039,8 +1031,8 @@
 		return TRANSFER_FAIL;
 	case STIMULUS_TIMEOUT:
 		ast_softhangup(props->recall_target, AST_SOFTHANGUP_EXPLICIT);
+	case STIMULUS_RECALL_TARGET_HANGUP:
 		props->recall_target = ast_channel_unref(props->recall_target);
-	case STIMULUS_RECALL_TARGET_HANGUP:
 		return TRANSFER_RECALLING;
 	case STIMULUS_RECALL_TARGET_ANSWER:
 		return TRANSFER_RESUME;
@@ -1049,7 +1041,10 @@
 
 static int fail_enter(struct attended_transfer_properties *props)
 {
-	/* XXX STUB */
+	if (props->transferee_bridge) {
+		ast_bridge_destroy(props->transferee_bridge);
+		props->transferee_bridge = NULL;
+	}
 	return 0;
 }
 




More information about the asterisk-commits mailing list