From 9ea9c800856fdbca3268872f46b70b53f9c3369c Mon Sep 17 00:00:00 2001 From: Mike Murdock Date: Sat, 6 Jan 2007 18:41:20 +0000 Subject: [PATCH] Added ability to spell digits too 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 | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/mod/say/mod_say_en/mod_say_en.c b/src/mod/say/mod_say_en/mod_say_en.c index 6eaa605042..3894e4da91 100644 --- a/src/mod/say/mod_say_en/mod_say_en.c +++ b/src/mod/say/mod_say_en/mod_say_en.c @@ -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;