git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8411 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-05-15 14:49:11 +00:00
parent a8365b8621
commit 42a54d19ae
3 changed files with 20 additions and 3 deletions

View File

@@ -321,7 +321,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
stream = switch_channel_get_variable(channel, SWITCH_HOLD_MUSIC_VARIABLE);
}
if (stream) {
if (stream && switch_is_moh(stream)) {
if ((b_session = switch_core_session_locate(b_uuid))) {
switch_channel_t *b_channel = switch_core_session_get_channel(b_session);
switch_ivr_broadcast(b_uuid, stream, SMF_ECHO_ALEG | SMF_LOOP);
@@ -334,10 +334,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
}
}
for (x = 0; x < loops || loops < 0; x++) {
switch_time_t b4, aftr;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Command Execute %s(%s)\n",
switch_channel_get_name(channel), app_name, app_arg);
b4 = switch_timestamp_now();
switch_core_session_exec(session, application_interface, app_arg);
if (!switch_channel_ready(channel) || switch_channel_test_flag(channel, CF_STOP_BROADCAST)) {
aftr = switch_timestamp_now();
if (!switch_channel_ready(channel) || switch_channel_test_flag(channel, CF_STOP_BROADCAST) || aftr - b4 < 500000) {
break;
}
}