diff options
Diffstat (limited to 'channels')
-rwxr-xr-x | channels/chan_sip.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 97f5c6784..4895a1786 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 { |