[Freeswitch-trunk] [commit] r12791 - freeswitch/trunk/src/mod/applications/mod_fifo

FreeSWITCH SVN anthm at freeswitch.org
Thu Mar 26 08:07:44 PDT 2009


Author: anthm
Date: Thu Mar 26 10:07:44 2009
New Revision: 12791

Log:
fire events on bridge in fifo

Modified:
   freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c

Modified: freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c	Thu Mar 26 10:07:44 2009
@@ -1255,6 +1255,18 @@
 				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);



More information about the Freeswitch-trunk mailing list