[asterisk-commits] tilghman: trunk r89467 - /trunk/main/say.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 20 17:28:58 CST 2007


Author: tilghman
Date: Tue Nov 20 17:28:57 2007
New Revision: 89467

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89467
Log:
Add support for new recorded character sounds
Closes issue #5208

Modified:
    trunk/main/say.c

Modified: trunk/main/say.c
URL: http://svn.digium.com/view/asterisk/trunk/main/say.c?view=diff&rev=89467&r1=89466&r2=89467
==============================================================================
--- trunk/main/say.c (original)
+++ trunk/main/say.c Tue Nov 20 17:28:57 2007
@@ -59,7 +59,7 @@
 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 @@
 			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))




More information about the asterisk-commits mailing list