if (xinline) {
switch_core_execute_chat_app(event, application, data);
} else {
- switch_event_add_header_string(*extension, SWITCH_STACK_BOTTOM, application, data);
+ switch_event_add_header_string(*extension, SWITCH_STACK_BOTTOM, application, zstr(data) ? "__undef" : data);
}
}
proceed = 1;
if (xinline) {
switch_core_execute_chat_app(event, application, app_data);
} else {
- switch_event_add_header_string(*extension, SWITCH_STACK_BOTTOM, application, data);
+ switch_event_add_header_string(*extension, SWITCH_STACK_BOTTOM, application, zstr(data) ? "__undef" : data);
}
}
switch_safe_free(substituted);
switch_goto_status(SWITCH_STATUS_FALSE, end);
}
+ if (data && !strcmp(data, "__undef")) {
+ data = NULL;
+ }
+
expanded = switch_event_expand_headers(message, data);
status = cai->chat_application_function(message, expanded);