From 1d5a764323c48386b2e91115629cc11f44713630 Mon Sep 17 00:00:00 2001 From: Chris Rienzo Date: Fri, 17 Apr 2020 23:09:40 +0000 Subject: [PATCH] [core] Fix regression in play_and_collect_input and play_and_detect_speech - read_frame_callback and user_data from input args was not preserved. --- src/switch_ivr_async.c | 2 ++ src/switch_ivr_play_say.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index 95bdec7352..6d404fd5b4 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -4904,6 +4904,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_and_detect_speech(switch_core_se if (args) { state.original_args = args; myargs.dmachine = args->dmachine; + myargs.read_frame_callback = args->read_frame_callback; + myargs.user_data = args->user_data; } myargs.input_callback = play_and_detect_input_callback; diff --git a/src/switch_ivr_play_say.c b/src/switch_ivr_play_say.c index 49b5445b89..9f5574d39b 100644 --- a/src/switch_ivr_play_say.c +++ b/src/switch_ivr_play_say.c @@ -3467,13 +3467,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_and_collect_input(switch_core_se if (args) { state.original_args = args; myargs.dmachine = args->dmachine; + myargs.read_frame_callback = args->read_frame_callback; + myargs.user_data = args->user_data; } myargs.input_callback = switch_collect_input_callback; myargs.buf = &state; myargs.buflen = sizeof(state); - switch_set_flag(&state, SWITCH_COLLECT_INPUT_PROMPT); status = switch_ivr_play_file(session, NULL, prompt, &myargs); switch_clear_flag(&state, SWITCH_COLLECT_INPUT_PROMPT);