]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't send a BYE on a dialog that is already gone during a REFER.
authorJoshua Colp <jcolp@digium.com>
Mon, 16 Jun 2008 12:08:28 +0000 (12:08 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 16 Jun 2008 12:08:28 +0000 (12:08 +0000)
(closes issue #12865)
Reported by: flefoll
Patches:
      chan_sip.c.br14.121495.patch-ALREADYGONE uploaded by flefoll (license 244)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@122869 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 912fe9a5ecca0b6b2bcca16e0ac4366c2b84fb1a..9fc58e6cfbc467981d8fcfa305e147e82877cc81 100644 (file)
@@ -2105,7 +2105,7 @@ static int __sip_autodestruct(const void *data)
        if (p->owner) {
                ast_log(LOG_WARNING, "Autodestruct on dialog '%s' with owner in place (Method: %s)\n", p->callid, sip_methods[p->method].text);
                ast_queue_hangup(p->owner);
-       } else if (p->refer) {
+       } else if (p->refer && !ast_test_flag(&p->flags[0], SIP_ALREADYGONE)) {
                if (option_debug > 2)
                        ast_log(LOG_DEBUG, "Finally hanging up channel after transfer: %s\n", p->callid);
                transmit_request_with_auth(p, SIP_BYE, 0, XMIT_RELIABLE, 1);