From ff0ce011a02b4074166b3b2b77aeaf70fe21dde0 Mon Sep 17 00:00:00 2001 From: Olle Johansson Date: Mon, 13 Nov 2006 19:04:39 +0000 Subject: [PATCH] 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 --- channels/chan_sip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.47.2