mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-05 18:13:27 +00:00
Merge pull request #1786 in FS/freeswitch from ~LAZEDO/freeswitch:feature/FS-11982 to master
* commit '88448ebfba4e8e027d86c66ae0c1872b4babc7c8': FS-11982 [mod_kazoo] add expand-headers-on-fetch
This commit is contained in:
commit
e5b4776218
src/mod/event_handlers/mod_kazoo
@ -205,6 +205,7 @@ struct globals_s {
|
|||||||
|
|
||||||
int legacy_events;
|
int legacy_events;
|
||||||
uint8_t tweaks[KZ_TWEAK_MAX];
|
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")) {
|
} else if (!strcmp(var, "legacy-events")) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Set legacy-events: %s\n", val);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Set legacy-events: %s\n", val);
|
||||||
kazoo_globals.legacy_events = switch_true(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?! */
|
/* after all that did we get what we were after?! */
|
||||||
if (reply.xml_str) {
|
if (reply.xml_str) {
|
||||||
/* HELL YA WE DID */
|
/* HELL YA WE DID */
|
||||||
reply.xml_str = expand_vars(reply.xml_str);
|
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"
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Received %s XML (%s) after %dms: %s\n"
|
||||||
,section
|
,section
|
||||||
,reply.uuid_str
|
,reply.uuid_str
|
||||||
|
Loading…
x
Reference in New Issue
Block a user