From 4a2d0f011a76e1c452a13dbdf5321d44f4ce2428 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 4 Apr 2013 13:46:46 -0500 Subject: [PATCH] flush on answer for inbound only --- src/switch_channel.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/switch_channel.c b/src/switch_channel.c index bcb93c8b2a..64e58d0cfe 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -3249,6 +3249,7 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_pre_answer(switch_channel if (status == SWITCH_STATUS_SUCCESS) { switch_channel_perform_mark_pre_answered(channel, file, func, line); + switch_channel_audio_sync(channel); } else { switch_channel_hangup(channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION); } @@ -3520,6 +3521,9 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_answer(switch_channel_t * if (status == SWITCH_STATUS_SUCCESS) { switch_channel_perform_mark_answered(channel, file, func, line); + if (!switch_channel_test_flag(channel, CF_EARLY_MEDIA)) { + switch_channel_audio_sync(channel); + } } else { switch_channel_hangup(channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION); }