mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
Applications like SayAlpha() should not hang up the channel if you
request an "unknown" character such as a comma. Instead, skip the character and move on. Issue 10083, initial patch by jsmith, modified by me. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@77795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
34
main/say.c
34
main/say.c
@@ -124,14 +124,16 @@ static int say_character_str_full(struct ast_channel *chan, const char *str, con
|
||||
fnbuf[8] = ltr;
|
||||
fn = fnbuf;
|
||||
}
|
||||
res = ast_streamfile(chan, fn, lang);
|
||||
if (!res) {
|
||||
if ((audiofd > -1) && (ctrlfd > -1))
|
||||
res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
|
||||
else
|
||||
res = ast_waitstream(chan, ints);
|
||||
if (fn && ast_fileexists(fn, NULL, NULL) > 0) {
|
||||
res = ast_streamfile(chan, fn, lang);
|
||||
if (!res) {
|
||||
if ((audiofd > -1) && (ctrlfd > -1))
|
||||
res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
|
||||
else
|
||||
res = ast_waitstream(chan, ints);
|
||||
}
|
||||
ast_stopstream(chan);
|
||||
}
|
||||
ast_stopstream(chan);
|
||||
num++;
|
||||
}
|
||||
|
||||
@@ -202,14 +204,16 @@ static int say_phonetic_str_full(struct ast_channel *chan, const char *str, cons
|
||||
fnbuf[9] = ltr;
|
||||
fn = fnbuf;
|
||||
}
|
||||
res = ast_streamfile(chan, fn, lang);
|
||||
if (!res) {
|
||||
if ((audiofd > -1) && (ctrlfd > -1))
|
||||
res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
|
||||
else
|
||||
res = ast_waitstream(chan, ints);
|
||||
if (fn && ast_fileexists(fn, NULL, NULL) > 0) {
|
||||
res = ast_streamfile(chan, fn, lang);
|
||||
if (!res) {
|
||||
if ((audiofd > -1) && (ctrlfd > -1))
|
||||
res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
|
||||
else
|
||||
res = ast_waitstream(chan, ints);
|
||||
}
|
||||
ast_stopstream(chan);
|
||||
}
|
||||
ast_stopstream(chan);
|
||||
num++;
|
||||
}
|
||||
|
||||
@@ -250,7 +254,7 @@ static int say_digit_str_full(struct ast_channel *chan, const char *str, const c
|
||||
fn = fnbuf;
|
||||
break;
|
||||
}
|
||||
if (fn) {
|
||||
if (fn && ast_fileexists(fn, NULL, NULL) > 0) {
|
||||
res = ast_streamfile(chan, fn, lang);
|
||||
if (!res) {
|
||||
if ((audiofd > -1) && (ctrlfd > -1))
|
||||
|
Reference in New Issue
Block a user