From: Olle Johansson Date: Wed, 27 Dec 2006 16:12:21 +0000 (+0000) Subject: Issue 8599 (rizzo) Change invitestate before re-sending invite with auth. X-Git-Tag: 1.4.1~380 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4ea530f2dc368e9f8140203930f6832754640c96;p=thirdparty%2Fasterisk.git Issue 8599 (rizzo) Change invitestate before re-sending invite with auth. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48977 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 7c832841f1..7c19440e92 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11718,6 +11718,8 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru if (!ast_test_flag(req, SIP_PKT_IGNORE)) { char *authenticate = (resp == 401 ? "WWW-Authenticate" : "Proxy-Authenticate"); char *authorization = (resp == 401 ? "Authorization" : "Proxy-Authorization"); + if (p->authtries < MAX_AUTHTRIES) + p->invitestate = INV_CALLING; if ((p->authtries == MAX_AUTHTRIES) || do_proxy_auth(p, req, authenticate, authorization, SIP_INVITE, 1)) { ast_log(LOG_NOTICE, "Failed to authenticate on INVITE to '%s'\n", get_header(&p->initreq, "From")); ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);