]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
do not include Expires header in INVITES responding to a auth challenge
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 3 Apr 2012 17:37:52 +0000 (12:37 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 3 Apr 2012 17:37:52 +0000 (12:37 -0500)
src/mod/endpoints/mod_sofia/sofia_reg.c

index 56f7ef7b00c9d77d90a8b0640deed46935f784fd..7b85161da32366f4570ff083f9366fdda9dc072a 100644 (file)
@@ -2101,7 +2101,8 @@ void sofia_reg_handle_sip_r_challenge(int status,
        } else if (gateway) {
                switch_snprintf(authentication, sizeof(authentication), "%s:%s:%s:%s", scheme, realm, gateway->auth_username, gateway->register_password);
        } else {
-               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot locate any authentication credentials to complete an authentication request for realm '%s'\n", realm);
+               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, 
+                                                 "Cannot locate any authentication credentials to complete an authentication request for realm '%s'\n", realm);
                goto cancel;
        }
 
@@ -2114,7 +2115,9 @@ void sofia_reg_handle_sip_r_challenge(int status,
 
        tl_gets(tags, NUTAG_CALLSTATE_REF(ss_state), SIPTAG_WWW_AUTHENTICATE_REF(authenticate), TAG_END());
 
-       nua_authenticate(nh, SIPTAG_EXPIRES_STR(gateway ? gateway->expires_str : "3600"), NUTAG_AUTH(authentication), TAG_END());
+       nua_authenticate(nh, 
+                                        TAG_IF(sofia_private && sofia_private->gateway, SIPTAG_EXPIRES_STR(gateway ? gateway->expires_str : "3600")), 
+                                        NUTAG_AUTH(authentication), TAG_END());
 
        goto end;