diff --git a/src/mod/say/mod_say_de/mod_say_de.c b/src/mod/say/mod_say_de/mod_say_de.c index 474acf719a..ccb06e286a 100644 --- a/src/mod/say/mod_say_de/mod_say_de.c +++ b/src/mod/say/mod_say_de/mod_say_de.c @@ -80,27 +80,6 @@ SWITCH_MODULE_DEFINITION(mod_say_de, mod_say_de_load, NULL, NULL); return SWITCH_STATUS_FALSE; \ }} \ - -static switch_status_t de_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) { @@ -506,7 +485,7 @@ static switch_status_t de_say(switch_core_session_t *session, char *tosay, switc break; case SST_NAME_SPELLED: case SST_NAME_PHONETIC: - say_cb = de_spell; + return switch_ivr_say_spell(session, tosay, say_args, args); break; case SST_CURRENCY: say_cb = de_say_money; diff --git a/src/mod/say/mod_say_es/mod_say_es.c b/src/mod/say/mod_say_es/mod_say_es.c index 8f8b82fb6d..fdab4210ae 100644 --- a/src/mod/say/mod_say_es/mod_say_es.c +++ b/src/mod/say/mod_say_es/mod_say_es.c @@ -80,27 +80,6 @@ SWITCH_MODULE_DEFINITION(mod_say_es, mod_say_es_load, NULL, NULL); return SWITCH_STATUS_FALSE; \ }} \ - -static switch_status_t es_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) { if (a) { @@ -527,7 +506,7 @@ static switch_status_t es_say(switch_core_session_t *session, char *tosay, switc break; case SST_NAME_SPELLED: case SST_NAME_PHONETIC: - say_cb = es_spell; + return switch_ivr_say_spell(session, tosay, say_args, args); break; case SST_CURRENCY: say_cb = es_say_money; diff --git a/src/mod/say/mod_say_fr/mod_say_fr.c b/src/mod/say/mod_say_fr/mod_say_fr.c index 4427c514e6..ac114e4f60 100644 --- a/src/mod/say/mod_say_fr/mod_say_fr.c +++ b/src/mod/say/mod_say_fr/mod_say_fr.c @@ -80,27 +80,6 @@ SWITCH_MODULE_DEFINITION(mod_say_fr, mod_say_fr_load, NULL, NULL); return SWITCH_STATUS_FALSE; \ }} \ - -static switch_status_t fr_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, switch_say_gender_t gender, int a, int b, int c, char *what, switch_core_session_t *session, switch_input_args_t *args) { int ftdNumber = 0; @@ -557,7 +536,6 @@ static switch_status_t fr_say_money(switch_core_session_t *session, char *tosay, static switch_status_t fr_say(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args) { - switch_say_callback_t say_cb = NULL; switch (say_args->type) { @@ -577,9 +555,15 @@ static switch_status_t fr_say(switch_core_session_t *session, char *tosay, switc case SST_IP_ADDRESS: say_cb = fr_ip; break; + case SST_TELEPHONE_NUMBER: + case SST_TELEPHONE_EXTENSION: + case SST_URL: + case SST_EMAIL_ADDRESS: + case SST_POSTAL_ADDRESS: + case SST_ACCOUNT_NUMBER: case SST_NAME_SPELLED: case SST_NAME_PHONETIC: - say_cb = fr_spell; + return switch_ivr_say_spell(session, tosay, say_args, args); break; case SST_CURRENCY: say_cb = fr_say_money; diff --git a/src/mod/say/mod_say_hu/mod_say_hu.c b/src/mod/say/mod_say_hu/mod_say_hu.c index 43fa23a632..c0cc8b2874 100644 --- a/src/mod/say/mod_say_hu/mod_say_hu.c +++ b/src/mod/say/mod_say_hu/mod_say_hu.c @@ -81,26 +81,6 @@ SWITCH_MODULE_DEFINITION(mod_say_hu, mod_say_hu_load, NULL, NULL); }} \ -static switch_status_t hu_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, int tosay, switch_core_session_t *session, switch_input_args_t *args) { @@ -505,7 +485,7 @@ static switch_status_t hu_say(switch_core_session_t *session, char *tosay, switc break; case SST_NAME_SPELLED: case SST_NAME_PHONETIC: - say_cb = hu_spell; + return switch_ivr_say_spell(session, tosay, say_args, args); break; case SST_CURRENCY: say_cb = hu_say_money; diff --git a/src/mod/say/mod_say_it/mod_say_it.c b/src/mod/say/mod_say_it/mod_say_it.c index 43853845e5..5a615dfbd0 100644 --- a/src/mod/say/mod_say_it/mod_say_it.c +++ b/src/mod/say/mod_say_it/mod_say_it.c @@ -92,26 +92,6 @@ SWITCH_MODULE_DEFINITION(mod_say_it, mod_say_it_load, NULL, NULL); }}\ -static switch_status_t it_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) { @@ -533,7 +513,7 @@ static switch_status_t it_say(switch_core_session_t *session, char *tosay, switc break; case SST_NAME_SPELLED: case SST_NAME_PHONETIC: - say_cb = it_spell; + return switch_ivr_say_spell(session, tosay, say_args, args); break; case SST_CURRENCY: say_cb = it_say_money; diff --git a/src/mod/say/mod_say_nl/mod_say_nl.c b/src/mod/say/mod_say_nl/mod_say_nl.c index 6c22b1219f..8ef1c49f6b 100644 --- a/src/mod/say/mod_say_nl/mod_say_nl.c +++ b/src/mod/say/mod_say_nl/mod_say_nl.c @@ -81,26 +81,6 @@ SWITCH_MODULE_DEFINITION(mod_say_nl, mod_say_nl_load, NULL, NULL); }} \ -static switch_status_t nl_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) { @@ -497,7 +477,7 @@ static switch_status_t nl_say(switch_core_session_t *session, char *tosay, switc break; case SST_NAME_SPELLED: case SST_NAME_PHONETIC: - say_cb = nl_spell; + return switch_ivr_say_spell(session, tosay, say_args, args); break; case SST_CURRENCY: say_cb = nl_say_money; diff --git a/src/mod/say/mod_say_ru/mod_say_ru.c b/src/mod/say/mod_say_ru/mod_say_ru.c index ba9ca937c6..b4e0d2ce82 100644 --- a/src/mod/say/mod_say_ru/mod_say_ru.c +++ b/src/mod/say/mod_say_ru/mod_say_ru.c @@ -111,25 +111,6 @@ static char *strip_nonnumerics(char *in, char *out, switch_size_t len) return ret; } -static switch_status_t ru_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(say_type_t say_type, casus_t casus, int a, int b, int c, unit_t what, switch_core_session_t *session, switch_input_args_t *args) { @@ -634,7 +615,7 @@ static switch_status_t ru_say(switch_core_session_t *session, char *tosay, switc break; case SST_NAME_SPELLED: case SST_NAME_PHONETIC: - say_cb = ru_spell; + return switch_ivr_say_spell(session, tosay, say_args, args); break; case SST_CURRENCY: say_cb = ru_say_money; diff --git a/src/mod/say/mod_say_th/mod_say_th.c b/src/mod/say/mod_say_th/mod_say_th.c index 23d2dcdea7..2a60bd0612 100644 --- a/src/mod/say/mod_say_th/mod_say_th.c +++ b/src/mod/say/mod_say_th/mod_say_th.c @@ -87,26 +87,6 @@ SWITCH_MODULE_DEFINITION(mod_say_th, mod_say_th_load, NULL, NULL); return SWITCH_STATUS_FALSE; \ }} \ -static switch_status_t th_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 >= '0' && a <= '9') { - say_file("digits/%d.wav", a - '0'); - } 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 char *strip_commas(char *in, char *out, switch_size_t len) { char *p = in; @@ -587,7 +567,7 @@ static switch_status_t th_say(switch_core_session_t *session, char *tosay, switc break; case SST_NAME_SPELLED: case SST_NAME_PHONETIC: - say_cb = th_spell; + return switch_ivr_say_spell(session, tosay, say_args, args); break; case SST_CURRENCY: say_cb = th_say_money; diff --git a/src/mod/say/mod_say_zh/mod_say_zh.c b/src/mod/say/mod_say_zh/mod_say_zh.c index 834bf1b419..deef5cc605 100644 --- a/src/mod/say/mod_say_zh/mod_say_zh.c +++ b/src/mod/say/mod_say_zh/mod_say_zh.c @@ -86,25 +86,6 @@ SWITCH_MODULE_DEFINITION(mod_say_zh, mod_say_zh_load, NULL, NULL); return SWITCH_STATUS_FALSE; \ }} \ -static switch_status_t zh_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 >= '0' && a <= '9') { - say_file("digits/%d.wav", a - '0'); - } 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 char *strip_commas(char *in, char *out, switch_size_t len) { @@ -566,7 +547,7 @@ static switch_status_t zh_say(switch_core_session_t *session, char *tosay, switc break; case SST_NAME_SPELLED: case SST_NAME_PHONETIC: - say_cb = zh_spell; + return switch_ivr_say_spell(session, tosay, say_args, args); break; case SST_CURRENCY: say_cb = zh_say_money;