From: Terry Wilson Date: Thu, 3 Feb 2011 20:56:00 +0000 (+0000) Subject: Merged revisions 306119 via svnmerge from X-Git-Tag: 1.6.2.18-rc1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56ec0fc138aa8cb26421e026eddb46f222b1a044;p=thirdparty%2Fasterisk.git Merged revisions 306119 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r306119 | twilson | 2011-02-03 12:36:34 -0800 (Thu, 03 Feb 2011) | 9 lines Set hangup cause in local_hangup When a call involves a local channel (like SIP -> Local -> SIP), the hangup cause was not being set. This resulted in SIP channels sometimes getting a 503 error instead of a 486 when the far side sent a busy. In Asterisk 1.8+ this also can cause issues with CCSS that involve a local channel. This patch sets the hangupcause for one side of the local channel to the other in local_hangup for outbound calls. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@306126 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_local.c b/channels/chan_local.c index 9181af08d1..6f7d232750 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -760,6 +760,7 @@ static int local_hangup(struct ast_channel *ast) ao2_lock(p); } if (p->owner) { + p->owner->hangupcause = p->chan->hangupcause; pbx_builtin_setvar_helper(p->owner, "CHANLOCALSTATUS", status); ast_channel_unlock(p->owner); }