From: Olle Johansson Date: Mon, 13 Nov 2006 19:04:39 +0000 (+0000) Subject: Don't send 487 if we've already sent 200 OK on invite at time of receiving a BYE... X-Git-Tag: 1.2.14~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff0ce011a02b4074166b3b2b77aeaf70fe21dde0;p=thirdparty%2Fasterisk.git Don't send 487 if we've already sent 200 OK on invite at time of receiving a BYE in the same transaction. (SIPP testing) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47571 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index c2a05bdeb5..04294afdff 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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);