提交 aeb446a1 authored 作者: Jeff Lenk's avatar Jeff Lenk

FS-3201 make changes similar to en support

上级 31273b42
...@@ -127,9 +127,22 @@ static switch_status_t de_say_general_count(switch_core_session_t *session, char ...@@ -127,9 +127,22 @@ static switch_status_t de_say_general_count(switch_core_session_t *session, char
int in; int in;
int x = 0; int x = 0;
int places[9] = { 0 }; int places[9] = { 0 };
char sbuf[13] = ""; char sbuf[128] = "";
switch_status_t status; 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) { 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"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR; return SWITCH_STATUS_GENERR;
...@@ -158,14 +171,6 @@ static switch_status_t de_say_general_count(switch_core_session_t *session, char ...@@ -158,14 +171,6 @@ static switch_status_t de_say_general_count(switch_core_session_t *session, char
return status; return status;
} }
break; break;
case SSM_ITERATED:
{
char *p;
for (p = tosay; p && *p; p++) {
say_file("digits/%c.wav", *p);
}
}
break;
default: default:
break; break;
} }
......
...@@ -155,9 +155,22 @@ static switch_status_t es_say_general_count(switch_core_session_t *session, char ...@@ -155,9 +155,22 @@ static switch_status_t es_say_general_count(switch_core_session_t *session, char
int in; int in;
int x = 0; int x = 0;
int places[9] = { 0 }; int places[9] = { 0 };
char sbuf[13] = ""; char sbuf[128] = "";
switch_status_t status; 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) { 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"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR; return SWITCH_STATUS_GENERR;
...@@ -191,14 +204,6 @@ static switch_status_t es_say_general_count(switch_core_session_t *session, char ...@@ -191,14 +204,6 @@ static switch_status_t es_say_general_count(switch_core_session_t *session, char
return status; return status;
} }
break; break;
case SSM_ITERATED:
{
char *p;
for (p = tosay; p && *p; p++) {
say_file("digits/%c.wav", *p);
}
}
break;
default: default:
break; break;
} }
......
...@@ -144,9 +144,26 @@ static switch_status_t fr_say_general_count(switch_core_session_t *session, char ...@@ -144,9 +144,26 @@ static switch_status_t fr_say_general_count(switch_core_session_t *session, char
int in; int in;
int x = 0; int x = 0;
int places[9] = { 0 }; int places[9] = { 0 };
char sbuf[13] = ""; char sbuf[128] = "";
switch_status_t status; 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) { 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"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR; return SWITCH_STATUS_GENERR;
...@@ -175,18 +192,6 @@ static switch_status_t fr_say_general_count(switch_core_session_t *session, char ...@@ -175,18 +192,6 @@ static switch_status_t fr_say_general_count(switch_core_session_t *session, char
return status; return status;
} }
break; 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: default:
break; break;
} }
......
...@@ -356,10 +356,23 @@ static switch_status_t hr_say_general_count(switch_core_session_t *session, char ...@@ -356,10 +356,23 @@ static switch_status_t hr_say_general_count(switch_core_session_t *session, char
int in; int in;
int x = 0; int x = 0;
int places[9] = { 0 }; int places[9] = { 0 };
char sbuf[13] = ""; char sbuf[128] = "";
int number; int number;
switch_status_t status; 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) { if (!(tosay = strip_commas(tosay, sbuf, sizeof(sbuf))) || strlen(tosay) > 9) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR; return SWITCH_STATUS_GENERR;
...@@ -391,14 +404,6 @@ static switch_status_t hr_say_general_count(switch_core_session_t *session, char ...@@ -391,14 +404,6 @@ static switch_status_t hr_say_general_count(switch_core_session_t *session, char
return status; return status;
} }
break; break;
case SSM_ITERATED:
{
char *p;
for (p = tosay; p && *p; p++) {
say_file("digits/%c.wav", *p);
}
}
break;
default: default:
break; break;
} }
......
...@@ -122,10 +122,23 @@ static switch_status_t hu_say_general_count(switch_core_session_t *session, char ...@@ -122,10 +122,23 @@ static switch_status_t hu_say_general_count(switch_core_session_t *session, char
int in; int in;
int x = 0; int x = 0;
int places[9] = { 0 }; int places[9] = { 0 };
char sbuf[13] = ""; char sbuf[128] = "";
int number; int number;
switch_status_t status; 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) { 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"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR; return SWITCH_STATUS_GENERR;
...@@ -157,14 +170,6 @@ static switch_status_t hu_say_general_count(switch_core_session_t *session, char ...@@ -157,14 +170,6 @@ static switch_status_t hu_say_general_count(switch_core_session_t *session, char
return status; return status;
} }
break; break;
case SSM_ITERATED:
{
char *p;
for (p = tosay; p && *p; p++) {
say_file("digits/%c.wav", *p);
}
}
break;
default: default:
break; break;
} }
......
...@@ -131,9 +131,22 @@ static switch_status_t it_say_general_count(switch_core_session_t *session, char ...@@ -131,9 +131,22 @@ static switch_status_t it_say_general_count(switch_core_session_t *session, char
int in; int in;
int places_count = 0; int places_count = 0;
int places[9] = { 0 }; int places[9] = { 0 };
char sbuf[13] = ""; char sbuf[128] = "";
switch_status_t status; 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) { 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"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR; return SWITCH_STATUS_GENERR;
...@@ -202,14 +215,6 @@ static switch_status_t it_say_general_count(switch_core_session_t *session, char ...@@ -202,14 +215,6 @@ static switch_status_t it_say_general_count(switch_core_session_t *session, char
return status; return status;
} }
break; break;
case SSM_ITERATED:
{
char *p;
for (p = tosay; p && *p; p++) {
say_file("digits/%c.wav", *p);
}
}
break;
default: default:
break; break;
} }
......
...@@ -84,10 +84,23 @@ SWITCH_MODULE_DEFINITION(mod_say_ja, mod_say_ja_load, NULL, NULL); ...@@ -84,10 +84,23 @@ SWITCH_MODULE_DEFINITION(mod_say_ja, mod_say_ja_load, NULL, NULL);
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) 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; int in;
char sbuf[13] = ""; char sbuf[128] = "";
char digits[11]; char digits[11];
int i; 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) { 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"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR; return SWITCH_STATUS_GENERR;
...@@ -218,13 +231,6 @@ static switch_status_t ja_say_general_count(switch_core_session_t *session, char ...@@ -218,13 +231,6 @@ static switch_status_t ja_say_general_count(switch_core_session_t *session, char
} }
} }
break; break;
case SSM_ITERATED:
{
char *p;
for (p = tosay; p && *p; p++)
say_file("digits/%c.wav", *p);
}
break;
default: default:
break; break;
} }
......
...@@ -118,9 +118,22 @@ static switch_status_t nl_say_general_count(switch_core_session_t *session, char ...@@ -118,9 +118,22 @@ static switch_status_t nl_say_general_count(switch_core_session_t *session, char
int in; int in;
int x = 0; int x = 0;
int places[9] = { 0 }; int places[9] = { 0 };
char sbuf[13] = ""; char sbuf[128] = "";
switch_status_t status; 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) { 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"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR; return SWITCH_STATUS_GENERR;
...@@ -149,14 +162,6 @@ static switch_status_t nl_say_general_count(switch_core_session_t *session, char ...@@ -149,14 +162,6 @@ static switch_status_t nl_say_general_count(switch_core_session_t *session, char
return status; return status;
} }
break; break;
case SSM_ITERATED:
{
char *p;
for (p = tosay; p && *p; p++) {
say_file("digits/%c.wav", *p);
}
}
break;
default: default:
break; break;
} }
......
...@@ -157,7 +157,7 @@ static switch_status_t ru_say_count(switch_core_session_t *session, char *tosay, ...@@ -157,7 +157,7 @@ static switch_status_t ru_say_count(switch_core_session_t *session, char *tosay,
int in; int in;
int x = 0; int x = 0;
int places[9] = { 0 }; int places[9] = { 0 };
char sbuf[13] = ""; char sbuf[128] = "";
int in_; int in_;
switch_status_t status; switch_status_t status;
......
...@@ -90,10 +90,23 @@ SWITCH_MODULE_DEFINITION(mod_say_th, mod_say_th_load, NULL, NULL); ...@@ -90,10 +90,23 @@ SWITCH_MODULE_DEFINITION(mod_say_th, mod_say_th_load, NULL, NULL);
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) 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; int in;
char sbuf[13] = ""; char sbuf[128] = "";
char digits[11]; char digits[11];
int i; 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) { 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"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR; return SWITCH_STATUS_GENERR;
...@@ -206,15 +219,6 @@ static switch_status_t th_say_general_count(switch_core_session_t *session, char ...@@ -206,15 +219,6 @@ static switch_status_t th_say_general_count(switch_core_session_t *session, char
} }
} }
break; break;
case SSM_ITERATED:
{
char *p;
for (p = tosay; p && *p; p++) {
say_file("digits/%c.wav", *p);
}
}
break;
default: default:
break; break;
} }
......
...@@ -89,10 +89,23 @@ SWITCH_MODULE_DEFINITION(mod_say_zh, mod_say_zh_load, NULL, NULL); ...@@ -89,10 +89,23 @@ SWITCH_MODULE_DEFINITION(mod_say_zh, mod_say_zh_load, NULL, NULL);
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) 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; int in;
char sbuf[13] = ""; char sbuf[128] = "";
char digits[11]; char digits[11];
int i; 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) { 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"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n");
return SWITCH_STATUS_GENERR; return SWITCH_STATUS_GENERR;
...@@ -170,15 +183,6 @@ static switch_status_t zh_say_general_count(switch_core_session_t *session, char ...@@ -170,15 +183,6 @@ static switch_status_t zh_say_general_count(switch_core_session_t *session, char
} }
} }
break; break;
case SSM_ITERATED:
{
char *p;
for (p = tosay; p && *p; p++) {
say_file("digits/%c.wav", *p);
}
}
break;
default: default:
break; break;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论