]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
wait
authorAnthony Minessale <anthm@freeswitch.org>
Sun, 13 Mar 2011 23:43:23 +0000 (18:43 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Sun, 13 Mar 2011 23:43:34 +0000 (18:43 -0500)
src/switch_ivr_originate.c

index fe5edac504c22ce3a561564a2c0bfbf5eefd263b..c418d40e3644d50ca6d974c7efeab73f7400e103 100644 (file)
@@ -3613,6 +3613,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));
 
@@ -3622,7 +3624,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                                }
                        }
                }
-
+               
+               while(switch_channel_get_state(bchan) != switch_channel_get_running_state(bchan) && switch_channel_up(bchan)) switch_cond_next();
                switch_ivr_sleep(*bleg, 0, SWITCH_TRUE, NULL);
        }