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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 2 14:30:37 CDT 2013


Author: mmichelson
Date: Tue Jul  2 14:30:35 2013
New Revision: 393480

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=393480
Log:
Handle a previously unhandled case.

If the transferee hangs up during the Consulting state, then it doesn't
make sense to just destroy everything. Instead, we play an error sound
to the transferer and change the bridge that the transferer and transfer
target are in back to normal. They can then continue on as they please.


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=393480&r1=393479&r2=393480
==============================================================================
--- team/mmichelson/atxfer_features/main/bridging_basic.c (original)
+++ team/mmichelson/atxfer_features/main/bridging_basic.c Tue Jul  2 14:30:35 2013
@@ -1604,7 +1604,19 @@
 {
 	switch (stimulus) {
 	case STIMULUS_TRANSFEREE_HANGUP:
-		/* XXX I have absolutely no idea how to handle this case */
+		/* This is a one-of-a-kind event. The transferer and transfer target are talking in
+		 * one bridge, and the transferee has hung up in a separate bridge. In this case, we
+		 * will change the personality of the transfer target bridge back to normal, and play
+		 * a sound to the transferer to indicate the transferee is gone.
+		 */
+		ast_bridge_basic_change_personality_normal(props->target_bridge);
+		play_sound(props->transferer, props->failsound);
+		/* These next two lines are here to ensure that our reference to the target bridge
+		 * is cleaned up properly and that the target bridge is not destroyed when the
+		 * monitor thread exits
+		 */
+		ao2_ref(props->target_bridge, -1);
+		props->target_bridge = NULL;
 		return TRANSFER_FAIL;
 	case STIMULUS_TRANSFERER_HANGUP:
 	case STIMULUS_DTMF_ATXFER_COMPLETE:




More information about the asterisk-commits mailing list