]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
parse events and messages in channel_ready
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 27 Jun 2011 16:32:52 +0000 (11:32 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 27 Jun 2011 16:32:52 +0000 (11:32 -0500)
src/switch_channel.c

index 38f177234ec105823433f28d67a865b3ed8f1470..f236014887e5d715c17b1e583de15d746dcbd030 100644 (file)
@@ -1693,8 +1693,6 @@ SWITCH_DECLARE(int) switch_channel_test_ready(switch_channel_t *channel, switch_
 
        switch_assert(channel != NULL);
 
-       switch_ivr_parse_all_messages(channel->session);
-
        if (check_media) {
                ret = ((switch_channel_test_flag(channel, CF_ANSWERED) ||
                                switch_channel_test_flag(channel, CF_EARLY_MEDIA)) && !switch_channel_test_flag(channel, CF_PROXY_MODE) &&
@@ -1716,6 +1714,10 @@ SWITCH_DECLARE(int) switch_channel_test_ready(switch_channel_t *channel, switch_
                ret++;
        }
 
+       if (ret) {
+               switch_ivr_parse_all_events(channel->session);
+       }
+
        return ret;
 }