mod_directory: Add variable directory_search_order to allow to search by first…

mod_directory: Add variable directory_search_order to allow to search by first name by default is set to "first_name"
上级 f9d44d3b
......@@ -884,6 +884,18 @@ SWITCH_STANDARD_APP(directory_function)
if (strcasecmp(profile->search_order, "last_name")) {
s_param.search_by_last_name = 0;
}
{
const char *var_search_order = switch_channel_get_variable(channel, "directory_search_order");
if (var_search_order) {
if (!strcasecmp(var_search_order, "first_name")) {
s_param.search_by_last_name = 0;
} else {
s_param.search_by_last_name = 1;
}
}
}
attempts = profile->max_menu_attempt;
s_param.try_again = 1;
while (switch_channel_ready(channel) && (s_param.try_again && attempts-- > 0)) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论