mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-05 18:13:27 +00:00
FS-6287 this should either prevent the problem or spell out what is causing it. please test
This commit is contained in:
parent
b0d7ee2f86
commit
a22deb92d1
@ -2167,7 +2167,14 @@ void sofia_reg_handle_sip_r_challenge(int status,
|
|||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Missing Authenticate Header!\n");
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Missing Authenticate Header!\n");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
scheme = (char const *) authenticate->au_scheme;
|
scheme = (char const *) authenticate->au_scheme;
|
||||||
|
|
||||||
|
if (zstr(scheme)) {
|
||||||
|
scheme = "Digest";
|
||||||
|
}
|
||||||
|
|
||||||
if (authenticate->au_params) {
|
if (authenticate->au_params) {
|
||||||
for (indexnum = 0; (cur = (char *) authenticate->au_params[indexnum]); indexnum++) {
|
for (indexnum = 0; (cur = (char *) authenticate->au_params[indexnum]); indexnum++) {
|
||||||
if ((realm = strstr(cur, "realm="))) {
|
if ((realm = strstr(cur, "realm="))) {
|
||||||
@ -2175,6 +2182,18 @@ void sofia_reg_handle_sip_r_challenge(int status,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (zstr(realm)) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Realm: [%s] is invalid\n", switch_str_nil(realm));
|
||||||
|
|
||||||
|
for (indexnum = 0; (cur = (char *) authenticate->au_params[indexnum]); indexnum++) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "DUMP: [%s]\n", cur);
|
||||||
|
}
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "NO AUTHENTICATE PARAMS\n");
|
||||||
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gateway) {
|
if (!gateway) {
|
||||||
@ -2243,11 +2262,6 @@ void sofia_reg_handle_sip_r_challenge(int status,
|
|||||||
switch_event_destroy(&locate_params);
|
switch_event_destroy(&locate_params);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(scheme && realm)) {
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No scheme and realm!\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sip_auth_username && sip_auth_password) {
|
if (sip_auth_username && sip_auth_password) {
|
||||||
switch_snprintf(authentication, sizeof(authentication), "%s:%s:%s:%s", scheme, realm, sip_auth_username, sip_auth_password);
|
switch_snprintf(authentication, sizeof(authentication), "%s:%s:%s:%s", scheme, realm, sip_auth_username, sip_auth_password);
|
||||||
} else if (gateway) {
|
} else if (gateway) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user