diff --git a/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c b/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c index a8b1c91110..1af7a29da9 100644 --- a/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c +++ b/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c @@ -176,6 +176,11 @@ static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, con switch_assert(data); if (binding->use_dynamic_url) { + if (!params) { + switch_event_create(¶ms, SWITCH_EVENT_REQUEST_PARAMS); + switch_assert(params); + } + switch_event_add_header_string(params, SWITCH_STACK_TOP, "hostname", hostname); switch_event_add_header_string(params, SWITCH_STACK_TOP, "section", switch_str_nil(section)); switch_event_add_header_string(params, SWITCH_STACK_TOP, "tag_name", switch_str_nil(tag_name));