diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-30 16:40:43 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-30 16:40:43 +0000 |
commit | 9573bd94027ffc4edf5ad3f359da4fc52497746d (patch) | |
tree | 9f5955624340e340e4e0ad03a715382dc494ff92 /main/features.c | |
parent | c874d37df5d706dc4fc52e30d2a95c5f093e0796 (diff) |
Move implementation of an attended-transfer-complete sound from one channel
driver into a common place for multiple channel drivers.
(closes issue #13152)
Reported by: caio1982
Patches:
atxfer_complete_sound3.diff uploaded by caio1982 (license 22)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@134401 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/features.c')
-rw-r--r-- | main/features.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/main/features.c b/main/features.c index 0d8ea9363..a7eeedb2d 100644 --- a/main/features.c +++ b/main/features.c @@ -1235,6 +1235,21 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st l = strlen(xferto); snprintf(xferto + l, sizeof(xferto) - l, "@%s/n", transferer_real_context); /* append context */ + + /* If we are performing an attended transfer and we have two channels involved then + copy sound file information to play upon attended transfer completion */ + if (transferee) { + const char *chan1_attended_sound = pbx_builtin_getvar_helper(transferer, "ATTENDED_TRANSFER_COMPLETE_SOUND"); + const char *chan2_attended_sound = pbx_builtin_getvar_helper(transferee, "ATTENDED_TRANSFER_COMPLETE_SOUND"); + + if (!ast_strlen_zero(chan1_attended_sound)) { + pbx_builtin_setvar_helper(transferer, "BRIDGE_PLAY_SOUND", chan1_attended_sound); + } + if (!ast_strlen_zero(chan2_attended_sound)) { + pbx_builtin_setvar_helper(transferee, "BRIDGE_PLAY_SOUND", chan2_attended_sound); + } + } + newchan = ast_feature_request_and_dial(transferer, transferee, "Local", ast_best_codec(transferer->nativeformats), xferto, atxfernoanswertimeout, &outstate, transferer->cid.cid_num, transferer->cid.cid_name, 1, transferer->language); |