small fix to dtmf handling in ivr menus
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4119 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
e8e851731e
commit
ad494c1c29
|
@ -4121,6 +4121,7 @@ static switch_status_t play_or_say(switch_core_session_t *session, switch_ivr_me
|
||||||
uint32_t len;
|
uint32_t len;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
switch_status_t status = SWITCH_STATUS_FALSE;
|
switch_status_t status = SWITCH_STATUS_FALSE;
|
||||||
|
switch_input_args_t args= {0};
|
||||||
|
|
||||||
if (session != NULL && menu != NULL && !switch_strlen_zero(sound)) {
|
if (session != NULL && menu != NULL && !switch_strlen_zero(sound)) {
|
||||||
memset(menu->buf, 0, menu->inlen);
|
memset(menu->buf, 0, menu->inlen);
|
||||||
|
@ -4133,17 +4134,13 @@ static switch_status_t play_or_say(switch_core_session_t *session, switch_ivr_me
|
||||||
len = menu->inlen;
|
len = menu->inlen;
|
||||||
ptr = menu->ptr;
|
ptr = menu->ptr;
|
||||||
}
|
}
|
||||||
|
args.buf = ptr;
|
||||||
|
args.buflen = len;
|
||||||
|
|
||||||
if (*sound == '/' || *sound == '\\') {
|
if (*sound == '/' || *sound == '\\') {
|
||||||
switch_input_args_t args = {0};
|
|
||||||
args.buf = ptr;
|
|
||||||
args.buflen = need ? 1 : 0;
|
|
||||||
status = switch_ivr_play_file(session, NULL, sound, &args);
|
status = switch_ivr_play_file(session, NULL, sound, &args);
|
||||||
} else {
|
} else {
|
||||||
if (menu->tts_engine && menu->tts_voice) {
|
if (menu->tts_engine && menu->tts_voice) {
|
||||||
switch_input_args_t args = {0};
|
|
||||||
args.buf = ptr;
|
|
||||||
args.buflen = len;
|
|
||||||
status = switch_ivr_speak_text(session, menu->tts_engine, menu->tts_voice, 0, sound, &args);
|
status = switch_ivr_speak_text(session, menu->tts_engine, menu->tts_voice, 0, sound, &args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue