提交 a5dbd265 authored 作者: Anthony Minessale's avatar Anthony Minessale 提交者: Ken Rice

fix some delay regressions

上级 b92560c5
...@@ -640,6 +640,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se ...@@ -640,6 +640,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
switch_channel_set_flag(channel, CF_BREAK); switch_channel_set_flag(channel, CF_BREAK);
} }
switch_channel_audio_sync(channel);
} }
} else if (cmd_hash == CMD_UNICAST) { } else if (cmd_hash == CMD_UNICAST) {
char *local_ip = switch_event_get_header(event, "local-ip"); char *local_ip = switch_event_get_header(event, "local-ip");
...@@ -1771,6 +1772,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_ ...@@ -1771,6 +1772,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_
switch_channel_set_caller_profile(channel, new_profile); switch_channel_set_caller_profile(channel, new_profile);
switch_channel_set_state(channel, CS_ROUTING); switch_channel_set_state(channel, CS_ROUTING);
switch_channel_audio_sync(channel);
msg.message_id = SWITCH_MESSAGE_INDICATE_TRANSFER; msg.message_id = SWITCH_MESSAGE_INDICATE_TRANSFER;
msg.from = __FILE__; msg.from = __FILE__;
......
...@@ -1232,8 +1232,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses ...@@ -1232,8 +1232,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
switch_channel_set_flag_recursive(caller_channel, CF_BRIDGE_ORIGINATOR); switch_channel_set_flag_recursive(caller_channel, CF_BRIDGE_ORIGINATOR);
switch_channel_clear_flag(peer_channel, CF_BRIDGE_ORIGINATOR); switch_channel_clear_flag(peer_channel, CF_BRIDGE_ORIGINATOR);
//switch_channel_audio_sync(caller_channel); switch_channel_audio_sync(caller_channel);
//switch_channel_audio_sync(peer_channel); switch_channel_audio_sync(peer_channel);
b_leg->session = peer_session; b_leg->session = peer_session;
switch_copy_string(b_leg->b_uuid, switch_core_session_get_uuid(session), sizeof(b_leg->b_uuid)); switch_copy_string(b_leg->b_uuid, switch_core_session_get_uuid(session), sizeof(b_leg->b_uuid));
......
...@@ -3707,11 +3707,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess ...@@ -3707,11 +3707,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
switch_cond_next(); switch_cond_next();
} }
//switch_channel_audio_sync(bchan); switch_channel_audio_sync(bchan);
//if (caller_channel) { if (caller_channel) {
// switch_channel_audio_sync(caller_channel); switch_channel_audio_sync(caller_channel);
//} }
} }
if (oglobals.session) { if (oglobals.session) {
......
...@@ -2072,7 +2072,7 @@ SWITCH_DECLARE(switch_rtp_t *) switch_rtp_new(const char *rx_host, ...@@ -2072,7 +2072,7 @@ SWITCH_DECLARE(switch_rtp_t *) switch_rtp_new(const char *rx_host,
rtp_session->ready = 2; rtp_session->ready = 2;
rtp_session->rx_host = switch_core_strdup(rtp_session->pool, rx_host); rtp_session->rx_host = switch_core_strdup(rtp_session->pool, rx_host);
rtp_session->rx_port = rx_port; rtp_session->rx_port = rx_port;
//switch_set_flag_locked(rtp_session, SWITCH_RTP_FLAG_FLUSH); switch_set_flag_locked(rtp_session, SWITCH_RTP_FLAG_FLUSH);
} else { } else {
switch_rtp_release_port(rx_host, rx_port); switch_rtp_release_port(rx_host, rx_port);
} }
...@@ -2763,7 +2763,8 @@ SWITCH_DECLARE(void) rtp_flush_read_buffer(switch_rtp_t *rtp_session, switch_rtp ...@@ -2763,7 +2763,8 @@ SWITCH_DECLARE(void) rtp_flush_read_buffer(switch_rtp_t *rtp_session, switch_rtp
if (!switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA) && if (!switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA) &&
!switch_test_flag(rtp_session, SWITCH_RTP_FLAG_VIDEO)) { !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_VIDEO)) {
switch_set_flag(rtp_session, SWITCH_RTP_FLAG_FLUSH);
switch (flush) { switch (flush) {
case SWITCH_RTP_FLUSH_STICK: case SWITCH_RTP_FLUSH_STICK:
switch_set_flag_locked(rtp_session, SWITCH_RTP_FLAG_STICKY_FLUSH); switch_set_flag_locked(rtp_session, SWITCH_RTP_FLAG_STICKY_FLUSH);
...@@ -2818,6 +2819,7 @@ static void do_flush(switch_rtp_t *rtp_session) ...@@ -2818,6 +2819,7 @@ static void do_flush(switch_rtp_t *rtp_session)
if (switch_rtp_ready(rtp_session)) { if (switch_rtp_ready(rtp_session)) {
bytes = sizeof(rtp_msg_t); bytes = sizeof(rtp_msg_t);
switch_socket_recvfrom(rtp_session->from_addr, rtp_session->sock_input, 0, (void *) &rtp_session->recv_msg, &bytes); switch_socket_recvfrom(rtp_session->from_addr, rtp_session->sock_input, 0, (void *) &rtp_session->recv_msg, &bytes);
if (bytes) { if (bytes) {
int do_cng = 0; int do_cng = 0;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论