]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
parse private events during originate
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 8 Dec 2008 17:08:26 +0000 (17:08 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 8 Dec 2008 17:08:26 +0000 (17:08 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10655 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_originate.c

index 32b5d8a6a260afc33c84f7b31661275db2422466..7dddd462c615f68ac689e81f94f0a06f77c04707 100644 (file)
@@ -225,6 +225,10 @@ static uint8_t check_channel_status(switch_channel_t **peer_channels,
                        *progress = 1;
                }
 
+               if (switch_core_session_private_event_count(peer_sessions[i])) {
+                       switch_ivr_parse_all_events(peer_sessions[i]);
+               }
+
                state = switch_channel_get_state(peer_channels[i]);
                if (state >= CS_HANGUP || state == CS_RESET || switch_channel_test_flag(peer_channels[i], CF_TRANSFER) ||
                        switch_channel_test_flag(peer_channels[i], CF_REDIRECT) ||
@@ -1328,6 +1332,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                                
                                check_per_channel_timeouts(peer_channels, per_channel_timelimit_sec, per_channel_progress_timelimit_sec, and_argc, start);
 
+                               if (session && switch_core_session_private_event_count(session)) {
+                                       switch_ivr_parse_all_events(session);
+                               }
+
                                if (!sent_ring && !progress && (progress_timelimit_sec && elapsed > (time_t) progress_timelimit_sec)) {
                                        idx = IDX_TIMEOUT;
                                        goto notready;