From: Mike Murdock Date: Sat, 6 Jan 2007 18:41:20 +0000 (+0000) Subject: Added ability to spell digits too X-Git-Tag: v1.0-beta1~1382 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ea9c800856fdbca3268872f46b70b53f9c3369c;p=thirdparty%2Ffreeswitch.git Added ability to spell digits too git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3919 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- 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;