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:
Jason Parker
2007-07-30 20:17:08 +00:00
parent 8ed859dfc0
commit 25017ad181

View File

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