提交 88448ebf authored 作者: lazedo's avatar lazedo

FS-11982 [mod_kazoo] add expand-headers-on-fetch

上级 54d957f1
......@@ -205,6 +205,7 @@ struct globals_s {
int legacy_events;
uint8_t tweaks[KZ_TWEAK_MAX];
switch_bool_t expand_headers_on_fetch;
};
......
......@@ -203,6 +203,9 @@ switch_status_t kazoo_ei_config(switch_xml_t cfg) {
} else if (!strcmp(var, "legacy-events")) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Set legacy-events: %s\n", val);
kazoo_globals.legacy_events = switch_true(val);
} else if (!strcmp(var, "expand-headers-on-fetch")) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Set expand-headers-on-fetch: %s\n", val);
kazoo_globals.expand_headers_on_fetch = switch_true(val);
}
}
}
......
......@@ -301,7 +301,9 @@ static switch_xml_t fetch_handler(const char *section, const char *tag_name, con
/* after all that did we get what we were after?! */
if (reply.xml_str) {
/* HELL YA WE DID */
if (kazoo_globals.expand_headers_on_fetch) {
reply.xml_str = expand_vars(reply.xml_str);
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Received %s XML (%s) after %dms: %s\n"
,section
,reply.uuid_str
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论