[asterisk-commits] mmichelson: branch mmichelson/transfer r386421 - /team/mmichelson/transfer/main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Apr 24 09:53:13 CDT 2013
Author: mmichelson
Date: Wed Apr 24 09:53:10 2013
New Revision: 386421
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=386421
Log:
Fix crash and queue bridge action on expected bridge channel.
The crash does not happen, but the blind transfer still does not work.
The issue is that by changing the bridge channel state on the transferee
channel, the result is that the channel itself is hung up on, and the
other channel in the bridge remains, alone.
The expecations are that
1) The transferee channel is removed from the bridge and executes dialplan
where the explicit goto says to do so.
2) The transferer channel, being the only one remaining in a two-party bridge
will be hung up on.
If I change the transferee state to be END instead of HANGUP, the bridge
does dissolve, but the transferee channel still gets hung up instead of
continuing on.
Modified:
team/mmichelson/transfer/main/bridging.c
Modified: team/mmichelson/transfer/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer/main/bridging.c?view=diff&rev=386421&r1=386420&r2=386421
==============================================================================
--- team/mmichelson/transfer/main/bridging.c (original)
+++ team/mmichelson/transfer/main/bridging.c Wed Apr 24 09:53:10 2013
@@ -4331,20 +4331,13 @@
static enum ast_transfer_result queue_blind_transfer_bridge_action(struct ast_bridge *bridge,
struct ast_channel *transferer, const char *exten, const char *context)
{
- RAII_VAR(struct ast_bridge_channel *, transferer_bridge_channel, NULL, ao2_cleanup);
+ RAII_VAR(struct ast_bridge_channel *, transferee_bridge_channel, NULL, ao2_cleanup);
RAII_VAR(struct ao2_container *, channels, NULL, ao2_cleanup);
struct ao2_iterator channel_iter;
struct blind_transfer_data blind_data;
struct ast_channel *transferee;
ast_channel_lock(transferer);
- transferer_bridge_channel = ast_channel_internal_bridge_channel(transferer);
- if (!transferer_bridge_channel) {
- ast_channel_unlock(transferer);
- ast_log(LOG_WARNING, "Failed to get transferer %s bridge channel\n",
- ast_channel_name(transferer));
- return AST_BRIDGE_TRANSFER_FAIL;
- }
ast_copy_string(blind_data.transferer_name, ast_channel_name(transferer),
sizeof(blind_data.transferer_name));
ast_channel_unlock(transferer);
@@ -4364,13 +4357,18 @@
}
ao2_iterator_destroy(&channel_iter);
+ ast_channel_lock(transferee);
ast_copy_string(blind_data.transferee_name, ast_channel_name(transferee),
sizeof(blind_data.transferee_name));
+ transferee_bridge_channel = ast_channel_internal_bridge_channel(transferee);
+ ao2_ref(transferee_bridge_channel, +1);
+ ast_channel_unlock(transferee);
+
ast_copy_string(blind_data.exten, exten, sizeof(blind_data.exten));
ast_copy_string(blind_data.context, context, sizeof(blind_data.context));
/* XXX Why doesn't this function return success/failure? */
- ast_bridge_channel_queue_action_data(transferer_bridge_channel,
+ ast_bridge_channel_queue_action_data(transferee_bridge_channel,
AST_BRIDGE_ACTION_BLIND_TRANSFER, &blind_data, sizeof(blind_data));
return AST_BRIDGE_TRANSFER_SUCCESS;
More information about the asterisk-commits
mailing list