提交 b60ff4d1 authored 作者: Anthony Minessale's avatar Anthony Minessale

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
上级 dafff282
...@@ -1273,6 +1273,11 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile, sip_authorization_t co ...@@ -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 *var = switch_xml_attr_soft(param, "name");
const char *val = switch_xml_attr_soft(param, "value"); 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")) { if (!strcasecmp(var, "password")) {
passwd = val; passwd = val;
} }
...@@ -1292,6 +1297,11 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile, sip_authorization_t co ...@@ -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 *var = switch_xml_attr_soft(param, "name");
const char *val = switch_xml_attr_soft(param, "value"); 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")) { if (!strcasecmp(var, "password")) {
passwd = val; passwd = val;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论