Add SayPhonetic and SayAlpha applications (bug #793)
authorMark Spencer <markster@digium.com>
Mon, 3 May 2004 00:54:16 +0000 (00:54 +0000)
committerMark Spencer <markster@digium.com>
Mon, 3 May 2004 00:54:16 +0000 (00:54 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2864 65c4cc65-6c06-0410-ace0-fbb531ad65f3

71 files changed:
Makefile
apps/app_agi.c
asterisk.c
configs/logger.conf.sample
include/asterisk/say.h
pbx.c
say.c
sounds.txt
sounds/letters/a.gsm [new file with mode: 0755]
sounds/letters/at.gsm [new file with mode: 0755]
sounds/letters/b.gsm [new file with mode: 0755]
sounds/letters/c.gsm [new file with mode: 0755]
sounds/letters/d.gsm [new file with mode: 0755]
sounds/letters/dash.gsm [new file with mode: 0755]
sounds/letters/dollar.gsm [new file with mode: 0755]
sounds/letters/dot.gsm [new file with mode: 0755]
sounds/letters/e.gsm [new file with mode: 0755]
sounds/letters/equals.gsm [new file with mode: 0755]
sounds/letters/exclaimation-point.gsm [new file with mode: 0755]
sounds/letters/f.gsm [new file with mode: 0755]
sounds/letters/g.gsm [new file with mode: 0755]
sounds/letters/h.gsm [new file with mode: 0755]
sounds/letters/i.gsm [new file with mode: 0755]
sounds/letters/j.gsm [new file with mode: 0755]
sounds/letters/k.gsm [new file with mode: 0755]
sounds/letters/l.gsm [new file with mode: 0755]
sounds/letters/m.gsm [new file with mode: 0755]
sounds/letters/n.gsm [new file with mode: 0755]
sounds/letters/o.gsm [new file with mode: 0755]
sounds/letters/p.gsm [new file with mode: 0755]
sounds/letters/plus.gsm [new file with mode: 0755]
sounds/letters/q.gsm [new file with mode: 0755]
sounds/letters/r.gsm [new file with mode: 0755]
sounds/letters/s.gsm [new file with mode: 0755]
sounds/letters/slash.gsm [new file with mode: 0755]
sounds/letters/space.gsm [new file with mode: 0755]
sounds/letters/t.gsm [new file with mode: 0755]
sounds/letters/u.gsm [new file with mode: 0755]
sounds/letters/v.gsm [new file with mode: 0755]
sounds/letters/w.gsm [new file with mode: 0755]
sounds/letters/x.gsm [new file with mode: 0755]
sounds/letters/y.gsm [new file with mode: 0755]
sounds/letters/z.gsm [new file with mode: 0755]
sounds/letters/zed.gsm [new file with mode: 0755]
sounds/phonetic/9_p.gsm [new file with mode: 0755]
sounds/phonetic/a_p.gsm [new file with mode: 0755]
sounds/phonetic/b_p.gsm [new file with mode: 0755]
sounds/phonetic/c_p.gsm [new file with mode: 0755]
sounds/phonetic/d_p.gsm [new file with mode: 0755]
sounds/phonetic/e_p.gsm [new file with mode: 0755]
sounds/phonetic/f_p.gsm [new file with mode: 0755]
sounds/phonetic/g_p.gsm [new file with mode: 0755]
sounds/phonetic/h_p.gsm [new file with mode: 0755]
sounds/phonetic/i_p.gsm [new file with mode: 0755]
sounds/phonetic/j_p.gsm [new file with mode: 0755]
sounds/phonetic/k_p.gsm [new file with mode: 0755]
sounds/phonetic/l_p.gsm [new file with mode: 0755]
sounds/phonetic/m_p.gsm [new file with mode: 0755]
sounds/phonetic/n_p.gsm [new file with mode: 0755]
sounds/phonetic/o_p.gsm [new file with mode: 0755]
sounds/phonetic/p_p.gsm [new file with mode: 0755]
sounds/phonetic/q_p.gsm [new file with mode: 0755]
sounds/phonetic/r_p.gsm [new file with mode: 0755]
sounds/phonetic/s_p.gsm [new file with mode: 0755]
sounds/phonetic/t_p.gsm [new file with mode: 0755]
sounds/phonetic/u_p.gsm [new file with mode: 0755]
sounds/phonetic/v_p.gsm [new file with mode: 0755]
sounds/phonetic/w_p.gsm [new file with mode: 0755]
sounds/phonetic/x_p.gsm [new file with mode: 0755]
sounds/phonetic/y_p.gsm [new file with mode: 0755]
sounds/phonetic/z_p.gsm [new file with mode: 0755]

index d5003c2..ba3c1c3 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -273,6 +273,24 @@ datafiles: all
                        exit 1; \
                fi; \
        done
+       mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/letters
+       for x in sounds/letters/*.gsm; do \
+               if grep -q "^%`basename $$x`%" sounds.txt; then \
+                       install -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/letters ; \
+               else \
+                       echo "No description for $$x"; \
+                       exit 1; \
+               fi; \
+       done
+       mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/phonetic
+       for x in sounds/phonetic/*.gsm; do \
+               if grep -q "^%`basename $$x`%" sounds.txt; then \
+                       install -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/phonetic ; \
+               else \
+                       echo "No description for $$x"; \
+                       exit 1; \
+               fi; \
+       done
        for x in sounds/vm-* sounds/transfer* sounds/pbx-* sounds/ss-* sounds/beep* sounds/dir-* sounds/conf-* sounds/agent-* sounds/invalid* sounds/tt-* sounds/auth-* sounds/privacy-* sounds/queue-*; do \
                if grep -q "^%`basename $$x`%" sounds.txt; then \
                        install -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \
index 98021fe..14fa27e 100755 (executable)
@@ -385,10 +385,12 @@ static int handle_saydigits(struct ast_channel *chan, AGI *agi, int argc, char *
 {
        int res;
        int num;
+
        if (argc != 4)
                return RESULT_SHOWUSAGE;
        if (sscanf(argv[2], "%i", &num) != 1)
                return RESULT_SHOWUSAGE;
+
        res = ast_say_digit_str_full(chan, argv[2], argv[3], chan->language, agi->audio, agi->ctrl);
        if (res == 1) /* New command */
                return RESULT_SUCCESS;
@@ -417,6 +419,23 @@ static int handle_saytime(struct ast_channel *chan, AGI *agi, int argc, char *ar
                return RESULT_FAILURE;
 }
 
+static int handle_sayphonetic(struct ast_channel *chan, AGI *agi, int argc, char *argv[])
+{
+       int res;
+
+       if (argc != 4)
+               return RESULT_SHOWUSAGE;
+
+       res = ast_say_phonetic_str_full(chan, argv[2], argv[3], chan->language, agi->audio, agi->ctrl);
+       if (res == 1) /* New command */
+               return RESULT_SUCCESS;
+       fdprintf(agi->fd, "200 result=%d\n", res);
+       if (res >= 0)
+               return RESULT_SUCCESS;
+       else
+               return RESULT_FAILURE;
+}
+
 static int handle_getdata(struct ast_channel *chan, AGI *agi, int argc, char *argv[])
 {
        int res;
@@ -1031,6 +1050,13 @@ static char usage_saytime[] =
 " completes without a digit being pressed, or the ASCII numerical value of the\n"
 " digit if one was pressed or -1 on error/hangup.\n";
 
+static char usage_sayphonetic[] =
+" Usage: SAY PHONETIC <string> <escape digits>\n"
+"        Say a given character string with phonetics, returning early if any of the given DTMF digits\n"
+" are received on the channel.  Returns 0 if playback completes without a digit\n"
+" being pressed, or the ASCII numerical value of the digit if one was pressed or\n"
+" -1 on error/hangup.\n";
+
 static char usage_getdata[] =
 " Usage: GET DATA <file to be streamed> [timeout] [max digits]\n"
 "       Stream the given file, and recieve DTMF data. Returns the digits recieved\n"
@@ -1080,6 +1106,7 @@ static agi_command commands[] = {
        { { "send", "image", NULL }, handle_sendimage, "Sends images to channels supporting it", usage_sendimage },
        { { "say", "digits", NULL }, handle_saydigits, "Says a given digit string", usage_saydigits },
        { { "say", "number", NULL }, handle_saynumber, "Says a given number", usage_saynumber },
+        { { "say", "phonetic", NULL }, handle_sayphonetic, "Says a given character string with phonetics", usage_sayphonetic },
        { { "say", "time", NULL }, handle_saytime, "Says a given time", usage_saytime },
        { { "get", "data", NULL }, handle_getdata, "Gets data on a channel", usage_getdata },
        { { "set", "context", NULL }, handle_setcontext, "Sets channel context", usage_setcontext },
index f7abea0..d1b0dad 100755 (executable)
@@ -896,7 +896,6 @@ static char *cli_prompt(EditLine *el)
                                int i;
                                struct timeval tv;
                                struct tm tm;
-                               time_t curtime;
                                FILE *LOADAVG;
                                int fgcolor = COLOR_WHITE, bgcolor = COLOR_BLACK;
 
index dd3a5bd..66f0613 100755 (executable)
@@ -29,6 +29,11 @@ console => notice,warning,error
 ;console => notice,warning,error,debug
 messages => notice,warning,error
 ;full => notice,warning,error,debug,verbose
+;
+; Uncomment the following line (with *no* events) if you want the
+; queue log to automatically rotate.
+;
+;queue_log =>
 
 ;syslog keyword : This special keyword logs to syslog facility 
 ;
index 019d7cc..cc691bd 100755 (executable)
@@ -61,6 +61,10 @@ int ast_say_digits_full(struct ast_channel *chan, int num, char *ints, char *lan
  */
 int ast_say_digit_str(struct ast_channel *chan, char *num, char *ints, char *lang);
 int ast_say_digit_str_full(struct ast_channel *chan, char *num, char *ints, char *lang, int audiofd, int ctrlfd);
+int ast_say_character_str(struct ast_channel *chan, char *num, char *ints, char *lang);
+int ast_say_character_str_full(struct ast_channel *chan, char *num, char *ints, char *lang, int audiofd, int ctrlfd);
+int ast_say_phonetic_str(struct ast_channel *chan, char *num, char *ints, char *lang);
+int ast_say_phonetic_str_full(struct ast_channel *chan, char *num, char *ints, char *lang, int audiofd, int ctrlfd);
 
 int ast_say_datetime(struct ast_channel *chan, time_t t, char *ints, char *lang);
 
diff --git a/pbx.c b/pbx.c
index 85e5e01..4a5fd82 100755 (executable)
--- a/pbx.c
+++ b/pbx.c
@@ -169,6 +169,8 @@ static int pbx_builtin_gotoif(struct ast_channel *, void *);
 static int pbx_builtin_gotoiftime(struct ast_channel *, void *);
 static int pbx_builtin_saynumber(struct ast_channel *, void *);
 static int pbx_builtin_saydigits(struct ast_channel *, void *);
+static int pbx_builtin_saycharacters(struct ast_channel *, void *);
+static int pbx_builtin_sayphonetic(struct ast_channel *, void *);
 int pbx_builtin_setvar(struct ast_channel *, void *);
 void pbx_builtin_setvar_helper(struct ast_channel *chan, char *name, char *value);
 char *pbx_builtin_getvar_helper(struct ast_channel *chan, char *name);
@@ -293,6 +295,14 @@ static struct pbx_builtin {
 "Say Digits",
 "  SayDigits(digits): Says the passed digits\n" },
 
+       { "SayAlpha", pbx_builtin_saycharacters,
+"Say Alpha",
+"  SayAlpha(string): Spells the passed string\n" },
+
+       { "SayPhonetic", pbx_builtin_sayphonetic,
+"Say Phonetic",
+"  SayPhonetic(string): Spells the passed string with phonetic alphabet\n" },
+
        { "SetAccount", pbx_builtin_setaccount,
 "Sets account code",
 "  SetAccount([account]):  Set  the  channel account code for billing\n"
@@ -4601,6 +4611,22 @@ static int pbx_builtin_saydigits(struct ast_channel *chan, void *data)
        return res;
 }
        
+static int pbx_builtin_saycharacters(struct ast_channel *chan, void *data)
+{
+       int res = 0;
+       if (data)
+               res = ast_say_character_str(chan, (char *)data, "", chan->language);
+       return res;
+}
+       
+static int pbx_builtin_sayphonetic(struct ast_channel *chan, void *data)
+{
+       int res = 0;
+       if (data)
+               res = ast_say_phonetic_str(chan, (char *)data, "", chan->language);
+       return res;
+}
+       
 int load_pbx(void)
 {
        int x;
diff --git a/say.c b/say.c
index 0107346..5a318e8 100755 (executable)
--- a/say.c
+++ b/say.c
@@ -16,6 +16,7 @@
 #include <stdlib.h>
 #include <netinet/in.h>
 #include <time.h>
+#include <ctype.h>
 #include <asterisk/file.h>
 #include <asterisk/channel.h>
 #include <asterisk/logger.h>
@@ -45,13 +46,13 @@ int ast_say_digit_str(struct ast_channel *chan, char *fn2, char *ints, char *lan
                                snprintf(fn, sizeof(fn), "digits/pound");
                                break;
                        default:
-                               if((fn2[num] >= '0') && (fn2[num] <= '9')){ /* Must be in {0-9} */       
+                               if((fn2[num] >= '0') && (fn2[num] <= '9')){ /* Must be in {0-9} */
                                        snprintf(fn, sizeof(fn), "digits/%c", fn2[num]);
                                }
-                       }
+               }
                if(strlen(fn)){ /* if length == 0, then skip this digit as it is invalid */
                        res = ast_streamfile(chan, fn, lang);
-                       if (!res) 
+                       if (!res)
                                res = ast_waitstream(chan, ints);
                        ast_stopstream(chan);
                }
@@ -60,6 +61,178 @@ int ast_say_digit_str(struct ast_channel *chan, char *fn2, char *ints, char *lan
        return res;
 }
 
+int ast_say_character_str(struct ast_channel *chan, char *fn2, char *ints, char *lang)
+{
+       /* XXX Merge with full version? XXX */
+       char fn[256] = "";
+       char ltr;
+       int num = 0;
+       int res = 0;
+       while(fn2[num] && !res) {
+               fn[0] = '\0';
+               switch (fn2[num]) {
+                       case ('*'):
+                               snprintf(fn, sizeof(fn), "digits/star");
+                               break;
+                       case ('#'):
+                               snprintf(fn, sizeof(fn), "digits/pound");
+                               break;
+                       case ('0'):
+                       case ('1'):
+                       case ('2'):
+                       case ('3'):
+                       case ('4'):
+                       case ('5'):
+                       case ('6'):
+                       case ('7'):
+                       case ('8'):
+                       case ('9'):
+                               snprintf(fn, sizeof(fn), "digits/%c", fn2[num]);
+                               break;
+                       case ('!'):
+                               strncpy(fn, "letters/exclaimation-point", sizeof(fn));
+                               break;          
+                       case ('@'):
+                               strncpy(fn, "letters/at", sizeof(fn));
+                               break;
+                       case ('$'):
+                               strncpy(fn, "letters/dollar", sizeof(fn));
+                               break;
+                       case ('-'):
+                               strncpy(fn, "letters/dash", sizeof(fn));
+                               break;
+                       case ('.'):
+                               strncpy(fn, "letters/dot", sizeof(fn));
+                               break;
+                       case ('='):
+                               strncpy(fn, "letters/equals", sizeof(fn));
+                               break;
+                       case ('+'):
+                               strncpy(fn, "letters/plus", sizeof(fn));
+                               break;
+                       case ('/'):
+                               strncpy(fn, "letters/slash", sizeof(fn));
+                               break;
+                       case (' '):
+                               strncpy(fn, "letters/space", sizeof(fn));
+                               break;
+                       default:
+                               ltr = fn2[num];
+                               if ('A' <= ltr && ltr <= 'Z') ltr += 'a' - 'A';         /* file names are all lower-case */
+                               snprintf(fn, sizeof(fn), "letters/%c", ltr);
+               }
+               if(strlen(fn)){ /* if length == 0, then skip this digit as it is invalid */
+                       res = ast_streamfile(chan, fn, lang);
+                       if (!res) 
+                               res = ast_waitstream(chan, ints);
+               }       ast_stopstream(chan);
+               num++;
+       }
+       return res;
+}
+
+int ast_say_phonetic_str(struct ast_channel *chan, char *fn2, char *ints, char *lang)
+{
+       /* XXX Merge with full version? XXX */
+       char fn[256] = "";
+       char ltr;
+       int num = 0;
+       int res = 0;
+       int temp;
+       int play;
+       char hex[3];
+/*     while(fn2[num] && !res) { */
+       while(fn2[num]) {
+               play=1;
+               switch (fn2[num]) {
+                       case ('*'):
+                               snprintf(fn, sizeof(fn), "digits/star");
+                               break;
+                       case ('#'):
+                               snprintf(fn, sizeof(fn), "digits/pound");
+                               break;
+                       case ('0'):
+                       case ('1'):
+                       case ('2'):
+                       case ('3'):
+                       case ('4'):
+                       case ('5'):
+                       case ('6'):
+                       case ('7'):
+                       case ('8'):
+                               snprintf(fn, sizeof(fn), "digits/%c", fn2[num]);
+                               break;
+                       case ('!'):
+                               strncpy(fn, "exclaimation-point", sizeof(fn));
+                               break;          
+                       case ('@'):
+                               strncpy(fn, "at", sizeof(fn));
+                               break;
+                       case ('$'):
+                               strncpy(fn, "dollar", sizeof(fn));
+                               break;  
+                       case ('-'):
+                               strncpy(fn, "dash", sizeof(fn));
+                               break;
+                       case ('.'):
+                               strncpy(fn, "dot", sizeof(fn));
+                               break;
+                       case ('='):
+                               strncpy(fn, "equals", sizeof(fn));
+                               break;
+                       case ('+'):
+                               strncpy(fn, "plus", sizeof(fn));
+                               break;
+                       case ('/'):
+                               strncpy(fn, "slash", sizeof(fn));
+                               break;
+                       case (' '):
+                               strncpy(fn, "space", sizeof(fn));
+                               break;
+                       case ('%'):
+                               play=0;
+                               /* check if we have 2 chars after the % */
+                               if (strlen(fn2)>num+2)
+                               {
+                                   hex[0]=fn2[num+1];
+                                   hex[1]=fn2[num+2];
+                                   hex[2]='\0';
+                                   if (sscanf(hex,"%x", &temp))
+                                   { /* Hex to char convertion successfull */
+                                       fn2[num+2]=temp;
+                                       num++;
+                                       if (temp==37)
+                                       { /* If it is a percent, play it now */
+                                           strncpy(fn, "percent", sizeof(fn));
+                                               num++;
+                                               play=1;
+                                               }
+                                               /* check for invalid characters */
+                                               if ((temp<32) || (temp>126))
+                                               {
+                                                   num++;
+                                               }
+                                   }
+                               }
+                               else
+                                   num++;
+                               break;
+                       default:        /* '9' falls through to here, too */
+                               ltr = tolower(fn2[num]);
+                               snprintf(fn, sizeof(fn), "phonetic/%c_p", ltr);
+               }
+               if (play)
+               {
+                   res = ast_streamfile(chan, fn, lang);
+                   if (!res) 
+                       res = ast_waitstream(chan, ints);
+                   ast_stopstream(chan);
+               }
+               num++;
+       }
+       return res;
+}
+
 int ast_say_digit_str_full(struct ast_channel *chan, char *fn2, char *ints, char *lang, int audiofd, int ctrlfd)
 {
        char fn[256] = "";
@@ -76,6 +249,141 @@ int ast_say_digit_str_full(struct ast_channel *chan, char *fn2, char *ints, char
        return res;
 }
 
+int ast_say_character_str_full(struct ast_channel *chan, char *fn2, char *ints, char *lang, int audiofd, int ctrlfd)
+{
+       char fn[256] = "";
+       char ltr;
+       int num = 0;
+       int res = 0;
+       while(fn2[num] && !res) {
+               switch (fn2[num]) {
+                       case ('*'):
+                               snprintf(fn, sizeof(fn), "digits/star");
+                               break;
+                       case ('#'):
+                               snprintf(fn, sizeof(fn), "digits/pound");
+                               break;
+                       case ('0'):
+                       case ('1'):
+                       case ('2'):
+                       case ('3'):
+                       case ('4'):
+                       case ('5'):
+                       case ('6'):
+                       case ('7'):
+                       case ('8'):
+                       case ('9'):
+                               snprintf(fn, sizeof(fn), "digits/%c", fn2[num]);
+                               break;
+                       case ('!'):
+                               strncpy(fn, "exclaimation-point", sizeof(fn));
+                               break;          
+                       case ('@'):
+                               strncpy(fn, "at", sizeof(fn));
+                               break;
+                       case ('$'):
+                               strncpy(fn, "dollar", sizeof(fn));
+                               break;
+                       case ('-'):
+                               strncpy(fn, "dash", sizeof(fn));
+                               break;
+                       case ('.'):
+                               strncpy(fn, "dot", sizeof(fn));
+                               break;
+                       case ('='):
+                               strncpy(fn, "equals", sizeof(fn));
+                               break;
+                       case ('+'):
+                               strncpy(fn, "plus", sizeof(fn));
+                               break;
+                       case ('/'):
+                               strncpy(fn, "slash", sizeof(fn));
+                               break;
+                       case (' '):
+                               strncpy(fn, "space", sizeof(fn));
+                               break;
+                       default:
+                               ltr = fn2[num];
+                               if ('A' <= ltr && ltr <= 'Z') ltr += 'a' - 'A';         /* file names are all lower-case */
+                               snprintf(fn, sizeof(fn), "letters/%c", ltr);
+               }
+               /* snprintf(fn, sizeof(fn), "digits/%c", fn2[num]); */
+               res = ast_streamfile(chan, fn, lang);
+               if (!res) 
+                       res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
+               ast_stopstream(chan);
+               num++;
+       }
+       return res;
+}
+
+int ast_say_phonetic_str_full(struct ast_channel *chan, char *fn2, char *ints, char *lang, int audiofd, int ctrlfd)
+{
+       char fn[256] = "";
+       char ltr;
+       int num = 0;
+       int res = 0;
+       while(fn2[num] && !res) {
+               switch (fn2[num]) {
+                       case ('*'):
+                               snprintf(fn, sizeof(fn), "digits/star");
+                               break;
+                       case ('#'):
+                               snprintf(fn, sizeof(fn), "digits/pound");
+                               break;
+                       case ('0'):
+                       case ('1'):
+                       case ('2'):
+                       case ('3'):
+                       case ('4'):
+                       case ('5'):
+                       case ('6'):
+                       case ('7'):
+                       case ('8'):
+                               snprintf(fn, sizeof(fn), "digits/%c", fn2[num]);
+                               break;
+                       case ('!'):
+                               strncpy(fn, "exclaimation-point", sizeof(fn));
+                               break;          
+                       case ('@'):
+                               strncpy(fn, "at", sizeof(fn));
+                               break;
+                       case ('$'):
+                               strncpy(fn, "dollar", sizeof(fn));
+                               break;
+                       case ('-'):
+                               strncpy(fn, "dash", sizeof(fn));
+                               break;
+                       case ('.'):
+                               strncpy(fn, "dot", sizeof(fn));
+                               break;
+                       case ('='):
+                               strncpy(fn, "equals", sizeof(fn));
+                               break;
+                       case ('+'):
+                               strncpy(fn, "plus", sizeof(fn));
+                               break;
+                       case ('/'):
+                               strncpy(fn, "slash", sizeof(fn));
+                               break;
+                       case (' '):
+                               strncpy(fn, "space", sizeof(fn));
+                               break;
+                       default:        /* '9' falls here... */
+                               ltr = fn2[num];
+                               if ('A' <= ltr && ltr <= 'Z') ltr += 'a' - 'A';         /* file names are all lower-case */
+                               snprintf(fn, sizeof(fn), "phonetic/%c", ltr);
+                       }
+               /* snprintf(fn, sizeof(fn), "digits/%c", fn2[num]); */
+               res = ast_streamfile(chan, fn, lang);
+               if (!res) 
+                       res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
+               ast_stopstream(chan);
+               num++;
+       }
+       return res;
+}
+
 int ast_say_digits(struct ast_channel *chan, int num, char *ints, char *lang)
 {
        /* XXX Should I be merged with say_digits_full XXX */
index cd7b0f7..419497c 100755 (executable)
 %vm-reachoper.gsm%press 0 to reach an operator
 
 %vm-tooshort.gsm%your message is too short 
+
+%9_p.gsm%niner
+
+%a.gsm%a
+
+%b.gsm%b
+
+%c.gsm%c
+
+%d.gsm%d
+
+%e.gsm%e
+
+%f.gsm%f
+
+%g.gsm%g
+
+%h.gsm%h
+
+%i.gsm%i
+
+%j.gsm%j
+
+%k.gsm%k
+
+%l.gsm%l
+
+%m.gsm%m
+
+%n.gsm%n
+
+%o.gsm%o
+
+%p.gsm%p
+
+%q.gsm%q
+
+%r.gsm%r
+
+%s.gsm%s
+
+%t.gsm%t
+
+%u.gsm%u
+
+%v.gsm%v
+
+%w.gsm%w
+
+%x.gsm%x
+
+%y.gsm%y
+
+%z.gsm%z
+
+%zed.gsm%zed
+
+%a_p.gsm%alpha
+
+%b_p.gsm%bravo
+
+%c_p.gsm%charlie
+
+%d_p.gsm%delta
+
+%e_p.gsm%echo
+
+%f_p.gsm%foxtrot
+
+%g_p.gsm%golf
+
+%h_p.gsm%hotel
+
+%i_p.gsm%india
+
+%j_p.gsm%juliet
+
+%k_p.gsm%kilo
+
+%l_p.gsm%lima
+
+%m_p.gsm%mike
+
+%n_p.gsm%november
+
+%o_p.gsm%oscar
+
+%p_p.gsm%papa
+
+%q_p.gsm%quebec
+
+%r_p.gsm%romeo
+
+%s_p.gsm%sierra
+
+%t_p.gsm%tango
+
+%u_p.gsm%uniform
+
+%v_p.gsm%victor
+
+%w_p.gsm%wiskey
+
+%x_p.gsm%xray
+
+%y_p.gsm%yankee
+
+%z_p.gsm%zulu
+
+%niner.gsm%niner
+
+; Misc 
+
+%percent.gsm%percent [%]
+
+%plus.gsm%plus [+]
+
+%exclaimation-point.gsm%exclaimation-point [!]
+
+%at.gsm%at [@]
+
+%dollar.gsm%dollar [$]
+
+%dash.gsm%dash [-]
+
+%dot.gsm%dot [.]
+
+%slash.gsm%slash [/]
+
+%space.gsm%space [ ]
+
+%plus.gsm%plus [+]
+
+%equals.gsm%equals [=]
diff --git a/sounds/letters/a.gsm b/sounds/letters/a.gsm
new file mode 100755 (executable)
index 0000000..88171a2
Binary files /dev/null and b/sounds/letters/a.gsm differ
diff --git a/sounds/letters/at.gsm b/sounds/letters/at.gsm
new file mode 100755 (executable)
index 0000000..7622722
Binary files /dev/null and b/sounds/letters/at.gsm differ
diff --git a/sounds/letters/b.gsm b/sounds/letters/b.gsm
new file mode 100755 (executable)
index 0000000..d97f14f
Binary files /dev/null and b/sounds/letters/b.gsm differ
diff --git a/sounds/letters/c.gsm b/sounds/letters/c.gsm
new file mode 100755 (executable)
index 0000000..e631c3e
Binary files /dev/null and b/sounds/letters/c.gsm differ
diff --git a/sounds/letters/d.gsm b/sounds/letters/d.gsm
new file mode 100755 (executable)
index 0000000..9d26a00
Binary files /dev/null and b/sounds/letters/d.gsm differ
diff --git a/sounds/letters/dash.gsm b/sounds/letters/dash.gsm
new file mode 100755 (executable)
index 0000000..b3649e3
Binary files /dev/null and b/sounds/letters/dash.gsm differ
diff --git a/sounds/letters/dollar.gsm b/sounds/letters/dollar.gsm
new file mode 100755 (executable)
index 0000000..1d515d1
Binary files /dev/null and b/sounds/letters/dollar.gsm differ
diff --git a/sounds/letters/dot.gsm b/sounds/letters/dot.gsm
new file mode 100755 (executable)
index 0000000..0fca6d9
Binary files /dev/null and b/sounds/letters/dot.gsm differ
diff --git a/sounds/letters/e.gsm b/sounds/letters/e.gsm
new file mode 100755 (executable)
index 0000000..bedfb45
Binary files /dev/null and b/sounds/letters/e.gsm differ
diff --git a/sounds/letters/equals.gsm b/sounds/letters/equals.gsm
new file mode 100755 (executable)
index 0000000..4822469
Binary files /dev/null and b/sounds/letters/equals.gsm differ
diff --git a/sounds/letters/exclaimation-point.gsm b/sounds/letters/exclaimation-point.gsm
new file mode 100755 (executable)
index 0000000..87e49f2
Binary files /dev/null and b/sounds/letters/exclaimation-point.gsm differ
diff --git a/sounds/letters/f.gsm b/sounds/letters/f.gsm
new file mode 100755 (executable)
index 0000000..27fba45
Binary files /dev/null and b/sounds/letters/f.gsm differ
diff --git a/sounds/letters/g.gsm b/sounds/letters/g.gsm
new file mode 100755 (executable)
index 0000000..42b9e60
Binary files /dev/null and b/sounds/letters/g.gsm differ
diff --git a/sounds/letters/h.gsm b/sounds/letters/h.gsm
new file mode 100755 (executable)
index 0000000..c64b2f9
Binary files /dev/null and b/sounds/letters/h.gsm differ
diff --git a/sounds/letters/i.gsm b/sounds/letters/i.gsm
new file mode 100755 (executable)
index 0000000..7f80d8c
Binary files /dev/null and b/sounds/letters/i.gsm differ
diff --git a/sounds/letters/j.gsm b/sounds/letters/j.gsm
new file mode 100755 (executable)
index 0000000..45057ea
Binary files /dev/null and b/sounds/letters/j.gsm differ
diff --git a/sounds/letters/k.gsm b/sounds/letters/k.gsm
new file mode 100755 (executable)
index 0000000..104dae1
Binary files /dev/null and b/sounds/letters/k.gsm differ
diff --git a/sounds/letters/l.gsm b/sounds/letters/l.gsm
new file mode 100755 (executable)
index 0000000..df4957f
Binary files /dev/null and b/sounds/letters/l.gsm differ
diff --git a/sounds/letters/m.gsm b/sounds/letters/m.gsm
new file mode 100755 (executable)
index 0000000..97643d1
Binary files /dev/null and b/sounds/letters/m.gsm differ
diff --git a/sounds/letters/n.gsm b/sounds/letters/n.gsm
new file mode 100755 (executable)
index 0000000..92d8534
Binary files /dev/null and b/sounds/letters/n.gsm differ
diff --git a/sounds/letters/o.gsm b/sounds/letters/o.gsm
new file mode 100755 (executable)
index 0000000..4d12350
Binary files /dev/null and b/sounds/letters/o.gsm differ
diff --git a/sounds/letters/p.gsm b/sounds/letters/p.gsm
new file mode 100755 (executable)
index 0000000..d0851e7
Binary files /dev/null and b/sounds/letters/p.gsm differ
diff --git a/sounds/letters/plus.gsm b/sounds/letters/plus.gsm
new file mode 100755 (executable)
index 0000000..f4d72d6
Binary files /dev/null and b/sounds/letters/plus.gsm differ
diff --git a/sounds/letters/q.gsm b/sounds/letters/q.gsm
new file mode 100755 (executable)
index 0000000..a86ed18
Binary files /dev/null and b/sounds/letters/q.gsm differ
diff --git a/sounds/letters/r.gsm b/sounds/letters/r.gsm
new file mode 100755 (executable)
index 0000000..6ac4db9
Binary files /dev/null and b/sounds/letters/r.gsm differ
diff --git a/sounds/letters/s.gsm b/sounds/letters/s.gsm
new file mode 100755 (executable)
index 0000000..6f9cdc3
Binary files /dev/null and b/sounds/letters/s.gsm differ
diff --git a/sounds/letters/slash.gsm b/sounds/letters/slash.gsm
new file mode 100755 (executable)
index 0000000..51138a4
Binary files /dev/null and b/sounds/letters/slash.gsm differ
diff --git a/sounds/letters/space.gsm b/sounds/letters/space.gsm
new file mode 100755 (executable)
index 0000000..46b281d
Binary files /dev/null and b/sounds/letters/space.gsm differ
diff --git a/sounds/letters/t.gsm b/sounds/letters/t.gsm
new file mode 100755 (executable)
index 0000000..3f8904d
Binary files /dev/null and b/sounds/letters/t.gsm differ
diff --git a/sounds/letters/u.gsm b/sounds/letters/u.gsm
new file mode 100755 (executable)
index 0000000..9fdc9a8
Binary files /dev/null and b/sounds/letters/u.gsm differ
diff --git a/sounds/letters/v.gsm b/sounds/letters/v.gsm
new file mode 100755 (executable)
index 0000000..e7ded5b
Binary files /dev/null and b/sounds/letters/v.gsm differ
diff --git a/sounds/letters/w.gsm b/sounds/letters/w.gsm
new file mode 100755 (executable)
index 0000000..6b0df91
Binary files /dev/null and b/sounds/letters/w.gsm differ
diff --git a/sounds/letters/x.gsm b/sounds/letters/x.gsm
new file mode 100755 (executable)
index 0000000..70c47e5
Binary files /dev/null and b/sounds/letters/x.gsm differ
diff --git a/sounds/letters/y.gsm b/sounds/letters/y.gsm
new file mode 100755 (executable)
index 0000000..19ffa00
Binary files /dev/null and b/sounds/letters/y.gsm differ
diff --git a/sounds/letters/z.gsm b/sounds/letters/z.gsm
new file mode 100755 (executable)
index 0000000..9193823
Binary files /dev/null and b/sounds/letters/z.gsm differ
diff --git a/sounds/letters/zed.gsm b/sounds/letters/zed.gsm
new file mode 100755 (executable)
index 0000000..39782f7
Binary files /dev/null and b/sounds/letters/zed.gsm differ
diff --git a/sounds/phonetic/9_p.gsm b/sounds/phonetic/9_p.gsm
new file mode 100755 (executable)
index 0000000..d42bec6
Binary files /dev/null and b/sounds/phonetic/9_p.gsm differ
diff --git a/sounds/phonetic/a_p.gsm b/sounds/phonetic/a_p.gsm
new file mode 100755 (executable)
index 0000000..fa6edfe
Binary files /dev/null and b/sounds/phonetic/a_p.gsm differ
diff --git a/sounds/phonetic/b_p.gsm b/sounds/phonetic/b_p.gsm
new file mode 100755 (executable)
index 0000000..187f0dd
Binary files /dev/null and b/sounds/phonetic/b_p.gsm differ
diff --git a/sounds/phonetic/c_p.gsm b/sounds/phonetic/c_p.gsm
new file mode 100755 (executable)
index 0000000..2c168ec
Binary files /dev/null and b/sounds/phonetic/c_p.gsm differ
diff --git a/sounds/phonetic/d_p.gsm b/sounds/phonetic/d_p.gsm
new file mode 100755 (executable)
index 0000000..5550bfc
Binary files /dev/null and b/sounds/phonetic/d_p.gsm differ
diff --git a/sounds/phonetic/e_p.gsm b/sounds/phonetic/e_p.gsm
new file mode 100755 (executable)
index 0000000..46ae8b6
Binary files /dev/null and b/sounds/phonetic/e_p.gsm differ
diff --git a/sounds/phonetic/f_p.gsm b/sounds/phonetic/f_p.gsm
new file mode 100755 (executable)
index 0000000..6b4f30d
Binary files /dev/null and b/sounds/phonetic/f_p.gsm differ
diff --git a/sounds/phonetic/g_p.gsm b/sounds/phonetic/g_p.gsm
new file mode 100755 (executable)
index 0000000..38aae4f
Binary files /dev/null and b/sounds/phonetic/g_p.gsm differ
diff --git a/sounds/phonetic/h_p.gsm b/sounds/phonetic/h_p.gsm
new file mode 100755 (executable)
index 0000000..fea0828
Binary files /dev/null and b/sounds/phonetic/h_p.gsm differ
diff --git a/sounds/phonetic/i_p.gsm b/sounds/phonetic/i_p.gsm
new file mode 100755 (executable)
index 0000000..24abc33
Binary files /dev/null and b/sounds/phonetic/i_p.gsm differ
diff --git a/sounds/phonetic/j_p.gsm b/sounds/phonetic/j_p.gsm
new file mode 100755 (executable)
index 0000000..32c1311
Binary files /dev/null and b/sounds/phonetic/j_p.gsm differ
diff --git a/sounds/phonetic/k_p.gsm b/sounds/phonetic/k_p.gsm
new file mode 100755 (executable)
index 0000000..c26d966
Binary files /dev/null and b/sounds/phonetic/k_p.gsm differ
diff --git a/sounds/phonetic/l_p.gsm b/sounds/phonetic/l_p.gsm
new file mode 100755 (executable)
index 0000000..0775e96
Binary files /dev/null and b/sounds/phonetic/l_p.gsm differ
diff --git a/sounds/phonetic/m_p.gsm b/sounds/phonetic/m_p.gsm
new file mode 100755 (executable)
index 0000000..7d3c66f
Binary files /dev/null and b/sounds/phonetic/m_p.gsm differ
diff --git a/sounds/phonetic/n_p.gsm b/sounds/phonetic/n_p.gsm
new file mode 100755 (executable)
index 0000000..f399f37
Binary files /dev/null and b/sounds/phonetic/n_p.gsm differ
diff --git a/sounds/phonetic/o_p.gsm b/sounds/phonetic/o_p.gsm
new file mode 100755 (executable)
index 0000000..d9de39c
--- /dev/null
@@ -0,0 +1,2 @@
+Ô÷\83s\92P VìµéeUñÉ$dyeVѹ[#[#P²JäBÉ#Ôx\zIâ®Øã\11ØÜ\98ÌFÐËVëä\8aT\90çÖóç   6\ erÕÛÔ·j©ÐçI"³v.Õ\9b*¤{u¬£\9bÆL3:I\93\9dj1]\96Ù\1aÔ7Z¥I\9f¦dÛk\88ÓQF\87¤¶ºÕñE\ 3Öz\1c\97ñ\ 4\10:ï»#Ô¶<,\83¡§H1\8a\98êQ\ 3\12\9d=ÎÜ¡#!\8d]i\13ñ\ 3²Ý^[TÓóCá
+ñC\80ìò¼¡£f\15Ï\91Ç\eQD\82ùîZ£¡\ 4À-=ÊÛÓ±KeCñd\82±îY#£D\94¹ÒL«QæÊ3YI\1cSD0;¾K%Ó­RiÂSe¦5\92¬ÚSÂ2\84«²pS\ 4d\98ÓÙ\¥f¶Ð¹æäÓ*j^\99U(8¢]JÞSFÇ\14\12©[¦ÅÔ¨\ró¬Væt\9b&O\1eÓæjÖ\99¨Ç\8fK\8c¥ÜXÅÕ±Q\16W^äNufF)ºÃ»Öµdâ×ç\8bI\f½\ 4öÚ\8f»'S\ 4\ 3\a\14é\ f¦\84V\87.Dë¬Âqy©S0Øê¥   ÛÖB\89S\ 6\18á\9câ"sµ¾ÐàÂèãî÷»nÂ\16\15³zîÙ¯¤ÕJªâ(M\93N³Z´i>*\91d\83ÂI\8aS`qD Ø1é]ØîÅ\99\8b\8e£V[}®Æ\1f\9d/͹q&_iG24bÆ×\eqJ¼×²Í\92aî§¹\8be6"Âã>1\92¤\93°A£   \ 12\9a\98A¹6²ÝþÖëa\85ÚÜ\ 1o·ºÙ,ì@|=.\93lÚ@²êm²âä@HéfBÛÕ¢QÐÙ¸ JÜ\89ÀbÆàZãQÉ%\84 I3\96<å¸@7cn&ÜØ³\9dÖÕÛåÈãm·\1fqèÆ\92}4¥h\86I\9drÆ#¸$ð¤\8c¢\9aשb\86\eî\ 1E\1e\17'ÍæBµ£r.d¯Âç\8fy£kzÄ´\1a·þËÔ ]\97ÒYj"\1eÖ)$PÈ6×2·»¨§ÆÛ\1dH\9f[E!     hþsÔ¢U\8fY·Ixc-\9fd]\b¥dmB×]'¸ßqT\8a¹\b.\9d\929+ÔäE\17a¿(¥8uê\9ecHFLÐôùÇ&\r\85)¹Ôƨ¹[éÂ\9cÔçE\12 È\87õb\95NÓg\b\18z­º£ÎǦ\99\13mh)"\8d¶úÕ(Ké©kdFµSÄàkÅ\84lÒG"o'¸âMf»mÄúo2\14òÕª:eêl£½\fâþLmG5×2I\9bÛDpcs\¥ÚĮ۩4PÔç4¥aÜÆxëqÇ"Ý#Åhr¸\9cà\83Ùcm*5bÂÈnSå\12Ö,\1c\19àèåD¼±¹+yCXÒJ\19ÖwB6©v\81Òxå3z±HäÖk:¥àvÃØ\92M\ríñc©TÒQ\1añ$D:ñ®­vä\17\v¤Î¯Ö«B!©\9aª۾\ 2\10ñC\ 3k\94ó\ ez\82È(4\17´\90\83b­w¢\8b×2\14NÚðÄ&¼\92-\1cxáÖØ\88Y\1eð\81       k¯Ç\18ð¢6\9c£·\1c×q3M©\80ÂFÓ\89Dü~Á\1e¥\93T\9b|¡%\12\9dº«ðá7Ùm4\9e×´K\biîÀ©'^£ÈØ\815%rW\9cnÁ(ÂQ:¤Ø ZÔ¸BR×µsPêÎ@ÊÞrÉ#ð`ePl·\rÐ@$ã\11+\fv@'¢\8d¶Û
\ No newline at end of file
diff --git a/sounds/phonetic/p_p.gsm b/sounds/phonetic/p_p.gsm
new file mode 100755 (executable)
index 0000000..bb5ce86
Binary files /dev/null and b/sounds/phonetic/p_p.gsm differ
diff --git a/sounds/phonetic/q_p.gsm b/sounds/phonetic/q_p.gsm
new file mode 100755 (executable)
index 0000000..8dfdb5e
Binary files /dev/null and b/sounds/phonetic/q_p.gsm differ
diff --git a/sounds/phonetic/r_p.gsm b/sounds/phonetic/r_p.gsm
new file mode 100755 (executable)
index 0000000..47d5546
Binary files /dev/null and b/sounds/phonetic/r_p.gsm differ
diff --git a/sounds/phonetic/s_p.gsm b/sounds/phonetic/s_p.gsm
new file mode 100755 (executable)
index 0000000..8a85860
Binary files /dev/null and b/sounds/phonetic/s_p.gsm differ
diff --git a/sounds/phonetic/t_p.gsm b/sounds/phonetic/t_p.gsm
new file mode 100755 (executable)
index 0000000..3701e08
Binary files /dev/null and b/sounds/phonetic/t_p.gsm differ
diff --git a/sounds/phonetic/u_p.gsm b/sounds/phonetic/u_p.gsm
new file mode 100755 (executable)
index 0000000..39b3888
Binary files /dev/null and b/sounds/phonetic/u_p.gsm differ
diff --git a/sounds/phonetic/v_p.gsm b/sounds/phonetic/v_p.gsm
new file mode 100755 (executable)
index 0000000..ad90735
Binary files /dev/null and b/sounds/phonetic/v_p.gsm differ
diff --git a/sounds/phonetic/w_p.gsm b/sounds/phonetic/w_p.gsm
new file mode 100755 (executable)
index 0000000..9d2199c
Binary files /dev/null and b/sounds/phonetic/w_p.gsm differ
diff --git a/sounds/phonetic/x_p.gsm b/sounds/phonetic/x_p.gsm
new file mode 100755 (executable)
index 0000000..86269a9
Binary files /dev/null and b/sounds/phonetic/x_p.gsm differ
diff --git a/sounds/phonetic/y_p.gsm b/sounds/phonetic/y_p.gsm
new file mode 100755 (executable)
index 0000000..ce70b06
Binary files /dev/null and b/sounds/phonetic/y_p.gsm differ
diff --git a/sounds/phonetic/z_p.gsm b/sounds/phonetic/z_p.gsm
new file mode 100755 (executable)
index 0000000..e7165c1
Binary files /dev/null and b/sounds/phonetic/z_p.gsm differ