mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
add a mechanism to tell if a file played from sendmsg over event socket for the guy on the mailing list
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10653 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -1306,9 +1306,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
|
||||
}
|
||||
}
|
||||
|
||||
switch_channel_set_variable(channel, "current_application", application_interface->interface_name);
|
||||
switch_channel_set_variable(channel, "current_application_data", arg);
|
||||
|
||||
switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_VARIABLE, application_interface->interface_name);
|
||||
switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_DATA_VARIABLE, arg);
|
||||
switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, NULL);
|
||||
|
||||
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_EXECUTE) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_channel_event_set_data(session->channel, event);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application", application_interface->interface_name);
|
||||
@@ -1325,9 +1326,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
|
||||
application_interface->application_function(session, arg);
|
||||
|
||||
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_EXECUTE_COMPLETE) == SWITCH_STATUS_SUCCESS) {
|
||||
const char *resp = switch_channel_get_variable(session->channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE);
|
||||
switch_channel_event_set_data(session->channel, event);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application", application_interface->interface_name);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application-Data", arg);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application-Response", resp ? resp : "_none_");
|
||||
switch_event_fire(&event);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user