From: Buklov Boris Vladimirovich Date: Wed, 15 Apr 2009 10:25:40 +0000 (+0000) Subject: add ru_ip X-Git-Tag: v1.0.4~1164 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2403a3d3df978451a00cafe3ccc204a06e3dc548;p=thirdparty%2Ffreeswitch.git add ru_ip git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13026 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- 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 913ccec557..7375dbdba0 100644 --- a/src/mod/say/mod_say_ru/mod_say_ru.c +++ b/src/mod/say/mod_say_ru/mod_say_ru.c @@ -1440,6 +1440,43 @@ static switch_status_t ru_say_time(switch_core_session_t *session, char *tosay, } +static switch_status_t ru_ip(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, + switch_input_args_t *args) +{ + char *a, *b, *c, *d; + if (!(a = switch_core_session_strdup(session, tosay))) { + return SWITCH_STATUS_FALSE; + } + + if (!(b = strchr(a, '.'))) { + return SWITCH_STATUS_FALSE; + } + + *b++ = '\0'; + + if (!(c = strchr(b, '.'))) { + return SWITCH_STATUS_FALSE; + } + + *c++ = '\0'; + + if (!(d = strchr(c, '.'))) { + return SWITCH_STATUS_FALSE; + } + + *d++ = '\0'; + + ru_say_count(session,a ,male,how_much,args); + say_file("digits/dot.wav"); + ru_say_count(session,b ,male,how_much,args); + say_file("digits/dot.wav"); + ru_say_count(session,c ,male,how_much,args); + say_file("digits/dot.wav"); + ru_say_count(session,d ,male,how_much,args); + return SWITCH_STATUS_SUCCESS; +} + + static switch_status_t ru_say(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args) { @@ -1469,7 +1506,7 @@ static switch_status_t ru_say(switch_core_session_t *session, char *tosay, switc say_cb = ru_say_time; break; case SST_IP_ADDRESS: -// say_cb = ru_ip; + say_cb = ru_ip; break; case SST_NAME_SPELLED: case SST_NAME_PHONETIC: