[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.

This commit is contained in:
Chris Rienzo 2020-04-17 23:09:40 +00:00 committed by Andrey Volk
parent 452f153d1b
commit 1d5a764323
2 changed files with 4 additions and 1 deletions

View File

@ -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;

View File

@ -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);