Add pound/star (bug #113)
authorMark Spencer <markster@digium.com>
Mon, 18 Aug 2003 05:50:10 +0000 (05:50 +0000)
committerMark Spencer <markster@digium.com>
Mon, 18 Aug 2003 05:50:10 +0000 (05:50 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1361 65c4cc65-6c06-0410-ace0-fbb531ad65f3

say.c
sounds.txt
sounds/digits/pound.gsm [new file with mode: 0755]
sounds/digits/star.gsm [new file with mode: 0755]

diff --git a/say.c b/say.c
index 9e47aba..40b5131 100755 (executable)
--- a/say.c
+++ b/say.c
@@ -25,7 +25,16 @@ int ast_say_digit_str(struct ast_channel *chan, char *fn2, char *ints, char *lan
        int num = 0;
        int res = 0;
        while(fn2[num] && !res) {
-               snprintf(fn, sizeof(fn), "digits/%c", fn2[num]);
+               switch (fn2[num]) {
+                       case ('*'):
+                               snprintf(fn, sizeof(fn), "digits/star");
+                               break;
+                       case ('#'):
+                               snprintf(fn, sizeof(fn), "digits/pound");
+                               break;
+                       default:
+                               snprintf(fn, sizeof(fn), "digits/%c", fn2[num]);
+                       }
                res = ast_streamfile(chan, fn, lang);
                if (!res) 
                        res = ast_waitstream(chan, ints);
index 70f1139..86655bc 100755 (executable)
 
 %p-m.gsm%P.M.
 
-%thousand.gsm%thousand
+%pound.gsm%pound
 
 %privacy-incorrect.gsm%will_be_added_later
 
 
 %privacy-unident.gsm%will_be_added_later
 
+%star.gsm%star
+
+%thousand.gsm%thousand
+
 %at.gsm%at
 
 %h-1.gsm%first
diff --git a/sounds/digits/pound.gsm b/sounds/digits/pound.gsm
new file mode 100755 (executable)
index 0000000..a09fb0f
Binary files /dev/null and b/sounds/digits/pound.gsm differ
diff --git a/sounds/digits/star.gsm b/sounds/digits/star.gsm
new file mode 100755 (executable)
index 0000000..fcc4262
Binary files /dev/null and b/sounds/digits/star.gsm differ