From 7fe36083005e247499efe9eb13c72942a90a3b74 Mon Sep 17 00:00:00 2001 From: Olle Johansson Date: Fri, 18 May 2007 15:18:13 +0000 Subject: [PATCH] Merged revisions 65075 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r65075 | oej | 2007-05-18 17:12:09 +0200 (Fri, 18 May 2007) | 5 lines Issue 9235 - part of the problem, maybe not all. Please retry with this patch (and no other patch) if you have problems with hanging SIP channels. Thank you. A special Thank You to WeBRainstorm that gave me access to his system. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@65076 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 5d57c8e1f0..34da98958c 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11921,10 +11921,15 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru This transaction is already scheduled to be killed by sip_hangup(). */ xmitres = transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE); - if (p->owner && !ast_test_flag(req, SIP_PKT_IGNORE)) + if (p->owner && !ast_test_flag(req, SIP_PKT_IGNORE)) { ast_queue_hangup(p->owner); - else if (!ast_test_flag(req, SIP_PKT_IGNORE)) + append_history(p, "Hangup", "Got 487 on CANCEL request from us. Queued AST hangup request"); + } else if (!ast_test_flag(req, SIP_PKT_IGNORE)) { update_call_counter(p, DEC_CALL_LIMIT); + append_history(p, "Hangup", "Got 487 on CANCEL request from us on call without owner. Killing this dialog."); + ast_set_flag(&p->flags[0], SIP_NEEDDESTROY); + sip_alreadygone(p); + } break; case 488: /* Not acceptable here */ xmitres = transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);