mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-01 11:02:53 +00:00
allow chatplan apps to have null args
This commit is contained in:
parent
23c981df68
commit
4feb26d3e8
@ -194,7 +194,7 @@ static int parse_exten(switch_event_t *event, switch_xml_t xexten, switch_event_
|
|||||||
if (xinline) {
|
if (xinline) {
|
||||||
switch_core_execute_chat_app(event, application, data);
|
switch_core_execute_chat_app(event, application, data);
|
||||||
} else {
|
} 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;
|
proceed = 1;
|
||||||
@ -251,7 +251,7 @@ static int parse_exten(switch_event_t *event, switch_xml_t xexten, switch_event_
|
|||||||
if (xinline) {
|
if (xinline) {
|
||||||
switch_core_execute_chat_app(event, application, app_data);
|
switch_core_execute_chat_app(event, application, app_data);
|
||||||
} else {
|
} 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_safe_free(substituted);
|
||||||
|
@ -706,6 +706,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_execute_chat_app(switch_event_t *mes
|
|||||||
switch_goto_status(SWITCH_STATUS_FALSE, end);
|
switch_goto_status(SWITCH_STATUS_FALSE, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data && !strcmp(data, "__undef")) {
|
||||||
|
data = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
expanded = switch_event_expand_headers(message, data);
|
expanded = switch_event_expand_headers(message, data);
|
||||||
|
|
||||||
status = cai->chat_application_function(message, expanded);
|
status = cai->chat_application_function(message, expanded);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user