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)
{
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;
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) {
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;
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;
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) {
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;
}} \
-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)
{
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;
}}\
-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)
{
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;
}} \
-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)
{
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;
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)
{
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;
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;
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;
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)
{
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;