From: Anthony Minessale Date: Tue, 27 Mar 2012 23:48:16 +0000 (-0500) Subject: add sync X-Git-Tag: v1.2-rc1~19^2^2~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c8ca5cfdb85032a67647dd22953721ef0c79e5f;p=thirdparty%2Ffreeswitch.git add sync --- diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index 5e715f0ab2..0337f1275b 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -3516,6 +3516,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess if (*bleg) { switch_channel_t *bchan = switch_core_session_get_channel(*bleg); + + if (session && caller_channel) { switch_caller_profile_t *cloned_profile, *peer_profile = switch_channel_get_caller_profile(switch_core_session_get_channel(*bleg)); @@ -3535,8 +3537,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess switch_cond_next(); } + switch_channel_audio_sync(bchan); - switch_ivr_sleep(*bleg, 0, SWITCH_TRUE, NULL); + if (caller_channel) { + switch_channel_audio_sync(caller_channel); + } } if (oglobals.session) {