Two ways for forcing SIP username to be the same as the auth username - i.e. locking a user to an extension (MODENDP-68)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7188 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2008-01-12 19:15:05 +00:00
parent 26d213213b
commit daea564f9b
3 changed files with 32 additions and 7 deletions
+5 -1
View File
@@ -194,7 +194,7 @@ void sofia_event_callback(nua_event_t event,
char network_ip[80];
get_addr(network_ip, sizeof(network_ip), &((struct sockaddr_in *) msg_addrinfo(nua_current_request(nua))->ai_addr)->sin_addr);
auth_res = sofia_reg_parse_auth(profile, authorization,
(char *) sip->sip_request->rq_method_name, tech_pvt->key, strlen(tech_pvt->key), network_ip, NULL, 0);
(char *) sip->sip_request->rq_method_name, tech_pvt->key, strlen(tech_pvt->key), network_ip, NULL, 0, REG_INVITE, NULL);
}
if (auth_res != AUTH_OK) {
@@ -1057,6 +1057,10 @@ switch_status_t config_sofia(int reload, char *profile_name)
if (switch_true(val)) {
profile->pflags |= PFLAG_FULL_ID;
}
} else if (!strcasecmp(var, "inbound-reg-force-matching-username")) {
if (switch_true(val)) {
profile->pflags |= PFLAG_CHECKUSER;
}
} else if (!strcasecmp(var, "bitpacking")) {
if (!strcasecmp(val, "aal2")) {
profile->codec_flags = SWITCH_CODEC_FLAG_AAL2;