summaryrefslogtreecommitdiff
path: root/main/channel.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2008-03-25 15:18:41 +0000
committerJoshua Colp <jcolp@digium.com>2008-03-25 15:18:41 +0000
commit738e4ec94e7144147b21c158764dc7d8fbbc20bf (patch)
treeb4442a43ce0035f8b86c6c864e171fcf650fca3c /main/channel.c
parent358ac2f76a0313f1008627ab91e374e5bcaf4873 (diff)
Add a special dialplan variable to chan_sip which will cause an audio file to be played upon completion of an attended transfer.
(closes issue #9239) Reported by: sunder git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c
index 920ee37dd..005f76ff1 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -4355,6 +4355,7 @@ enum ast_bridge_result ast_channel_bridge(struct ast_channel *c0, struct ast_cha
for (/* ever */;;) {
struct timeval now = { 0, };
int to;
+ const char *bridge_play_sound = NULL;
to = -1;
@@ -4438,6 +4439,16 @@ enum ast_bridge_result ast_channel_bridge(struct ast_channel *c0, struct ast_cha
pbx_builtin_setvar_helper(c1, "BRIDGEPVTCALLID", c0->tech->get_pvt_uniqueid(c0));
if (c1->tech->get_pvt_uniqueid)
pbx_builtin_setvar_helper(c0, "BRIDGEPVTCALLID", c1->tech->get_pvt_uniqueid(c1));
+
+ /* See if we need to play an audio file to any side of the bridge */
+ if ((bridge_play_sound = pbx_builtin_getvar_helper(c0, "BRIDGE_PLAY_SOUND"))) {
+ bridge_playfile(c0, c1, bridge_play_sound, 0);
+ pbx_builtin_setvar_helper(c0, "BRIDGE_PLAY_SOUND", NULL);
+ }
+ if ((bridge_play_sound = pbx_builtin_getvar_helper(c1, "BRIDGE_PLAY_SOUND"))) {
+ bridge_playfile(c1, c0, bridge_play_sound, 0);
+ pbx_builtin_setvar_helper(c1, "BRIDGE_PLAY_SOUND", NULL);
+ }
if (c0->tech->bridge &&
(c0->tech->bridge == c1->tech->bridge) &&