From a0a478a72c7ab854ff486b9fe276277636f50586 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Tue, 4 Oct 2005 22:09:23 +0000 Subject: [PATCH] don't destroy calls when re-INVITE messages ask for things we can't do (issue #5384) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6714 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 97f5c67847..4895a1786a 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -10103,7 +10103,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int if (required_profile) { /* They require something */ /* At this point we support no extensions, so fail */ transmit_response_with_unsupported(p, "420 Bad extension", req, required); - ast_set_flag(p, SIP_NEEDDESTROY); + if (!p->lastinvite) + ast_set_flag(p, SIP_NEEDDESTROY); return -1; } @@ -10136,7 +10137,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int if (!strcasecmp(get_header(req, "Content-Type"), "application/sdp")) { if (process_sdp(p, req)) { transmit_response(p, "488 Not acceptable here", req); - ast_set_flag(p, SIP_NEEDDESTROY); + if (!p->lastinvite) + ast_set_flag(p, SIP_NEEDDESTROY); return -1; } } else {