fire events on bridge in fifo

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12791 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-03-26 15:07:44 +00:00
parent 07c2480ea4
commit d51298bde9
1 changed files with 12 additions and 0 deletions

View 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);