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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 22 16:17:05 CDT 2013


Author: mmichelson
Date: Mon Jul 22 16:17:02 2013
New Revision: 395078

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=395078
Log:
Fix bugs reported on review.

1) Remove bridge inhibit property from target bridge when transferee hangs up in the
CONSULTING state. This allows for the two parties to be able to attempt transfers
again.

2) Be sure to use the recall_target instead of the transfer_target when dealing with
the BLOND_NONFINAL state. This way, we can properly detect hangups that occur during
this state.

There is also a change to cel.c so that the new attended transfer destination type
is handled.


Modified:
    team/mmichelson/atxfer_features/main/bridging_basic.c
    team/mmichelson/atxfer_features/main/cel.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=395078&r1=395077&r2=395078
==============================================================================
--- team/mmichelson/atxfer_features/main/bridging_basic.c (original)
+++ team/mmichelson/atxfer_features/main/bridging_basic.c Mon Jul 22 16:17:02 2013
@@ -1588,6 +1588,7 @@
 		 */
 		bridge_basic_change_personality(props->target_bridge, BRIDGE_BASIC_PERSONALITY_NORMAL, NULL);
 		play_sound(props->transferer, props->failsound);
+		ast_bridge_merge_inhibit(props->target_bridge, -1);
 		/* 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
@@ -1684,8 +1685,12 @@
 
 static int blond_nonfinal_enter(struct attended_transfer_properties *props)
 {
+	int res;
 	props->superstate = SUPERSTATE_RECALL;
-	return blond_enter(props);
+	props->recall_target = ast_channel_ref(props->transfer_target);
+	res = blond_enter(props);
+	props->transfer_target = ast_channel_unref(props->transfer_target);
+	return res;
 }
 
 static enum attended_transfer_state blond_nonfinal_exit(struct attended_transfer_properties *props,
@@ -1697,7 +1702,8 @@
 	case STIMULUS_RECALL_TARGET_ANSWER:
 		return TRANSFER_RESUME;
 	case STIMULUS_TIMEOUT:
-		ast_softhangup(props->transfer_target, AST_SOFTHANGUP_EXPLICIT);
+		ast_softhangup(props->recall_target, AST_SOFTHANGUP_EXPLICIT);
+		props->recall_target = ast_channel_unref(props->recall_target);
 	case STIMULUS_RECALL_TARGET_HANGUP:
 		return TRANSFER_RECALLING;
 	case STIMULUS_NONE:

Modified: team/mmichelson/atxfer_features/main/cel.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/main/cel.c?view=diff&rev=395078&r1=395077&r2=395078
==============================================================================
--- team/mmichelson/atxfer_features/main/cel.c (original)
+++ team/mmichelson/atxfer_features/main/cel.c Mon Jul 22 16:17:02 2013
@@ -1433,9 +1433,10 @@
 	switch (xfer->dest_type) {
 	case AST_ATTENDED_TRANSFER_DEST_FAIL:
 		return;
-		/* handle these two the same */
+		/* handle these three the same */
 	case AST_ATTENDED_TRANSFER_DEST_BRIDGE_MERGE:
 	case AST_ATTENDED_TRANSFER_DEST_LINK:
+	case AST_ATTENDED_TRANSFER_DEST_THREEWAY:
 		extra = ast_json_pack("{s: s, s: s, s: s}",
 			"bridge1_id", bridge1->uniqueid,
 			"channel2_name", channel2->name,




More information about the asterisk-commits mailing list