]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweaks to call setup code
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 3 Feb 2009 20:33:24 +0000 (20:33 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 3 Feb 2009 20:33:24 +0000 (20:33 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11616 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_channel.c
src/switch_ivr.c
src/switch_ivr_originate.c

index f5722bffe5f13168ac54a178df7fc1f62f53b9f8..e2ec5bb536df5de5c95fca43c07724a96db121d1 100644 (file)
@@ -1623,8 +1623,6 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_pre_answered(switch_
 {
        switch_event_t *event;
 
-       switch_channel_perform_mark_ring_ready(channel, file, func, line);
-
        if (!switch_channel_test_flag(channel, CF_EARLY_MEDIA)) {
                const char *uuid;
                switch_core_session_t *other_session;
index 73cd2db8491ddd198116ff7936bfa74f12bc7c8a..9edd2a1a618fe015cbee8d9fa7fefc74fdd15e29 100644 (file)
@@ -54,6 +54,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_sleep(switch_core_session_t *session,
        int sval = 0;
        const char *var;
 
+       /*
        if (!switch_channel_test_flag(channel, CF_OUTBOUND) && !switch_channel_test_flag(channel, CF_PROXY_MODE) && 
                !switch_channel_media_ready(channel) && !switch_channel_test_flag(channel, CF_SERVICE)) {
                if ((status = switch_channel_pre_answer(channel)) != SWITCH_STATUS_SUCCESS) {
@@ -61,6 +62,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_sleep(switch_core_session_t *session,
                        return SWITCH_STATUS_FALSE;
                }
        }
+       */
 
        if (!switch_channel_media_ready(channel)) {
                switch_yield(ms * 1000);
index c54b3314a7617cc1166620cb0c4b13938048dedd..c3adf54abfd333f205cd02b5173bbd6bcd6ec5ce 100644 (file)
@@ -216,7 +216,8 @@ static void launch_collect_thread(struct key_collect *collect)
        switch_thread_create(&thread, thd_attr, collect_thread_run, collect, switch_core_session_get_pool(collect->session));
 }
 
-static int check_per_channel_timeouts(originate_status_t *originate_status, 
+static int check_per_channel_timeouts(originate_global_t *oglobals,
+                                                                         originate_status_t *originate_status, 
                                                                          int max,
                                                                          time_t start)
 {
@@ -229,7 +230,7 @@ static int check_per_channel_timeouts(originate_status_t *originate_status,
                                !(
                                  switch_channel_test_flag(originate_status[i].peer_channel, CF_RING_READY) ||
                                  switch_channel_test_flag(originate_status[i].peer_channel, CF_ANSWERED) ||
-                                 switch_channel_test_flag(originate_status[i].peer_channel, CF_EARLY_MEDIA)
+                                 (!oglobals->monitor_early_media_ring && switch_channel_test_flag(originate_status[i].peer_channel, CF_EARLY_MEDIA))
                                  )
                                ) {
                                switch_channel_hangup(originate_status[i].peer_channel, SWITCH_CAUSE_PROGRESS_TIMEOUT);
@@ -445,7 +446,7 @@ static uint8_t check_channel_status(originate_global_t *oglobals, originate_stat
                                if (!oglobals->progress) {
                                        oglobals->progress = 1;
                                }
-                       
+                               
                                if (!oglobals->ring_ready && !oglobals->ignore_ring_ready) {
                                        oglobals->ring_ready = 1;
                                }
@@ -1533,7 +1534,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                                        switch_yield(100000);
                                }
 
-                               check_per_channel_timeouts(originate_status, and_argc, start);
+                               check_per_channel_timeouts(&oglobals, originate_status, and_argc, start);
 
 
                                if (valid_channels == 0) {
@@ -1662,7 +1663,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                                }
                                /* When the AND operator is being used, and fail_on_single_reject is set, a hangup indicates that the call should fail. */
                                
-                               check_per_channel_timeouts(originate_status, and_argc, start);
+                               check_per_channel_timeouts(&oglobals, originate_status, and_argc, start);
 
                                if (oglobals.session && switch_core_session_private_event_count(oglobals.session)) {
                                        switch_ivr_parse_all_events(oglobals.session);