mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-13 04:57:05 +00:00
Add events around all application execution:
fire SWITCH_EVEHT_CHANNEL_EXECUTE <execute app> fire SWITCH_EVEHT_CHANNEL_EXECUTE_COMPLETE This can be used in async socket connections to tell when a queued application has finished executing. Add the "event" application to the dialplan: <action application="event" data="header1=val1,header2=val2"/> Events fired from this applcation will always have the type SWITCH_EVENT_CHANNEL_APPLICATION. You can add up to 25 headers of your own to the event via the application arguements. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5448 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
c43c080fa3
commit
a039d870c3
6 files changed
+72
-11
No files matched your search
@@ -108,7 +108,6 @@ static void switch_core_standard_on_ring(switch_core_session_t *session)
|
||||
static void switch_core_standard_on_execute(switch_core_session_t *session)
|
||||
{
|
||||
switch_caller_extension_t *extension;
|
||||
switch_event_t *event;
|
||||
const switch_application_interface_t *application_interface;
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Standard EXECUTE\n");
|
||||
@@ -149,15 +148,6 @@ static void switch_core_standard_on_execute(switch_core_session_t *session)
|
||||
expanded);
|
||||
}
|
||||
|
||||
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_EXECUTE) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_channel_event_set_data(session->channel, event);
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Application", "%s", extension->current_application->application_name);
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Application-Data-Orig", "%s", extension->current_application->application_data);
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Application-Data", "%s", expanded);
|
||||
switch_event_fire(&event);
|
||||
}
|
||||
|
||||
|
||||
if (switch_channel_get_variable(session->channel, "presence_id")) {
|
||||
char *arg = switch_mprintf("%s(%s)", extension->current_application->application_name, expanded);
|
||||
if (arg) {
|
||||
|
||||
Reference in new issue
Block a user