Added ability to spell digits too

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3919 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Mike Murdock 2007-01-06 18:41:20 +00:00
parent 8b51f17471
commit 9ea9c80085
1 changed files with 10 additions and 5 deletions

View 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;