int in;
int x = 0;
int places[9] = { 0 };
- char sbuf[13] = "";
+ char sbuf[128] = "";
switch_status_t status;
+ if (say_args->method == SSM_ITERATED) {
+ if ((tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1))) {
+ char *p;
+ for (p = tosay; p && *p; p++) {
+ say_file("digits/%c.wav", *p);
+ }
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
+ return SWITCH_STATUS_GENERR;
+ }
+ return SWITCH_STATUS_SUCCESS;
+ }
+
if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR;
return status;
}
break;
- case SSM_ITERATED:
- {
- char *p;
- for (p = tosay; p && *p; p++) {
- say_file("digits/%c.wav", *p);
- }
- }
- break;
default:
break;
}
int in;
int x = 0;
int places[9] = { 0 };
- char sbuf[13] = "";
+ char sbuf[128] = "";
switch_status_t status;
+ if (say_args->method == SSM_ITERATED) {
+ if ((tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1))) {
+ char *p;
+ for (p = tosay; p && *p; p++) {
+ say_file("digits/%c.wav", *p);
+ }
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
+ return SWITCH_STATUS_GENERR;
+ }
+ return SWITCH_STATUS_SUCCESS;
+ }
+
if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR;
return status;
}
break;
- case SSM_ITERATED:
- {
- char *p;
- for (p = tosay; p && *p; p++) {
- say_file("digits/%c.wav", *p);
- }
- }
- break;
default:
break;
}
int in;
int x = 0;
int places[9] = { 0 };
- char sbuf[13] = "";
+ char sbuf[128] = "";
switch_status_t status;
+ if (say_args->method == SSM_ITERATED) {
+ if ((tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1))) {
+ char *p;
+ for (p = tosay; p && *p; p++) {
+ if (*p == '1' && say_args->gender == SSG_FEMININE) {
+ say_file("digits/%c_f.wav", *p);
+ } else {
+ say_file("digits/%c.wav", *p);
+ }
+ }
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
+ return SWITCH_STATUS_GENERR;
+ }
+ return SWITCH_STATUS_SUCCESS;
+ }
+
if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR;
return status;
}
break;
- case SSM_ITERATED:
- {
- char *p;
- for (p = tosay; p && *p; p++) {
- if (*p == '1' && say_args->gender == SSG_FEMININE) {
- say_file("digits/%c_f.wav", *p);
- } else {
- say_file("digits/%c.wav", *p);
- }
- }
- }
- break;
default:
break;
}
int in;
int x = 0;
int places[9] = { 0 };
- char sbuf[13] = "";
+ char sbuf[128] = "";
int number;
switch_status_t status;
+ if (say_args->method == SSM_ITERATED) {
+ if ((tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1))) {
+ char *p;
+ for (p = tosay; p && *p; p++) {
+ say_file("digits/%c.wav", *p);
+ }
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
+ return SWITCH_STATUS_GENERR;
+ }
+ return SWITCH_STATUS_SUCCESS;
+ }
+
if (!(tosay = strip_commas(tosay, sbuf, sizeof(sbuf))) || strlen(tosay) > 9) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR;
return status;
}
break;
- case SSM_ITERATED:
- {
- char *p;
- for (p = tosay; p && *p; p++) {
- say_file("digits/%c.wav", *p);
- }
- }
- break;
default:
break;
}
int in;
int x = 0;
int places[9] = { 0 };
- char sbuf[13] = "";
+ char sbuf[128] = "";
int number;
switch_status_t status;
+ if (say_args->method == SSM_ITERATED) {
+ if ((tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1))) {
+ char *p;
+ for (p = tosay; p && *p; p++) {
+ say_file("digits/%c.wav", *p);
+ }
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
+ return SWITCH_STATUS_GENERR;
+ }
+ return SWITCH_STATUS_SUCCESS;
+ }
+
if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR;
return status;
}
break;
- case SSM_ITERATED:
- {
- char *p;
- for (p = tosay; p && *p; p++) {
- say_file("digits/%c.wav", *p);
- }
- }
- break;
default:
break;
}
int in;
int places_count = 0;
int places[9] = { 0 };
- char sbuf[13] = "";
+ char sbuf[128] = "";
switch_status_t status;
+ if (say_args->method == SSM_ITERATED) {
+ if ((tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1))) {
+ char *p;
+ for (p = tosay; p && *p; p++) {
+ say_file("digits/%c.wav", *p);
+ }
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
+ return SWITCH_STATUS_GENERR;
+ }
+ return SWITCH_STATUS_SUCCESS;
+ }
+
if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR;
return status;
}
break;
- case SSM_ITERATED:
- {
- char *p;
- for (p = tosay; p && *p; p++) {
- say_file("digits/%c.wav", *p);
- }
- }
- break;
default:
break;
}
static switch_status_t ja_say_general_count(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
{
int in;
- char sbuf[13] = "";
+ char sbuf[128] = "";
char digits[11];
int i;
+ if (say_args->method == SSM_ITERATED) {
+ if ((tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1))) {
+ char *p;
+ for (p = tosay; p && *p; p++) {
+ say_file("digits/%c.wav", *p);
+ }
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
+ return SWITCH_STATUS_GENERR;
+ }
+ return SWITCH_STATUS_SUCCESS;
+ }
+
if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR;
}
}
break;
- case SSM_ITERATED:
- {
- char *p;
- for (p = tosay; p && *p; p++)
- say_file("digits/%c.wav", *p);
- }
- break;
default:
break;
}
int in;
int x = 0;
int places[9] = { 0 };
- char sbuf[13] = "";
+ char sbuf[128] = "";
switch_status_t status;
+ if (say_args->method == SSM_ITERATED) {
+ if ((tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1))) {
+ char *p;
+ for (p = tosay; p && *p; p++) {
+ say_file("digits/%c.wav", *p);
+ }
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
+ return SWITCH_STATUS_GENERR;
+ }
+ return SWITCH_STATUS_SUCCESS;
+ }
+
if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR;
return status;
}
break;
- case SSM_ITERATED:
- {
- char *p;
- for (p = tosay; p && *p; p++) {
- say_file("digits/%c.wav", *p);
- }
- }
- break;
default:
break;
}
int in;
int x = 0;
int places[9] = { 0 };
- char sbuf[13] = "";
+ char sbuf[128] = "";
int in_;
switch_status_t status;
static switch_status_t th_say_general_count(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
{
int in;
- char sbuf[13] = "";
+ char sbuf[128] = "";
char digits[11];
int i;
+ if (say_args->method == SSM_ITERATED) {
+ if ((tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1))) {
+ char *p;
+ for (p = tosay; p && *p; p++) {
+ say_file("digits/%c.wav", *p);
+ }
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
+ return SWITCH_STATUS_GENERR;
+ }
+ return SWITCH_STATUS_SUCCESS;
+ }
+
if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR;
}
}
break;
- case SSM_ITERATED:
- {
- char *p;
-
- for (p = tosay; p && *p; p++) {
- say_file("digits/%c.wav", *p);
- }
- }
- break;
default:
break;
}
static switch_status_t zh_say_general_count(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
{
int in;
- char sbuf[13] = "";
+ char sbuf[128] = "";
char digits[11];
int i;
+ if (say_args->method == SSM_ITERATED) {
+ if ((tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1))) {
+ char *p;
+ for (p = tosay; p && *p; p++) {
+ say_file("digits/%c.wav", *p);
+ }
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
+ return SWITCH_STATUS_GENERR;
+ }
+ return SWITCH_STATUS_SUCCESS;
+ }
+
if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR;
}
}
break;
- case SSM_ITERATED:
- {
- char *p;
-
- for (p = tosay; p && *p; p++) {
- say_file("digits/%c.wav", *p);
- }
- }
- break;
default:
break;
}