Transfers: Make Asterisk set ATTENDEDTRANSFER/BLINDTRANSFER more reliably

There were still a few cases in which ATTENDEDTRANSFER and BLINDTRANSFER
wouldn't be set on channels involved with blind and attended transfers.
This would happen with features that were initialized by channel driver
specific mechanisms in multiparty calls. This patch resolves those cases
while attempted to keep the behavior for setting those variables as
consistent as possible.

(closes issue AFS-24)
Review: https://reviewboard.asterisk.org/r/3040/
........

Merged revisions 403781 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jonathan Rose
2013-12-13 20:13:22 +00:00
parent 84e1790beb
commit 63b2c28c4b
5 changed files with 66 additions and 13 deletions

View File

@@ -220,7 +220,7 @@ static struct ast_channel *park_local_transfer(struct ast_channel *parker, const
/* We need to have the parker subscribe to the new local channel before hand. */
create_parked_subscription(parker, ast_channel_uniqueid(parkee_side_2));
pbx_builtin_setvar_helper(parkee_side_2, "BLINDTRANSFER", ast_channel_name(parker));
ast_bridge_set_transfer_variables(parkee_side_2, ast_channel_name(parker), 0);
ast_channel_unref(parkee_side_2);
@@ -375,7 +375,7 @@ static int parking_park_bridge_channel(struct ast_bridge_channel *bridge_channel
return -1;
}
pbx_builtin_setvar_helper(bridge_channel->chan, "BLINDTRANSFER", ast_channel_name(parker));
ast_bridge_set_transfer_variables(bridge_channel->chan, ast_channel_name(parker), 0);
/* bridge_channel must be locked so we can get a reference to the bridge it is currently on */
ao2_lock(bridge_channel);

View File

@@ -453,7 +453,7 @@ static int manager_park(struct mansession *s, const struct message *m)
ast_channel_lock(chan);
if (!ast_strlen_zero(timeout_channel)) {
pbx_builtin_setvar_helper(chan, "BLINDTRANSFER", timeout_channel);
ast_bridge_set_transfer_variables(chan, timeout_channel, 0);
}
ast_channel_unlock(chan);