]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Set hangup cause in local_hangup
authorTerry Wilson <twilson@digium.com>
Thu, 3 Feb 2011 20:36:34 +0000 (20:36 +0000)
committerTerry Wilson <twilson@digium.com>
Thu, 3 Feb 2011 20:36:34 +0000 (20:36 +0000)
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.4@306119 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_local.c

index ef06830de4f53a2ed53a762994f7b26ee6c52c6f..26b9f51f09c5b21b0032a1e8971c6d8f4f9b0b8f 100644 (file)
@@ -660,6 +660,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);
                        }