add sip-forbid-register to user params to refuse to let a certian user register

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9284 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-08-12 18:28:13 +00:00
parent dafff282da
commit b60ff4d1cd

View File

@ -1273,6 +1273,11 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile, sip_authorization_t co
const char *var = switch_xml_attr_soft(param, "name");
const char *val = switch_xml_attr_soft(param, "value");
if (!strcasecmp(var, "sip-forbid-register") && switch_true(val)) {
ret = AUTH_FORBIDDEN;
goto end;
}
if (!strcasecmp(var, "password")) {
passwd = val;
}
@ -1292,6 +1297,11 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile, sip_authorization_t co
const char *var = switch_xml_attr_soft(param, "name");
const char *val = switch_xml_attr_soft(param, "value");
if (!strcasecmp(var, "sip-forbid-register") && switch_true(val)) {
ret = AUTH_FORBIDDEN;
goto end;
}
if (!strcasecmp(var, "password")) {
passwd = val;
}