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

make previous auto hunt feature optional and off by defaule use auto_hunt=true…

make previous auto hunt feature optional and off by defaule use auto_hunt=true session or global variable to enable

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12144 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 4ecf8016
......@@ -215,8 +215,9 @@ SWITCH_STANDARD_DIALPLAN(dialplan_hunt)
{
switch_caller_extension_t *extension = NULL;
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_xml_t alt_root = NULL, cfg, xml = NULL, xcontext, xexten;
switch_xml_t alt_root = NULL, cfg, xml = NULL, xcontext, xexten = NULL;
char *alt_path = (char *) arg;
const char *hunt = NULL;
if (!caller_profile) {
if (!(caller_profile = switch_channel_get_caller_profile(channel))) {
......@@ -264,7 +265,11 @@ SWITCH_STANDARD_DIALPLAN(dialplan_hunt)
}
}
if (!(xexten = switch_xml_find_child(xcontext, "extension", "name", caller_profile->destination_number))) {
if ((hunt = switch_channel_get_variable(channel, "auto_hunt")) && switch_true(hunt)) {
xexten = switch_xml_find_child(xcontext, "extension", "name", caller_profile->destination_number);
}
if (!xexten) {
xexten = switch_xml_child(xcontext, "extension");
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论