From 79bd731c0db3e3202cfeed2af3fb217ae744b70f Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sat, 29 Sep 2018 21:22:21 +0200 Subject: [PATCH 1/1] SIP: Fix incoming re-invite --- sip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sip.cpp b/sip.cpp index 3bd4fdf..43922fa 100644 --- a/sip.cpp +++ b/sip.cpp @@ -1851,7 +1851,7 @@ void Psip::i_invite(int status, char const *phrase, nua_t *nua, nua_magic_t *mag PDEBUG(DEBUG_SIP, "invite received (%s->%s)\n", from, to); sip_trace_header(this, inst->interface_name, "Authorization", DIRECTION_IN); - if (inst->auth_realm[0] || p_state != PORT_STATE_IDLE) { + if (inst->auth_realm[0] && p_state == PORT_STATE_IDLE) { /* only authenticate remote, if we have a realm set and we don't have re-invite */ authorization = sip->sip_proxy_authorization; status = check_authorization(authorization, "INVITE", inst->auth_user, inst->auth_password, inst->auth_realm, inst->auth_nonce, &auth_text); -- 2.13.6