提交 d0de8c0b authored 作者: Anthony Minessale's avatar Anthony Minessale

add heartbeat_use_scheduler variable to force the heartbeat to use the scheduler…

add heartbeat_use_scheduler variable to force the heartbeat to use the scheduler rather than the media stream and also make it auto-chage between modes when going in and out of the media path
上级 cc928b23
......@@ -7742,6 +7742,13 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_receive_message(switch_core_se
}
goto end;
case SWITCH_MESSAGE_INDICATE_MEDIA:
{
if (session->track_duration) {
switch_core_session_enable_heartbeat(session, session->track_duration);
}
}
break;
case SWITCH_MESSAGE_INDICATE_NOMEDIA:
{
const char *uuid;
......@@ -7781,6 +7788,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_receive_message(switch_core_se
switch_core_media_absorb_sdp(session);
}
if (session->track_duration) {
switch_core_session_enable_heartbeat(session, session->track_duration);
}
}
break;
......
......@@ -1541,6 +1541,7 @@ 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) ||
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",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论