From 8712f62cedb7634629f378b8d4d5a14bc132b974 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 16 Sep 2015 18:07:44 -0500 Subject: [PATCH] FS-8175 #resolve [Add continue_on_answer_timeout variable to allow channel to proceed from a tripped answer timeout] --- src/switch_ivr_bridge.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/switch_ivr_bridge.c b/src/switch_ivr_bridge.c index cba4b2a725..e25fff1bf5 100644 --- a/src/switch_ivr_bridge.c +++ b/src/switch_ivr_bridge.c @@ -599,7 +599,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)) {