diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-18 16:04:55 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-18 16:04:55 +0000 |
commit | 9b09201b6383bf73a07927e972e58a06e1e37303 (patch) | |
tree | 08964b6a9727b9f4aec1d4b9b4ee34861134fc7a /channels | |
parent | 2577140b5113babb09105091adbba344041c79a8 (diff) |
Don't defer the BYE till later on a transfer when the transfer itself goes kaboom and has no hope of working.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@69668 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 7fdfb6f27..93c76be91 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -13858,14 +13858,16 @@ static int local_attended_transfer(struct sip_pvt *transferer, struct sip_dual * ast_mutex_unlock(&targetcall_pvt->lock); if (res) { /* Failed transfer */ - /* Could find better message, but they will get the point */ - transmit_notify_with_sipfrag(transferer, seqno, "486 Busy", TRUE); + transmit_notify_with_sipfrag(transferer, seqno, "486 Busy Here", TRUE); append_history(transferer, "Xfer", "Refer failed"); + transferer->refer->status = REFER_FAILED; if (targetcall_pvt->owner) ast_channel_unlock(targetcall_pvt->owner); /* Right now, we have to hangup, sorry. Bridge is destroyed */ if (res != -2) ast_hangup(transferer->owner); + else + ast_clear_flag(&transferer->flags[0], SIP_DEFER_BYE_ON_TRANSFER); } else { /* Transfer succeeded! */ |