From: Olle Johansson Date: Fri, 10 Nov 2006 20:46:25 +0000 (+0000) Subject: Clear dialog on loop (backport from 1.4 by mistake) X-Git-Tag: 1.2.14~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=474abf46562192647d559569825f5f8b5a16ed01;p=thirdparty%2Fasterisk.git Clear dialog on loop (backport from 1.4 by mistake) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47470 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index a3b8af2e5a..c2a05bdeb5 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -10518,8 +10518,9 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int /* This is a call to ourself. Send ourselves an error code and stop processing immediately, as SIP really has no good mechanism for being able to call yourself */ - transmit_response(p, "482 Loop Detected", req); - /* We do NOT destroy p here, so that our response will be accepted */ + transmit_response_reliable(p, "482 Loop Detected", req, 1); + if (!p->lastinvite) + ast_set_flag(p, SIP_NEEDDESTROY); return 0; } if (!ignore) {