git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7099 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-01-05 17:32:13 +00:00
parent f9fb469ae2
commit 698b1b1b56
5 changed files with 11 additions and 7 deletions

View File

@ -629,6 +629,7 @@ CF_VIDEO = (1 << 22) - Channel has video
CF_EVENT_LOCK = (1 << 23) - Don't parse events
CF_RESET = (1 << 24) - Tell extension parser to reset
CF_ORIGINATING = (1 << 25) - Channel is originating
CF_STOP_BROADCAST = (1 << 26) - Signal to stop broadcast
</pre>
*/
@ -658,7 +659,8 @@ typedef enum {
CF_VIDEO = (1 << 22),
CF_EVENT_LOCK = (1 << 23),
CF_RESET = (1 << 24),
CF_ORIGINATING = (1 << 25)
CF_ORIGINATING = (1 << 25),
CF_STOP_BROADCAST = (1 << 26),
} switch_channel_flag_t;

View File

@ -414,7 +414,7 @@ SWITCH_STANDARD_APP(fifo_function)
if (switch_channel_test_flag(other_channel, CF_TAGGED)) {
switch_channel_clear_flag(other_channel, CF_CONTROLLED);
switch_channel_clear_flag(other_channel, CF_BROADCAST);
switch_channel_set_flag(other_channel, CF_STOP_BROADCAST);
switch_channel_set_flag(other_channel, CF_BREAK);
switch_core_session_kill_channel(other_session, SWITCH_SIG_BREAK);
while (switch_channel_test_flag(other_channel, CF_TAGGED)) {

View File

@ -1224,7 +1224,7 @@ SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_hangup(switch_chan
}
switch_set_flag(channel, CF_BREAK);
switch_clear_flag(channel, CF_BROADCAST);
switch_set_flag(channel, CF_STOP_BROADCAST);
if (channel->state < CS_HANGUP) {
switch_event_t *event;

View File

@ -315,11 +315,13 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
if ((application_interface = switch_loadable_module_get_application_interface(app_name))) {
if (application_interface->application_function) {
int x;
switch_channel_clear_flag(channel, CF_STOP_BROADCAST);
switch_channel_set_flag(channel, CF_BROADCAST);
for (x = 0; x < loops || loops < 0; x++) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Command Execute %s(%s)\n", app_name, app_arg);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Command Execute %s(%s)\n",
switch_channel_get_name(channel), app_name, app_arg);
switch_core_session_exec(session, application_interface, app_arg);
if (!switch_channel_ready(channel) || !switch_channel_test_flag(channel, CF_BROADCAST)) {
if (!switch_channel_ready(channel) || switch_channel_test_flag(channel, CF_STOP_BROADCAST)) {
break;
}
}

View File

@ -222,8 +222,8 @@ static void *audio_bridge_thread(switch_thread_t * thread, void *obj)
end:
switch_core_session_kill_channel(session_b, SWITCH_SIG_BREAK);
//switch_channel_clear_flag(chan_b, CF_BROADCAST);
//switch_channel_set_flag(chan_b, CF_BREAK);
switch_channel_set_flag(chan_b, CF_STOP_BROADCAST);
switch_channel_set_flag(chan_b, CF_BREAK);
switch_core_session_reset(session_a);
switch_channel_set_variable(chan_a, SWITCH_BRIDGE_VARIABLE, NULL);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "BRIDGE THREAD DONE [%s]\n", switch_channel_get_name(chan_a));