]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fire events on bridge in fifo
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 26 Mar 2009 15:07:44 +0000 (15:07 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 26 Mar 2009 15:07:44 +0000 (15:07 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12791 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_fifo/mod_fifo.c

index 6c706e390fd43f942c7efcec6626fbe2b016c67c..171e803e8a72e8fc4eeb73860d3d1168fa540384 100644 (file)
@@ -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);