]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Added ability to spell digits too
authorMike Murdock <mmurdock@coppercom.com>
Sat, 6 Jan 2007 18:41:20 +0000 (18:41 +0000)
committerMike Murdock <mmurdock@coppercom.com>
Sat, 6 Jan 2007 18:41:20 +0000 (18:41 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3919 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/say/mod_say_en/mod_say_en.c

index 6eaa6050423697c419266d01bb05a13890bd2801..3894e4da9120298770bc3ceec24d866d0bb38b84 100644 (file)
@@ -63,11 +63,16 @@ static switch_status_t en_spell(switch_core_session_t *session,
 
        for(p = tosay; p && *p; p++) {
                int a = tolower((int) *p);
-               if (type == SST_NAME_SPELLED) {
-                       say_file("ascii/%d.wav", a);
-               } else if (type == SST_NAME_PHONETIC) {
-                       say_file("phonetic-ascii/%d.wav", a);
-               }
+        if (a >= 48 && a <= 57) {
+            say_file("digits/%d.wav", a-48);
+        }
+        else {
+               if (type == SST_NAME_SPELLED) {
+                       say_file("ascii/%d.wav", a);
+               } else if (type == SST_NAME_PHONETIC) {
+                       say_file("phonetic-ascii/%d.wav", a);
+               }
+        }
        }
 
        return SWITCH_STATUS_SUCCESS;