move common say 'spell' function into shared code

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16931 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris committed 2010-03-07 21:26:36 +00:00
1 parent 5f221166c6
commit aceb06f24f
7 files changed
+174 -104

No files matched your search

+1 -21
View File
@@ -81,26 +81,6 @@ SWITCH_MODULE_DEFINITION(mod_say_en, mod_say_en_load, NULL, NULL);
}} \
static switch_status_t en_spell(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
{
char *p;
for (p = tosay; p && *p; p++) {
int a = tolower((int) *p);
if (a >= 48 && a <= 57) {
say_file("digits/%d.wav", a - 48);
} else {
if (say_args->type == SST_NAME_SPELLED) {
say_file("ascii/%d.wav", a);
} else if (say_args->type == SST_NAME_PHONETIC) {
say_file("phonetic-ascii/%d.wav", a);
}
}
}
return SWITCH_STATUS_SUCCESS;
}
static switch_status_t play_group(switch_say_method_t method, int a, int b, int c, char *what, switch_core_session_t *session, switch_input_args_t *args)
{
@@ -573,7 +553,7 @@ static switch_status_t en_say(switch_core_session_t *session, char *tosay, switc
break;
case SST_NAME_SPELLED:
case SST_NAME_PHONETIC:
say_cb = en_spell;
return switch_ivr_say_spell(session, tosay, say_args, args);
break;
case SST_CURRENCY:
say_cb = en_say_money;