mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
Reimplement bridging and DTMF features related channel variables in the bridging core.
* The channel variable ATTENDED_TRANSFER_COMPLETE_SOUND is no longer channel driver specific. If the channel variable is set on the transferrer channel, the sound will be played to the target of an attended transfer. * The channel variable BRIDGEPEER becomes a comma separated list of peers in a multi-party bridge. The BRIDGEPEER value can have a maximum of 10 peers listed. Any more peers in the bridge will not be included in the list. BRIDGEPEER is not valid in holding bridges like parking since those channels do not talk to each other even though they are in a bridge. * The channel variable BRIDGEPVTCALLID is only valid for two party bridges and will contain a value if the BRIDGEPEER's channel driver supports it. * The channel variable DYNAMIC_PEERNAME is redundant with BRIDGEPEER and is removed. The more useful DYNAMIC_WHO_ACTIVATED gives the channel name that activated the dynamic feature. * The channel variables DYNAMIC_FEATURENAME and DYNAMIC_WHO_ACTIVATED are set only on the channel executing the dynamic feature. Executing a dynamic feature on the bridge peer in a multi-party bridge will execute it on all peers of the activating channel. (closes issue ASTERISK-21555) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2582/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -134,6 +134,9 @@ static struct ast_channel *dial_transfer(struct ast_channel *caller, const char
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Who is transferring the call. */
|
||||
pbx_builtin_setvar_helper(chan, "TRANSFERERNAME", ast_channel_name(caller));
|
||||
|
||||
/* Before we actually dial out let's inherit appropriate information. */
|
||||
copy_caller_data(chan, caller);
|
||||
|
||||
@@ -275,6 +278,7 @@ static int feature_attended_transfer(struct ast_bridge *bridge, struct ast_bridg
|
||||
struct ast_bridge_features caller_features;
|
||||
int xfer_failed;
|
||||
struct ast_bridge_features_attended_transfer *attended_transfer = hook_pvt;
|
||||
const char *complete_sound;
|
||||
const char *context;
|
||||
enum atxfer_code transfer_code = ATXFER_INCOMPLETE;
|
||||
const char *atxfer_abort;
|
||||
@@ -407,6 +411,20 @@ static int feature_attended_transfer(struct ast_bridge *bridge, struct ast_bridg
|
||||
ast_bridge_destroy(attended_bridge);
|
||||
ast_bridge_features_cleanup(&caller_features);
|
||||
|
||||
/* Is there a courtesy sound to play to the peer? */
|
||||
ast_channel_lock(bridge_channel->chan);
|
||||
complete_sound = pbx_builtin_getvar_helper(bridge_channel->chan,
|
||||
"ATTENDED_TRANSFER_COMPLETE_SOUND");
|
||||
if (!ast_strlen_zero(complete_sound)) {
|
||||
complete_sound = ast_strdupa(complete_sound);
|
||||
} else {
|
||||
complete_sound = NULL;
|
||||
}
|
||||
ast_channel_unlock(bridge_channel->chan);
|
||||
if (complete_sound) {
|
||||
pbx_builtin_setvar_helper(peer, "BRIDGE_PLAY_SOUND", complete_sound);
|
||||
}
|
||||
|
||||
xfer_failed = -1;
|
||||
switch (transfer_code) {
|
||||
case ATXFER_INCOMPLETE:
|
||||
|
Reference in New Issue
Block a user