]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
flush on answer for inbound only
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 4 Apr 2013 18:46:46 +0000 (13:46 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 4 Apr 2013 18:46:46 +0000 (13:46 -0500)
src/switch_channel.c

index 60e69d083c862b1f3955bc4af3585c56d2466047..cea7d43c0d6c0cf9460fcbebc604205ec22e3c0e 100644 (file)
@@ -3263,6 +3263,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);
        }
@@ -3535,6 +3536,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);
        }