aboutsummaryrefslogtreecommitdiffstats
path: root/main/say.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-20 23:28:57 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-20 23:28:57 +0000
commit07742d8fe2bcfbfce4d2848a4d0bb92225a3bd27 (patch)
treecc02435a93b61098341690061dc8343d3fc54aca /main/say.c
parent89d8d786527a6e9ee00c8c8ad1f1954114a9441d (diff)
Add support for new recorded character sounds
Closes issue #5208 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89467 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/say.c')
-rw-r--r--main/say.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/say.c b/main/say.c
index f63a941b1..17f3a57d1 100644
--- a/main/say.c
+++ b/main/say.c
@@ -59,7 +59,7 @@ static int wait_file(struct ast_channel *chan, const char *ints, const char *fil
static int say_character_str_full(struct ast_channel *chan, const char *str, const char *ints, const char *lang, int audiofd, int ctrlfd)
{
const char *fn;
- char fnbuf[256];
+ char fnbuf[10], asciibuf[20] = "letters/ascii";
char ltr;
int num = 0;
int res = 0;
@@ -121,7 +121,8 @@ static int say_character_str_full(struct ast_channel *chan, const char *str, con
fnbuf[8] = ltr;
fn = fnbuf;
}
- if (fn && ast_fileexists(fn, NULL, lang) > 0) {
+ if ((fn && ast_fileexists(fn, NULL, lang) > 0) ||
+ (snprintf(asciibuf + 13, sizeof(asciibuf) - 13, "%d", str[num]) > 0 && ast_fileexists(asciibuf, NULL, lang) > 0 && (fn = asciibuf))) {
res = ast_streamfile(chan, fn, lang);
if (!res) {
if ((audiofd > -1) && (ctrlfd > -1))