aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authortwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-08 16:02:42 +0000
committertwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-08 16:02:42 +0000
commit5a522bc447cde6d674804e0f01663368100e4bd3 (patch)
tree6a7d06111b17afe0cd6b7b10a5ba335f667d977f /channels
parent2e508d0b567a21a8ad8ae011c5478ab8c971d2f9 (diff)
Add the ability to play a courtesy tone to the transfer target in a native SIP attended transfer by setting the variable ATTENEDED_TRANSFER_COMPLETE_SOUND.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@161679 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index a5ec482e5..e230c51ce 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -18927,11 +18927,15 @@ static int local_attended_transfer(struct sip_pvt *transferer, struct sip_dual *
ast_clear_flag(&transferer->flags[0], SIP_DEFER_BYE_ON_TRANSFER);
} else {
/* Transfer succeeded! */
+ const char *xfersound = pbx_builtin_getvar_helper(target.chan1, "ATTENDED_TRANSFER_COMPLETE_SOUND");
/* Tell transferer that we're done. */
transmit_notify_with_sipfrag(transferer, seqno, "200 OK", TRUE);
append_history(transferer, "Xfer", "Refer succeeded");
transferer->refer->status = REFER_200OK;
+ if (target.chan2 && !ast_strlen_zero(xfersound) && ast_streamfile(target.chan2, xfersound, target.chan2->language) >= 0) {
+ ast_waitstream(target.chan2, "");
+ }
if (targetcall_pvt->owner) {
ast_debug(1, "SIP attended transfer: Unlocking channel %s\n", targetcall_pvt->owner->name);
ast_channel_unlock(targetcall_pvt->owner);