提交 9e4ca2c2 authored 作者: Anthony Minessale's avatar Anthony Minessale

only require user and pass in gateway when register is true

上级 9e094835
...@@ -2416,6 +2416,7 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag) ...@@ -2416,6 +2416,7 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag)
} }
} }
if (switch_true(register_str)) {
if (zstr(username)) { if (zstr(username)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERROR: username param is REQUIRED!\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERROR: username param is REQUIRED!\n");
goto skip; goto skip;
...@@ -2425,6 +2426,7 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag) ...@@ -2425,6 +2426,7 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERROR: password param is REQUIRED!\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERROR: password param is REQUIRED!\n");
goto skip; goto skip;
} }
}
if (zstr(from_user)) { if (zstr(from_user)) {
from_user = username; from_user = username;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论