FS-6513 --resolve This function was assuming the app was being run with execute_on_media so it did not properly check for established media. Now it will use the scheduler method automatically when this state is detected.
This commit is contained in:
parent
eb923bbd2d
commit
50dfce2845
|
@ -1547,11 +1547,11 @@ SWITCH_DECLARE(void) switch_core_session_enable_heartbeat(switch_core_session_t
|
|||
|
||||
session->track_duration = seconds;
|
||||
|
||||
if (switch_channel_test_flag(session->channel, CF_PROXY_MODE) ||
|
||||
if (switch_channel_test_flag(session->channel, CF_PROXY_MODE) || !switch_channel_media_ready(session->channel) ||
|
||||
switch_true(switch_channel_get_variable_dup(session->channel, "heartbeat_use_scheduler", SWITCH_FALSE, -1)) ||
|
||||
switch_true(switch_channel_get_variable_dup(session->channel, "bypass_media", SWITCH_FALSE, -1)) ||
|
||||
switch_true(switch_channel_get_variable_dup(session->channel, "bypass_media_after_bridge", SWITCH_FALSE, -1))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "%s using scheduler due to bypass_media mode\n",
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "%s using scheduler due to bypass media or media is not established.\n",
|
||||
switch_channel_get_name(session->channel));
|
||||
switch_core_session_sched_heartbeat(session, seconds);
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue