[asterisk-commits] mmichelson: branch mmichelson/transfer r386448 - /team/mmichelson/transfer/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Apr 24 14:51:06 CDT 2013


Author: mmichelson
Date: Wed Apr 24 14:51:03 2013
New Revision: 386448

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=386448
Log:
Leave removal of the transferer from the bridge to the bridge itself.

The next item on the agenda is to add the special case of performing a
blind transfer to a parking extension. In order to facilitate this, we
can't make the assumption that the transferer is supposed to be hung
up upon return of ast_bridge_blind_transfer(). It may be that the transferer
is supposed to remain alive until a parking announcement is made.

Tested this, and blind transfers still work properly in both two-party
bridges and confbridges.


Modified:
    team/mmichelson/transfer/main/bridging.c
    team/mmichelson/transfer/main/manager.c

Modified: team/mmichelson/transfer/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer/main/bridging.c?view=diff&rev=386448&r1=386447&r2=386448
==============================================================================
--- team/mmichelson/transfer/main/bridging.c (original)
+++ team/mmichelson/transfer/main/bridging.c Wed Apr 24 14:51:03 2013
@@ -4308,7 +4308,7 @@
 	return transferee;
 }
 
-static enum ast_transfer_result queue_blind_transfer_bridge_action(struct ao2_container *channels,
+static int queue_blind_transfer_bridge_action(struct ao2_container *channels,
 		struct ast_channel *transferer, const char *exten, const char *context)
 {
 	RAII_VAR(struct ast_bridge_channel *, transferee_bridge_channel, NULL, ao2_cleanup);
@@ -4317,7 +4317,7 @@
 
 	transferee = get_transferee(channels, transferer);
 	if (!transferee) {
-		return AST_BRIDGE_TRANSFER_FAIL;
+		return -1;
 	}
 
 	ast_channel_lock(transferee);
@@ -4332,7 +4332,7 @@
 	ast_bridge_channel_queue_action_data(transferee_bridge_channel,
 			AST_BRIDGE_ACTION_BLIND_TRANSFER, &blind_data, sizeof(blind_data));
 
-	return AST_BRIDGE_TRANSFER_SUCCESS;
+	return 0;
 }
 
 enum ast_transfer_result ast_bridge_blind_transfer(struct ast_channel *transferer,
@@ -4377,7 +4377,12 @@
 		return local_channel_swap_transfer(transferer, bridge, exten, context);
 	}
 
-	return queue_blind_transfer_bridge_action(channels, transferer, exten, context);
+	if (queue_blind_transfer_bridge_action(channels, transferer, exten, context)) {
+		return AST_BRIDGE_TRANSFER_FAIL;
+	}
+
+	ast_bridge_remove(bridge, transferer);
+	return AST_BRIDGE_TRANSFER_SUCCESS;
 }
 
 enum ast_transfer_result ast_bridge_attended_transfer(struct ast_channel *to_transferee,

Modified: team/mmichelson/transfer/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer/main/manager.c?view=diff&rev=386448&r1=386447&r2=386448
==============================================================================
--- team/mmichelson/transfer/main/manager.c (original)
+++ team/mmichelson/transfer/main/manager.c Wed Apr 24 14:51:03 2013
@@ -3931,7 +3931,6 @@
 		break;
 	case AST_BRIDGE_TRANSFER_SUCCESS:
 		astman_send_ack(s, m, "Transfer succeeded");
-		ast_softhangup(chan, AST_SOFTHANGUP_EXPLICIT);
 		break;
 	}
 	




More information about the asterisk-commits mailing list