]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
move originate retry related vars to only be in {} not in channel variable list
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 4 May 2009 14:09:32 +0000 (14:09 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 4 May 2009 14:09:32 +0000 (14:09 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13225 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_originate.c

index c2a4c18eb8446fc2b1cc9f920f44683715895338..06f71cae5d43aca81d85f1210123482699f0b8c0 100644 (file)
@@ -1048,14 +1048,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                                        ok = 1;
                                } else if (!strcasecmp((char *) hi->name, "instant_ringback")) {
                                        ok = 1;
-                               } else if (!strcasecmp((char *) hi->name, "originate_retries")) {
-                                       ok = 1;
-                               } else if (!strcasecmp((char *) hi->name, "originate_timeout")) {
-                                       ok = 1;
                                } else if (!strcasecmp((char *) hi->name, "progress_timeout")) {
                                        ok = 1;
-                               } else if (!strcasecmp((char *) hi->name, "originate_retry_sleep_ms")) {
-                                       ok = 1;
                                }
 
                                if (ok) {
@@ -1286,6 +1280,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Originate attempt %d/%d in %d ms\n", try + 1, retries, sleep_ms);
                                if (caller_channel) {
                                        switch_ivr_sleep(oglobals.session, sleep_ms, SWITCH_TRUE, NULL);
+                                       if (!switch_channel_ready(caller_channel)) {
+                                               status = SWITCH_STATUS_FALSE;
+                                               goto done;
+                                       }
                                } else {
                                        switch_yield(sleep_ms * 1000);
                                }