mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-22 11:19:52 +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
a617d5857c
commit
cada5c37dc
@ -4904,6 +4904,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_and_detect_speech(switch_core_se
|
|||||||
if (args) {
|
if (args) {
|
||||||
state.original_args = args;
|
state.original_args = args;
|
||||||
myargs.dmachine = args->dmachine;
|
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;
|
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) {
|
if (args) {
|
||||||
state.original_args = args;
|
state.original_args = args;
|
||||||
myargs.dmachine = args->dmachine;
|
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.input_callback = switch_collect_input_callback;
|
||||||
myargs.buf = &state;
|
myargs.buf = &state;
|
||||||
myargs.buflen = sizeof(state);
|
myargs.buflen = sizeof(state);
|
||||||
|
|
||||||
|
|
||||||
switch_set_flag(&state, SWITCH_COLLECT_INPUT_PROMPT);
|
switch_set_flag(&state, SWITCH_COLLECT_INPUT_PROMPT);
|
||||||
status = switch_ivr_play_file(session, NULL, prompt, &myargs);
|
status = switch_ivr_play_file(session, NULL, prompt, &myargs);
|
||||||
switch_clear_flag(&state, SWITCH_COLLECT_INPUT_PROMPT);
|
switch_clear_flag(&state, SWITCH_COLLECT_INPUT_PROMPT);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user