From: Anthony Minessale Date: Thu, 26 Mar 2009 15:07:44 +0000 (+0000) Subject: fire events on bridge in fifo X-Git-Tag: v1.0.4~1375 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d51298bde963cbf4e3cebd787a5781e340ccdfd0;p=thirdparty%2Ffreeswitch.git fire events on bridge in fifo git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12791 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/applications/mod_fifo/mod_fifo.c b/src/mod/applications/mod_fifo/mod_fifo.c index 6c706e390f..171e803e8a 100644 --- a/src/mod/applications/mod_fifo/mod_fifo.c +++ b/src/mod/applications/mod_fifo/mod_fifo.c @@ -1255,6 +1255,18 @@ SWITCH_STANDARD_APP(fifo_function) switch_core_media_bug_resume(other_session); switch_process_import(session, other_channel, "fifo_caller_consumer_import"); switch_process_import(other_session, channel, "fifo_consumer_caller_import"); + if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, FIFO_EVENT) == SWITCH_STATUS_SUCCESS) { + switch_channel_event_set_data(channel, event); + switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Name", argv[0]); + switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "bridge-consumer"); + switch_event_fire(&event); + } + if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, FIFO_EVENT) == SWITCH_STATUS_SUCCESS) { + switch_channel_event_set_data(other_channel, event); + switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Name", argv[0]); + switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "bridge-caller"); + switch_event_fire(&event); + } switch_ivr_multi_threaded_bridge(session, other_session, on_dtmf, other_session, session); switch_core_media_bug_pause(session); switch_core_media_bug_pause(other_session);