<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[Freeswitch-trunk][16937] </title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<div id="header">FreeSWITCH Subversion</div>
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://fisheye.freeswitch.org/changelog/FreeSWITCH?cs=16937">16937</a></dd>
<dt>Author</dt> <dd>mikej</dd>
<dt>Date</dt> <dd>2010-03-08 02:38:50 -0600 (Mon, 08 Mar 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>use common code to say ip when possible</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunksrcincludeswitch_ivrh">freeswitch/trunk/src/include/switch_ivr.h</a></li>
<li><a href="#freeswitchtrunksrcmodsaymod_say_demod_say_dec">freeswitch/trunk/src/mod/say/mod_say_de/mod_say_de.c</a></li>
<li><a href="#freeswitchtrunksrcmodsaymod_say_enmod_say_enc">freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c</a></li>
<li><a href="#freeswitchtrunksrcmodsaymod_say_esmod_say_esc">freeswitch/trunk/src/mod/say/mod_say_es/mod_say_es.c</a></li>
<li><a href="#freeswitchtrunksrcmodsaymod_say_frmod_say_frc">freeswitch/trunk/src/mod/say/mod_say_fr/mod_say_fr.c</a></li>
<li><a href="#freeswitchtrunksrcmodsaymod_say_humod_say_huc">freeswitch/trunk/src/mod/say/mod_say_hu/mod_say_hu.c</a></li>
<li><a href="#freeswitchtrunksrcmodsaymod_say_itmod_say_itc">freeswitch/trunk/src/mod/say/mod_say_it/mod_say_it.c</a></li>
<li><a href="#freeswitchtrunksrcmodsaymod_say_nlmod_say_nlc">freeswitch/trunk/src/mod/say/mod_say_nl/mod_say_nl.c</a></li>
<li><a href="#freeswitchtrunksrcmodsaymod_say_thmod_say_thc">freeswitch/trunk/src/mod/say/mod_say_th/mod_say_th.c</a></li>
<li><a href="#freeswitchtrunksrcmodsaymod_say_zhmod_say_zhc">freeswitch/trunk/src/mod/say/mod_say_zh/mod_say_zh.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_ivr_sayc">freeswitch/trunk/src/switch_ivr_say.c</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunksrcincludeswitch_ivrh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/include/switch_ivr.h (16936 => 16937)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/include/switch_ivr.h        2010-03-08 08:12:12 UTC (rev 16936)
+++ freeswitch/trunk/src/include/switch_ivr.h        2010-03-08 08:38:50 UTC (rev 16937)
</span><span class="lines">@@ -822,6 +822,11 @@
</span><span class="cx"> SWITCH_DECLARE(switch_say_gender_t) switch_ivr_get_say_gender_by_name(const char *name);
</span><span class="cx"> SWITCH_DECLARE(switch_say_type_t) switch_ivr_get_say_type_by_name(const char *name);
</span><span class="cx"> SWITCH_DECLARE(switch_status_t) switch_ivr_say_spell(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args);
</span><ins>+SWITCH_DECLARE(switch_status_t) switch_ivr_say_ip(switch_core_session_t *session,
+                                                                                                 char *tosay,
+                                                                                                 switch_say_callback_t number_func,
+                                                                                                 switch_say_args_t *say_args,
+                                                                                                 switch_input_args_t *args);
</ins><span class="cx">
</span><span class="cx"> SWITCH_DECLARE(switch_status_t) switch_ivr_set_user(switch_core_session_t *session, const char *data);
</span><span class="cx"> SWITCH_DECLARE(switch_status_t) switch_ivr_sound_test(switch_core_session_t *session);
</span></span></pre></div>
<a id="freeswitchtrunksrcmodsaymod_say_demod_say_dec"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/say/mod_say_de/mod_say_de.c (16936 => 16937)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/say/mod_say_de/mod_say_de.c        2010-03-08 08:12:12 UTC (rev 16936)
+++ freeswitch/trunk/src/mod/say/mod_say_de/mod_say_de.c        2010-03-08 08:38:50 UTC (rev 16937)
</span><span class="lines">@@ -176,44 +176,6 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
-static switch_status_t de_ip(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, 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';
-
-        say_num(atoi(a), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(b), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(c), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(d), say_args->method);
-
-        return SWITCH_STATUS_SUCCESS;
-}
-
-
</del><span class="cx"> static switch_status_t de_say_time(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</span><span class="cx"> {
</span><span class="cx">         int32_t t;
</span><span class="lines">@@ -438,7 +400,7 @@
</span><span class="cx">                 say_cb = de_say_time;
</span><span class="cx">                 break;
</span><span class="cx">         case SST_IP_ADDRESS:
</span><del>-                say_cb = de_ip;
</del><ins>+                return switch_ivr_say_ip(session, tosay, de_say_general_count, say_args, args);
</ins><span class="cx">                 break;
</span><span class="cx">         case SST_NAME_SPELLED:
</span><span class="cx">         case SST_NAME_PHONETIC:
</span></span></pre></div>
<a id="freeswitchtrunksrcmodsaymod_say_enmod_say_enc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c (16936 => 16937)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c        2010-03-08 08:12:12 UTC (rev 16936)
+++ freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c        2010-03-08 08:38:50 UTC (rev 16937)
</span><span class="lines">@@ -176,44 +176,6 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
-static switch_status_t en_ip(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, 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';
-
-        say_num(atoi(a), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(b), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(c), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(d), say_args->method);
-
-        return SWITCH_STATUS_SUCCESS;
-}
-
-
</del><span class="cx"> static switch_status_t en_say_time(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</span><span class="cx"> {
</span><span class="cx">         int32_t t;
</span><span class="lines">@@ -506,7 +468,7 @@
</span><span class="cx">                 say_cb = en_say_time;
</span><span class="cx">                 break;
</span><span class="cx">         case SST_IP_ADDRESS:
</span><del>-                say_cb = en_ip;
</del><ins>+                return switch_ivr_say_ip(session, tosay, en_say_general_count, say_args, args);
</ins><span class="cx">                 break;
</span><span class="cx">         case SST_NAME_SPELLED:
</span><span class="cx">         case SST_NAME_PHONETIC:
</span></span></pre></div>
<a id="freeswitchtrunksrcmodsaymod_say_esmod_say_esc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/say/mod_say_es/mod_say_es.c (16936 => 16937)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/say/mod_say_es/mod_say_es.c        2010-03-08 08:12:12 UTC (rev 16936)
+++ freeswitch/trunk/src/mod/say/mod_say_es/mod_say_es.c        2010-03-08 08:38:50 UTC (rev 16937)
</span><span class="lines">@@ -196,44 +196,6 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
-static switch_status_t es_ip(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, 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';
-
-        say_num(atoi(a), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(b), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(c), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(d), say_args->method);
-
-        return SWITCH_STATUS_SUCCESS;
-}
-
-
</del><span class="cx"> static switch_status_t es_say_time(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</span><span class="cx"> {
</span><span class="cx">         int32_t t;
</span><span class="lines">@@ -459,7 +421,7 @@
</span><span class="cx">                 say_cb = es_say_time;
</span><span class="cx">                 break;
</span><span class="cx">         case SST_IP_ADDRESS:
</span><del>-                say_cb = es_ip;
</del><ins>+                return switch_ivr_say_ip(session, tosay, es_say_general_count, say_args, args);
</ins><span class="cx">                 break;
</span><span class="cx">         case SST_NAME_SPELLED:
</span><span class="cx">         case SST_NAME_PHONETIC:
</span></span></pre></div>
<a id="freeswitchtrunksrcmodsaymod_say_frmod_say_frc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/say/mod_say_fr/mod_say_fr.c (16936 => 16937)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/say/mod_say_fr/mod_say_fr.c        2010-03-08 08:12:12 UTC (rev 16936)
+++ freeswitch/trunk/src/mod/say/mod_say_fr/mod_say_fr.c        2010-03-08 08:38:50 UTC (rev 16937)
</span><span class="lines">@@ -197,44 +197,6 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
-static switch_status_t fr_ip(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, 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';
-
-        say_num(atoi(a), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(b), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(c), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(d), say_args->method);
-
-        return SWITCH_STATUS_SUCCESS;
-}
-
-
</del><span class="cx"> static switch_status_t fr_say_time(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</span><span class="cx"> {
</span><span class="cx">         int32_t t;
</span><span class="lines">@@ -510,7 +472,7 @@
</span><span class="cx">                 say_cb = fr_say_time;
</span><span class="cx">                 break;
</span><span class="cx">         case SST_IP_ADDRESS:
</span><del>-                say_cb = fr_ip;
</del><ins>+                return switch_ivr_say_ip(session, tosay, fr_say_general_count, say_args, args);
</ins><span class="cx">                 break;
</span><span class="cx">         case SST_TELEPHONE_NUMBER:
</span><span class="cx">         case SST_TELEPHONE_EXTENSION:
</span></span></pre></div>
<a id="freeswitchtrunksrcmodsaymod_say_humod_say_huc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/say/mod_say_hu/mod_say_hu.c (16936 => 16937)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/say/mod_say_hu/mod_say_hu.c        2010-03-08 08:12:12 UTC (rev 16936)
+++ freeswitch/trunk/src/mod/say/mod_say_hu/mod_say_hu.c        2010-03-08 08:38:50 UTC (rev 16937)
</span><span class="lines">@@ -175,44 +175,6 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
-static switch_status_t hu_ip(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, 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';
-
-        say_num(atoi(a), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(b), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(c), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(d), say_args->method);
-
-        return SWITCH_STATUS_SUCCESS;
-}
-
-
</del><span class="cx"> static switch_status_t hu_say_time(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</span><span class="cx"> {
</span><span class="cx">         int32_t t;
</span><span class="lines">@@ -438,7 +400,7 @@
</span><span class="cx">                 say_cb = hu_say_time;
</span><span class="cx">                 break;
</span><span class="cx">         case SST_IP_ADDRESS:
</span><del>-                say_cb = hu_ip;
</del><ins>+                return switch_ivr_say_ip(session, tosay, hu_say_general_count, say_args, args);
</ins><span class="cx">                 break;
</span><span class="cx">         case SST_NAME_SPELLED:
</span><span class="cx">         case SST_NAME_PHONETIC:
</span></span></pre></div>
<a id="freeswitchtrunksrcmodsaymod_say_itmod_say_itc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/say/mod_say_it/mod_say_it.c (16936 => 16937)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/say/mod_say_it/mod_say_it.c        2010-03-08 08:12:12 UTC (rev 16936)
+++ freeswitch/trunk/src/mod/say/mod_say_it/mod_say_it.c        2010-03-08 08:38:50 UTC (rev 16937)
</span><span class="lines">@@ -220,44 +220,6 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
-static switch_status_t it_ip(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, 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';
-
-        say_num(atoi(a), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(b), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(c), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(d), say_args->method);
-
-        return SWITCH_STATUS_SUCCESS;
-}
-
-
</del><span class="cx"> static switch_status_t it_say_time(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</span><span class="cx"> {
</span><span class="cx">         int32_t t;
</span><span class="lines">@@ -466,7 +428,7 @@
</span><span class="cx">                 say_cb = it_say_time;
</span><span class="cx">                 break;
</span><span class="cx">         case SST_IP_ADDRESS:
</span><del>-                say_cb = it_ip;
</del><ins>+                return switch_ivr_say_ip(session, tosay, it_say_general_count, say_args, args);
</ins><span class="cx">                 break;
</span><span class="cx">         case SST_NAME_SPELLED:
</span><span class="cx">         case SST_NAME_PHONETIC:
</span></span></pre></div>
<a id="freeswitchtrunksrcmodsaymod_say_nlmod_say_nlc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/say/mod_say_nl/mod_say_nl.c (16936 => 16937)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/say/mod_say_nl/mod_say_nl.c        2010-03-08 08:12:12 UTC (rev 16936)
+++ freeswitch/trunk/src/mod/say/mod_say_nl/mod_say_nl.c        2010-03-08 08:38:50 UTC (rev 16937)
</span><span class="lines">@@ -167,44 +167,6 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
-static switch_status_t nl_ip(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, 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';
-
-        say_num(atoi(a), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(b), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(c), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(d), say_args->method);
-
-        return SWITCH_STATUS_SUCCESS;
-}
-
-
</del><span class="cx"> static switch_status_t nl_say_time(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</span><span class="cx"> {
</span><span class="cx">         int32_t t;
</span><span class="lines">@@ -430,7 +392,7 @@
</span><span class="cx">                 say_cb = nl_say_time;
</span><span class="cx">                 break;
</span><span class="cx">         case SST_IP_ADDRESS:
</span><del>-                say_cb = nl_ip;
</del><ins>+                return switch_ivr_say_ip(session, tosay, nl_say_general_count, say_args, args);
</ins><span class="cx">                 break;
</span><span class="cx">         case SST_NAME_SPELLED:
</span><span class="cx">         case SST_NAME_PHONETIC:
</span></span></pre></div>
<a id="freeswitchtrunksrcmodsaymod_say_thmod_say_thc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/say/mod_say_th/mod_say_th.c (16936 => 16937)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/say/mod_say_th/mod_say_th.c        2010-03-08 08:12:12 UTC (rev 16936)
+++ freeswitch/trunk/src/mod/say/mod_say_th/mod_say_th.c        2010-03-08 08:38:50 UTC (rev 16937)
</span><span class="lines">@@ -225,43 +225,6 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
-static switch_status_t th_ip(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, 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';
-
-        say_num(atoi(a), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(b), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(c), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(d), say_args->method);
-
-        return SWITCH_STATUS_SUCCESS;
-}
-
</del><span class="cx"> static switch_status_t th_say_time(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</span><span class="cx"> {
</span><span class="cx">         int32_t t;
</span><span class="lines">@@ -517,7 +480,7 @@
</span><span class="cx">                 say_cb = th_say_time;
</span><span class="cx">                 break;
</span><span class="cx">         case SST_IP_ADDRESS:
</span><del>-                say_cb = th_ip;
</del><ins>+                return switch_ivr_say_ip(session, tosay, th_say_general_count, say_args, args);
</ins><span class="cx">                 break;
</span><span class="cx">         case SST_NAME_SPELLED:
</span><span class="cx">         case SST_NAME_PHONETIC:
</span></span></pre></div>
<a id="freeswitchtrunksrcmodsaymod_say_zhmod_say_zhc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/say/mod_say_zh/mod_say_zh.c (16936 => 16937)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/say/mod_say_zh/mod_say_zh.c        2010-03-08 08:12:12 UTC (rev 16936)
+++ freeswitch/trunk/src/mod/say/mod_say_zh/mod_say_zh.c        2010-03-08 08:38:50 UTC (rev 16937)
</span><span class="lines">@@ -204,43 +204,6 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
-static switch_status_t zh_ip(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, 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';
-
-        say_num(atoi(a), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(b), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(c), say_args->method);
-        say_file("digits/dot.wav");
-        say_num(atoi(d), say_args->method);
-
-        return SWITCH_STATUS_SUCCESS;
-}
-
</del><span class="cx"> static switch_status_t zh_say_time(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</span><span class="cx"> {
</span><span class="cx">         int32_t t;
</span><span class="lines">@@ -496,7 +459,7 @@
</span><span class="cx">                 say_cb = zh_say_time;
</span><span class="cx">                 break;
</span><span class="cx">         case SST_IP_ADDRESS:
</span><del>-                say_cb = zh_ip;
</del><ins>+                return switch_ivr_say_ip(session, tosay, zh_say_general_count, say_args, args);
</ins><span class="cx">                 break;
</span><span class="cx">         case SST_NAME_SPELLED:
</span><span class="cx">         case SST_NAME_PHONETIC:
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_ivr_sayc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_ivr_say.c (16936 => 16937)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_ivr_say.c        2010-03-08 08:12:12 UTC (rev 16936)
+++ freeswitch/trunk/src/switch_ivr_say.c        2010-03-08 08:38:50 UTC (rev 16937)
</span><span class="lines">@@ -128,6 +128,7 @@
</span><span class="cx">                         return SWITCH_STATUS_FALSE;                                                                        \
</span><span class="cx">                 }}                                                                                                                                \
</span><span class="cx">
</span><ins>+
</ins><span class="cx"> SWITCH_DECLARE(switch_status_t) switch_ivr_say_spell(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</span><span class="cx"> {
</span><span class="cx">         char *p;
</span><span class="lines">@@ -148,8 +149,62 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#define say_num(num, meth) {                                                                                        \
+                char tmp[80];                                                                                                        \
+                switch_status_t tstatus;                                                                                \
+                switch_say_method_t smeth = say_args->method;                                        \
+                switch_say_type_t stype = say_args->type;                                                \
+                say_args->type = SST_ITEMS; say_args->method = meth;                        \
+                switch_snprintf(tmp, sizeof(tmp), "%u", (unsigned)num);                        \
+                if ((tstatus =                                                                                                        \
+                         number_func(session, tmp, say_args, args))                                        \
+                        != SWITCH_STATUS_SUCCESS) {                                                                        \
+                        return tstatus;                                                                                                \
+                }                                                                                                                                \
+                say_args->method = smeth; say_args->type = stype;                                \
+        }                                                                                                                                        \
</ins><span class="cx">
</span><ins>+SWITCH_DECLARE(switch_status_t) switch_ivr_say_ip(switch_core_session_t *session,
+                                                                                                 char *tosay,
+                                                                                                 switch_say_callback_t number_func,
+                                                                                                 switch_say_args_t *say_args,
+                                                                                                 switch_input_args_t *args)
+{
+        char *a, *b, *c, *d;
+        if (!(a = switch_core_session_strdup(session, tosay))) {
+                return SWITCH_STATUS_FALSE;
+        }
</ins><span class="cx">
</span><ins>+        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';
+
+        say_num(atoi(a), say_args->method);
+        say_file("digits/dot.wav");
+        say_num(atoi(b), say_args->method);
+        say_file("digits/dot.wav");
+        say_num(atoi(c), say_args->method);
+        say_file("digits/dot.wav");
+        say_num(atoi(d), say_args->method);
+
+        return SWITCH_STATUS_SUCCESS;
+}
+
+
</ins><span class="cx"> /* For Emacs:
</span><span class="cx"> * Local Variables:
</span><span class="cx"> * mode:c
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>
</body>
</html>