]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't send 487 if we've already sent 200 OK on invite at time of receiving a BYE...
authorOlle Johansson <oej@edvina.net>
Mon, 13 Nov 2006 19:04:39 +0000 (19:04 +0000)
committerOlle Johansson <oej@edvina.net>
Mon, 13 Nov 2006 19:04:39 +0000 (19:04 +0000)
(SIPP testing)

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

channels/chan_sip.c

index c2a05bdeb5fca5a1f6d65357403aa9678f946f6b..04294afdff6273236567aead0ce8bc31bd4cfd2b 100644 (file)
@@ -10835,7 +10835,8 @@ static int handle_request_bye(struct sip_pvt *p, struct sip_request *req, int de
        struct ast_channel *bridged_to;
        char iabuf[INET_ADDRSTRLEN];
        
-       if (p->pendinginvite && !ast_test_flag(p, SIP_OUTGOING) && !ignore)
+       /* If we have an INCOMING invite that we haven't answered, terminate that transaction */
+       if (p->pendinginvite && !ast_test_flag(p, SIP_OUTGOING) && !ignore && !p->owner)
                transmit_response_reliable(p, "487 Request Terminated", &p->initreq, 1);
 
        copy_request(&p->initreq, req);