]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8175 #resolve [Add continue_on_answer_timeout variable to allow channel to proceed...
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 16 Sep 2015 23:07:44 +0000 (18:07 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 16 Sep 2015 23:14:42 +0000 (18:14 -0500)
src/switch_ivr_bridge.c

index 0b78e02200b9ab889a8f4f8e44ca1e8a9242e4d2..d078810f56d8d2ab188ad6af244382ea725656fa 100644 (file)
@@ -486,7 +486,12 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
 
                if (!switch_channel_test_flag(chan_a, CF_ANSWERED) && answer_limit && switch_epoch_time_now(NULL) > answer_limit) {
                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session_a), SWITCH_LOG_DEBUG, "Answer timeout hit on %s.\n", switch_channel_get_name(chan_a));
-                       switch_channel_hangup(chan_a, SWITCH_CAUSE_ALLOTTED_TIMEOUT);
+                       if (switch_true(switch_channel_get_variable_dup(chan_a, "continue_on_answer_timeout", SWITCH_FALSE, -1))) {
+                               data->clean_exit = 1;
+                               goto end_of_bridge_loop;
+                       } else {
+                               switch_channel_hangup(chan_a, SWITCH_CAUSE_ALLOTTED_TIMEOUT);
+                       }
                }
 
                if (!switch_channel_test_flag(chan_a, CF_ANSWERED)) {