mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 08:05:37 +00:00
[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:
parent
452f153d1b
commit
1d5a764323
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user