提交 fc4260a9 authored 作者: Michael Jerris's avatar Michael Jerris

add vm-a1-hash param to override the a1-hash for voicemail

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10088 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 64f4e98e
...@@ -1583,7 +1583,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro ...@@ -1583,7 +1583,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
switch_xml_t x_domain = NULL, x_domain_root = NULL, x_user = NULL, x_params, x_param; switch_xml_t x_domain = NULL, x_domain_root = NULL, x_user = NULL, x_params, x_param;
switch_status_t status; switch_status_t status;
char pass_buf[80] = "", *mypass = NULL, id_buf[80] = "", *myfolder = NULL; char pass_buf[80] = "", *mypass = NULL, id_buf[80] = "", *myfolder = NULL;
const char *thepass = NULL, *myid = id, *actual_id = NULL, *thehash = NULL; const char *thepass = NULL, *myid = id, *actual_id = NULL, *thehash = NULL, *vmhash = NULL;
char term = 0; char term = 0;
uint32_t timeout, attempts = 0; uint32_t timeout, attempts = 0;
int failed = 0; int failed = 0;
...@@ -1981,6 +1981,8 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro ...@@ -1981,6 +1981,8 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
if (!strcasecmp(var, "a1-hash")) { if (!strcasecmp(var, "a1-hash")) {
thehash = val; thehash = val;
} else if (!strcasecmp(var, "vm-a1-hash")) {
vmhash = val;
} else if (!strcasecmp(var, "password")) { } else if (!strcasecmp(var, "password")) {
thepass = val; thepass = val;
} else if (!strcasecmp(var, "vm-password")) { } else if (!strcasecmp(var, "vm-password")) {
...@@ -1993,6 +1995,10 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro ...@@ -1993,6 +1995,10 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
thepass = cbt.password; thepass = cbt.password;
} }
} }
if (vmhash) {
thehash = vmhash;
}
if (!auth) { if (!auth) {
if (!switch_strlen_zero(cbt.password) && !strcmp(cbt.password, mypass)) { if (!switch_strlen_zero(cbt.password) && !strcmp(cbt.password, mypass)) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论