]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11970 [core] Check if detection is done in switch_ivr_play_and_detect_speech(...
authorChris Rienzo <chris@signalwire.com>
Tue, 30 Jul 2019 03:01:37 +0000 (03:01 +0000)
committerChris Rienzo <chris@signalwire.com>
Tue, 30 Jul 2019 03:08:15 +0000 (23:08 -0400)
src/switch_ivr_async.c

index e898cf393ede5d7a9d37f33260bd029da757f2d7..bb629e9af2cc28e3dd2862ee4b55f47b63635389 100644 (file)
@@ -4593,7 +4593,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_and_detect_speech(switch_core_se
        if (!state.done) {
                switch_ivr_detect_speech_start_input_timers(session);
                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "(%s) WAITING FOR RESULT\n", switch_channel_get_name(channel));
-               while (switch_channel_ready(channel)) {
+               while (!state.done && switch_channel_ready(channel)) {
                        status = switch_ivr_sleep(session, input_timeout, SWITCH_FALSE, args);
 
                        if (args->dmachine && switch_ivr_dmachine_last_ping(args->dmachine) != SWITCH_STATUS_SUCCESS) {