<!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][16929] </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=16929">16929</a></dd>
<dt>Author</dt> <dd>mikej</dd>
<dt>Date</dt> <dd>2010-03-07 13:34:05 -0600 (Sun, 07 Mar 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>first cut and say interface rework to include gender and put all args into a struct for easier future extension</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunksrcincludeswitch_cpph">freeswitch/trunk/src/include/switch_cpp.h</a></li>
<li><a href="#freeswitchtrunksrcincludeswitch_ivrh">freeswitch/trunk/src/include/switch_ivr.h</a></li>
<li><a href="#freeswitchtrunksrcincludeswitch_typesh">freeswitch/trunk/src/include/switch_types.h</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_dptoolsmod_dptoolsc">freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c</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_rumod_say_ruc">freeswitch/trunk/src/mod/say/mod_say_ru/mod_say_ru.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_cppcpp">freeswitch/trunk/src/switch_cpp.cpp</a></li>
<li><a href="#freeswitchtrunksrcswitch_ivrc">freeswitch/trunk/src/switch_ivr.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_ivr_play_sayc">freeswitch/trunk/src/switch_ivr_play_say.c</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunksrcincludeswitch_cpph"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/include/switch_cpp.h (16928 => 16929)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/include/switch_cpp.h        2010-03-06 22:51:33 UTC (rev 16928)
+++ freeswitch/trunk/src/include/switch_cpp.h        2010-03-07 19:34:05 UTC (rev 16929)
</span><span class="lines">@@ -222,7 +222,8 @@
</span><span class="cx">                  SWITCH_DECLARE(void *) getPrivate(char *var);
</span><span class="cx">                  SWITCH_DECLARE(const char *) getVariable(char *var);
</span><span class="cx">                  SWITCH_DECLARE(switch_status_t) process_callback_result(char *result);
</span><del>-                 SWITCH_DECLARE(void) say(const char *tosay, const char *module_name, const char *say_type, const char *say_method);
</del><ins>+                 SWITCH_DECLARE(void) say(const char *tosay, const char *module_name, const char *say_type, const char *say_method,
+                                                                  const char *say_gender = NULL);
</ins><span class="cx">                  SWITCH_DECLARE(void) sayPhrase(const char *phrase_name, const char *phrase_data = &quot;&quot;, const char *phrase_lang = NULL);
</span><span class="cx">                  SWITCH_DECLARE(const char *) hangupCause();
</span><span class="cx">                  SWITCH_DECLARE(const char *) getState();
</span></span></pre></div>
<a id="freeswitchtrunksrcincludeswitch_ivrh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/include/switch_ivr.h (16928 => 16929)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/include/switch_ivr.h        2010-03-06 22:51:33 UTC (rev 16928)
+++ freeswitch/trunk/src/include/switch_ivr.h        2010-03-07 19:34:05 UTC (rev 16929)
</span><span class="lines">@@ -810,10 +810,16 @@
</span><span class="cx">                                                                                                                                   switch_bind_flag_t bind_flags, const char *app);
</span><span class="cx"> SWITCH_DECLARE(switch_status_t) switch_ivr_unbind_dtmf_meta_session(switch_core_session_t *session, uint32_t key);
</span><span class="cx"> SWITCH_DECLARE(switch_status_t) switch_ivr_soft_hold(switch_core_session_t *session, const char *unhold_key, const char *moh_a, const char *moh_b);
</span><del>-SWITCH_DECLARE(switch_status_t) switch_ivr_say(switch_core_session_t *session, const char *tosay, const char *module_name, const char *say_type,
-                                                                                           const char *say_method, switch_input_args_t *args);
</del><ins>+SWITCH_DECLARE(switch_status_t) switch_ivr_say(switch_core_session_t *session,
+                                                                                           const char *tosay,
+                                                                                           const char *module_name,
+                                                                                           const char *say_type,
+                                                                                           const char *say_method,
+                                                                                           const char *say_gender,
+                                                                                           switch_input_args_t *args);
</ins><span class="cx"> 
</span><span class="cx"> SWITCH_DECLARE(switch_say_method_t) switch_ivr_get_say_method_by_name(const char *name);
</span><ins>+SWITCH_DECLARE(switch_say_gender_t) switch_ivr_get_say_gender_by_name(const char *name);
</ins><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_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="freeswitchtrunksrcincludeswitch_typesh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/include/switch_types.h (16928 => 16929)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/include/switch_types.h        2010-03-06 22:51:33 UTC (rev 16928)
+++ freeswitch/trunk/src/include/switch_types.h        2010-03-07 19:34:05 UTC (rev 16929)
</span><span class="lines">@@ -310,6 +310,12 @@
</span><span class="cx"> } switch_say_type_t;
</span><span class="cx"> 
</span><span class="cx"> typedef enum {
</span><ins>+        SSG_MASCULINE,
+        SSG_FEMININE,
+        SSG_NEUTER
+} switch_say_gender_t;
+
+typedef enum {
</ins><span class="cx">         SMA_NONE,
</span><span class="cx">         SMA_GET,
</span><span class="cx">         SMA_SET
</span><span class="lines">@@ -1579,8 +1585,18 @@
</span><span class="cx">         switch_read_frame_callback_function_t read_frame_callback;
</span><span class="cx">         void *user_data;
</span><span class="cx"> } switch_input_args_t;
</span><ins>+
+typedef struct {
+        switch_say_type_t type;
+        switch_say_method_t method;
+        switch_say_gender_t gender;
+} switch_say_args_t;
+
</ins><span class="cx"> typedef switch_status_t (*switch_say_callback_t) (switch_core_session_t *session,
</span><del>-                                                                                                  char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args);
</del><ins>+                                                                                                  char *tosay,
+                                                                                                  switch_say_args_t *say_args,
+                                                                                                  switch_input_args_t *args);
+
</ins><span class="cx"> typedef struct switch_xml *switch_xml_t;
</span><span class="cx"> typedef struct switch_core_time_duration switch_core_time_duration_t;
</span><span class="cx"> typedef switch_xml_t(*switch_xml_search_function_t) (const char *section,
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_dptoolsmod_dptoolsc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c (16928 => 16929)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c        2010-03-06 22:51:33 UTC (rev 16928)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c        2010-03-07 19:34:05 UTC (rev 16929)
</span><span class="lines">@@ -1807,23 +1807,23 @@
</span><span class="cx">                                                            prompt_audio_file, bad_input_audio_file, var_name, digit_buffer, sizeof(digit_buffer), digits_regex);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#define SAY_SYNTAX &quot;&lt;module_name&gt; &lt;say_type&gt; &lt;say_method&gt; &lt;text&gt;&quot;
</del><ins>+#define SAY_SYNTAX &quot;&lt;module_name&gt; &lt;say_type&gt; &lt;say_method&gt; [&lt;say_gender&gt;] &lt;text&gt;&quot;
</ins><span class="cx"> SWITCH_STANDARD_APP(say_function)
</span><span class="cx"> {
</span><del>-        char *argv[4] = { 0 };
</del><ins>+        char *argv[5] = { 0 };
</ins><span class="cx">         int argc;
</span><span class="cx">         char *lbuf = NULL;
</span><span class="cx">         switch_input_args_t args = { 0 };
</span><span class="cx">         switch_channel_t *channel = switch_core_session_get_channel(session);
</span><span class="cx"> 
</span><span class="cx">         if (!zstr(data) &amp;&amp; (lbuf = switch_core_session_strdup(session, data))
</span><del>-                &amp;&amp; (argc = switch_separate_string(lbuf, ' ', argv, (sizeof(argv) / sizeof(argv[0])))) == 4) {
</del><ins>+                &amp;&amp; (argc = switch_separate_string(lbuf, ' ', argv, (sizeof(argv) / sizeof(argv[0])))) &amp;&amp; (argc == 4 || argc == 5)) {
</ins><span class="cx"> 
</span><span class="cx">                 args.input_callback = on_dtmf;
</span><span class="cx"> 
</span><span class="cx">                 switch_channel_set_variable(channel, SWITCH_PLAYBACK_TERMINATOR_USED, &quot;&quot;);
</span><span class="cx"> 
</span><del>-                switch_ivr_say(session, argv[3], argv[0], argv[1], argv[2], &amp;args);
</del><ins>+                switch_ivr_say(session, (argc == 4) ? argv[3] : argv[4], argv[0], argv[1], argv[2], (argc == 5) ? argv[3] : NULL ,&amp;args);
</ins><span class="cx">         } else {
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Usage: %s\n&quot;, SAY_SYNTAX);
</span><span class="cx">         }
</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 (16928 => 16929)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/say/mod_say_de/mod_say_de.c        2010-03-06 22:51:33 UTC (rev 16928)
+++ freeswitch/trunk/src/mod/say/mod_say_de/mod_say_de.c        2010-03-07 19:34:05 UTC (rev 16929)
</span><span class="lines">@@ -52,27 +52,36 @@
</span><span class="cx"> SWITCH_MODULE_LOAD_FUNCTION(mod_say_de_load);
</span><span class="cx"> SWITCH_MODULE_DEFINITION(mod_say_de, mod_say_de_load, NULL, NULL);
</span><span class="cx"> 
</span><del>-#define say_num(num, t) {                                                        \
-                char tmp[80];\
-                switch_status_t tstatus;\
-                switch_snprintf(tmp, sizeof(tmp), &quot;%u&quot;, (unsigned)num);                                \
-        if ((tstatus = de_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
-                return tstatus;\
-        }}\
</del><ins>+#define say_num(num, meth) {                                                                                        \
+                char tmp[80];                                                                                                        \
+                switch_status_t tstatus;                                                                                \
+                switch_say_method_t smeth = say_args-&gt;method;                                        \
+                switch_say_type_t stype = say_args-&gt;type;                                                \
+                say_args-&gt;type = SST_ITEMS; say_args-&gt;method = meth;                        \
+                switch_snprintf(tmp, sizeof(tmp), &quot;%u&quot;, (unsigned)num);                        \
+                if ((tstatus =                                                                                                        \
+                         de_say_general_count(session, tmp, say_args, args))                \
+                        != SWITCH_STATUS_SUCCESS) {                                                                        \
+                        return tstatus;                                                                                                \
+                }                                                                                                                                \
+                say_args-&gt;method = smeth; say_args-&gt;type = stype;                                \
+        }                                                                                                                                        \
</ins><span class="cx"> 
</span><del>-#define say_file(...) {\
-                char tmp[80];\
-                switch_status_t tstatus;\
-                switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);\
-                if ((tstatus = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
-                        return tstatus;\
-                }\
-                if (!switch_channel_ready(switch_core_session_get_channel(session))) {\
-                        return SWITCH_STATUS_FALSE;\
-                }}\
</del><ins>+#define say_file(...) {                                                                                                        \
+                char tmp[80];                                                                                                        \
+                switch_status_t tstatus;                                                                                \
+                switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);                                        \
+                if ((tstatus =                                                                                                        \
+                         switch_ivr_play_file(session, NULL, tmp, args))                        \
+                        != SWITCH_STATUS_SUCCESS){                                                                        \
+                        return tstatus;                                                                                                \
+                }                                                                                                                                \
+                if (!switch_channel_ready(switch_core_session_get_channel(session))) { \
+                        return SWITCH_STATUS_FALSE;                                                                        \
+                }}                                                                                                                                \
</ins><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t de_spell(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t de_spell(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *p;
</span><span class="cx"> 
</span><span class="lines">@@ -81,9 +90,9 @@
</span><span class="cx">                 if (a &gt;= 48 &amp;&amp; a &lt;= 57) {
</span><span class="cx">                         say_file(&quot;digits/%d.wav&quot;, a - 48);
</span><span class="cx">                 } else {
</span><del>-                        if (type == SST_NAME_SPELLED) {
</del><ins>+                        if (say_args-&gt;type == SST_NAME_SPELLED) {
</ins><span class="cx">                                 say_file(&quot;ascii/%d.wav&quot;, a);
</span><del>-                        } else if (type == SST_NAME_PHONETIC) {
</del><ins>+                        } else if (say_args-&gt;type == SST_NAME_PHONETIC) {
</ins><span class="cx">                                 say_file(&quot;phonetic-ascii/%d.wav&quot;, a);
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -177,8 +186,7 @@
</span><span class="cx">         return ret;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static switch_status_t de_say_general_count(switch_core_session_t *session,
-                                                                                        char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t de_say_general_count(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         int in;
</span><span class="cx">         int x = 0;
</span><span class="lines">@@ -201,7 +209,7 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                switch (method) {
</del><ins>+                switch (say_args-&gt;method) {
</ins><span class="cx">                 case SSM_COUNTED:
</span><span class="cx">                 case SSM_PRONOUNCED:
</span><span class="cx">                         if ((status = play_group(SSM_PRONOUNCED, places[8], places[7], places[6], &quot;digits/million.wav&quot;, session, args)) != SWITCH_STATUS_SUCCESS) {
</span><span class="lines">@@ -210,7 +218,7 @@
</span><span class="cx">                         if ((status = play_group(SSM_PRONOUNCED, places[5], places[4], places[3], &quot;digits/thousand.wav&quot;, session, args)) != SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                                 return status;
</span><span class="cx">                         }
</span><del>-                        if ((status = play_group(method, places[2], places[1], places[0], NULL, session, args)) != SWITCH_STATUS_SUCCESS) {
</del><ins>+                        if ((status = play_group(say_args-&gt;method, places[2], places[1], places[0], NULL, session, args)) != SWITCH_STATUS_SUCCESS) {
</ins><span class="cx">                                 return status;
</span><span class="cx">                         }
</span><span class="cx">                         break;
</span><span class="lines">@@ -233,7 +241,7 @@
</span><span class="cx"> }
</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_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t de_ip(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *a, *b, *c, *d;
</span><span class="cx">         if (!(a = switch_core_session_strdup(session, tosay))) {
</span><span class="lines">@@ -258,27 +266,26 @@
</span><span class="cx"> 
</span><span class="cx">         *d++ = '\0';
</span><span class="cx"> 
</span><del>-        say_num(atoi(a), method);
</del><ins>+        say_num(atoi(a), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(b), method);
</del><ins>+        say_num(atoi(b), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(c), method);
</del><ins>+        say_num(atoi(c), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(d), method);
</del><ins>+        say_num(atoi(d), say_args-&gt;method);
</ins><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t de_say_time(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method,
-                                                                   switch_input_args_t *args)
</del><ins>+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)
</ins><span class="cx"> {
</span><span class="cx">         int32_t t;
</span><span class="cx">         switch_time_t target = 0;
</span><span class="cx">         switch_time_exp_t tm;
</span><span class="cx">         uint8_t say_date = 0, say_time = 0;
</span><span class="cx"> 
</span><del>-        if (type == SST_TIME_MEASUREMENT) {
</del><ins>+        if (say_args-&gt;type == SST_TIME_MEASUREMENT) {
</ins><span class="cx">                 int64_t hours = 0;
</span><span class="cx">                 int64_t minutes = 0;
</span><span class="cx">                 int64_t seconds = 0;
</span><span class="lines">@@ -365,7 +372,7 @@
</span><span class="cx">         }
</span><span class="cx">         switch_time_exp_lt(&amp;tm, target);
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_CURRENT_DATE_TIME:
</span><span class="cx">                 say_date = say_time = 1;
</span><span class="cx">                 break;
</span><span class="lines">@@ -416,8 +423,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t de_say_money(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method,
-                                                                        switch_input_args_t *args)
</del><ins>+static switch_status_t de_say_money(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char sbuf[16] = &quot;&quot;;                        /* enough for 999,999,999,999.99 (w/o the commas or leading $) */
</span><span class="cx">         char *dollars = NULL;
</span><span class="lines">@@ -449,7 +455,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* Say dollar amount */
</span><del>-        de_say_general_count(session, dollars, type, method, args);
</del><ins>+        de_say_general_count(session, dollars, say_args, args);
</ins><span class="cx">         if (atoi(dollars) == 1) {
</span><span class="cx">                 say_file(&quot;currency/dollar.wav&quot;);
</span><span class="cx">         } else {
</span><span class="lines">@@ -461,7 +467,7 @@
</span><span class="cx"> 
</span><span class="cx">         /* Say cents */
</span><span class="cx">         if (cents) {
</span><del>-                de_say_general_count(session, cents, type, method, args);
</del><ins>+                de_say_general_count(session, cents, say_args, args);
</ins><span class="cx">                 if (atoi(cents) == 1) {
</span><span class="cx">                         say_file(&quot;currency/cent.wav&quot;);
</span><span class="cx">                 } else {
</span><span class="lines">@@ -477,12 +483,12 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t de_say(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t de_say(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx"> 
</span><span class="cx">         switch_say_callback_t say_cb = NULL;
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_NUMBER:
</span><span class="cx">         case SST_ITEMS:
</span><span class="cx">         case SST_PERSONS:
</span><span class="lines">@@ -506,12 +512,12 @@
</span><span class="cx">                 say_cb = de_say_money;
</span><span class="cx">                 break;
</span><span class="cx">         default:
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, type);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, say_args-&gt;type);
</ins><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (say_cb) {
</span><del>-                return say_cb(session, tosay, type, method, args);
</del><ins>+                return say_cb(session, tosay, say_args, args);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_FALSE;
</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 (16928 => 16929)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c        2010-03-06 22:51:33 UTC (rev 16928)
+++ freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c        2010-03-07 19:34:05 UTC (rev 16929)
</span><span class="lines">@@ -51,27 +51,37 @@
</span><span class="cx"> SWITCH_MODULE_LOAD_FUNCTION(mod_say_en_load);
</span><span class="cx"> SWITCH_MODULE_DEFINITION(mod_say_en, mod_say_en_load, NULL, NULL);
</span><span class="cx"> 
</span><del>-#define say_num(num, t) {                                                        \
-                char tmp[80];\
-                switch_status_t tstatus;\
-                switch_snprintf(tmp, sizeof(tmp), &quot;%u&quot;, (unsigned)num);                                \
-        if ((tstatus = en_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
-                return tstatus;\
-        }}\
</del><ins>+#define say_num(num, meth) {                                                                                        \
+                char tmp[80];                                                                                                        \
+                switch_status_t tstatus;                                                                                \
+                switch_say_method_t smeth = say_args-&gt;method;                                        \
+                switch_say_type_t stype = say_args-&gt;type;                                                \
+                say_args-&gt;type = SST_ITEMS; say_args-&gt;method = meth;                        \
+                switch_snprintf(tmp, sizeof(tmp), &quot;%u&quot;, (unsigned)num);                        \
+                if ((tstatus =                                                                                                        \
+                         en_say_general_count(session, tmp, say_args, args))                \
+                        != SWITCH_STATUS_SUCCESS) {                                                                        \
+                        return tstatus;                                                                                                \
+                }                                                                                                                                \
+                say_args-&gt;method = smeth; say_args-&gt;type = stype;                                \
+        }                                                                                                                                        \
</ins><span class="cx"> 
</span><del>-#define say_file(...) {\
-                char tmp[80];\
-                switch_status_t tstatus;\
-                switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);\
-                if ((tstatus = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
-                        return tstatus;\
-                }\
-                if (!switch_channel_ready(switch_core_session_get_channel(session))) {\
-                        return SWITCH_STATUS_FALSE;\
-                }}\
</del><span class="cx"> 
</span><ins>+#define say_file(...) {                                                                                                        \
+                char tmp[80];                                                                                                        \
+                switch_status_t tstatus;                                                                                \
+                switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);                                        \
+                if ((tstatus =                                                                                                        \
+                         switch_ivr_play_file(session, NULL, tmp, args))                        \
+                        != SWITCH_STATUS_SUCCESS){                                                                        \
+                        return tstatus;                                                                                                \
+                }                                                                                                                                \
+                if (!switch_channel_ready(switch_core_session_get_channel(session))) { \
+                        return SWITCH_STATUS_FALSE;                                                                        \
+                }}                                                                                                                                \
</ins><span class="cx"> 
</span><del>-static switch_status_t en_spell(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+
+static switch_status_t en_spell(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *p;
</span><span class="cx"> 
</span><span class="lines">@@ -80,9 +90,9 @@
</span><span class="cx">                 if (a &gt;= 48 &amp;&amp; a &lt;= 57) {
</span><span class="cx">                         say_file(&quot;digits/%d.wav&quot;, a - 48);
</span><span class="cx">                 } else {
</span><del>-                        if (type == SST_NAME_SPELLED) {
</del><ins>+                        if (say_args-&gt;type == SST_NAME_SPELLED) {
</ins><span class="cx">                                 say_file(&quot;ascii/%d.wav&quot;, a);
</span><del>-                        } else if (type == SST_NAME_PHONETIC) {
</del><ins>+                        } else if (say_args-&gt;type == SST_NAME_PHONETIC) {
</ins><span class="cx">                                 say_file(&quot;phonetic-ascii/%d.wav&quot;, a);
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -170,8 +180,7 @@
</span><span class="cx">         return ret;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static switch_status_t en_say_general_count(switch_core_session_t *session,
-                                                                                        char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t en_say_general_count(switch_core_session_t *session,        char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         int in;
</span><span class="cx">         int x = 0;
</span><span class="lines">@@ -179,7 +188,7 @@
</span><span class="cx">         char sbuf[128] = &quot;&quot;;
</span><span class="cx">         switch_status_t status;
</span><span class="cx"> 
</span><del>-        if (method == SSM_ITERATED) {
</del><ins>+        if (say_args-&gt;method == SSM_ITERATED) {
</ins><span class="cx">                 if ((tosay = strip_commas(tosay, sbuf, sizeof(sbuf)))) {
</span><span class="cx">                         char *p;
</span><span class="cx">                         for (p = tosay; p &amp;&amp; *p; p++) {
</span><span class="lines">@@ -207,7 +216,7 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                switch (method) {
</del><ins>+                switch (say_args-&gt;method) {
</ins><span class="cx">                 case SSM_COUNTED:
</span><span class="cx">                 case SSM_PRONOUNCED:
</span><span class="cx">                         if ((status = play_group(SSM_PRONOUNCED, places[8], places[7], places[6], &quot;digits/million.wav&quot;, session, args)) != SWITCH_STATUS_SUCCESS) {
</span><span class="lines">@@ -216,7 +225,7 @@
</span><span class="cx">                         if ((status = play_group(SSM_PRONOUNCED, places[5], places[4], places[3], &quot;digits/thousand.wav&quot;, session, args)) != SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                                 return status;
</span><span class="cx">                         }
</span><del>-                        if ((status = play_group(method, places[2], places[1], places[0], NULL, session, args)) != SWITCH_STATUS_SUCCESS) {
</del><ins>+                        if ((status = play_group(say_args-&gt;method, places[2], places[1], places[0], NULL, session, args)) != SWITCH_STATUS_SUCCESS) {
</ins><span class="cx">                                 return status;
</span><span class="cx">                         }
</span><span class="cx">                         break;
</span><span class="lines">@@ -231,7 +240,7 @@
</span><span class="cx"> }
</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_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t en_ip(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *a, *b, *c, *d;
</span><span class="cx">         if (!(a = switch_core_session_strdup(session, tosay))) {
</span><span class="lines">@@ -256,20 +265,19 @@
</span><span class="cx"> 
</span><span class="cx">         *d++ = '\0';
</span><span class="cx"> 
</span><del>-        say_num(atoi(a), method);
</del><ins>+        say_num(atoi(a), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(b), method);
</del><ins>+        say_num(atoi(b), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(c), method);
</del><ins>+        say_num(atoi(c), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(d), method);
</del><ins>+        say_num(atoi(d), say_args-&gt;method);
</ins><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t en_say_time(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method,
-                                                                   switch_input_args_t *args)
</del><ins>+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)
</ins><span class="cx"> {
</span><span class="cx">         int32_t t;
</span><span class="cx">         switch_time_t target = 0, target_now = 0;
</span><span class="lines">@@ -278,7 +286,7 @@
</span><span class="cx">         switch_channel_t *channel = switch_core_session_get_channel(session);
</span><span class="cx">         const char *tz = switch_channel_get_variable(channel, &quot;timezone&quot;);
</span><span class="cx"> 
</span><del>-        if (type == SST_TIME_MEASUREMENT) {
</del><ins>+        if (say_args-&gt;type == SST_TIME_MEASUREMENT) {
</ins><span class="cx">                 int64_t hours = 0;
</span><span class="cx">                 int64_t minutes = 0;
</span><span class="cx">                 int64_t seconds = 0;
</span><span class="lines">@@ -381,7 +389,7 @@
</span><span class="cx">                 switch_time_exp_lt(&amp;tm_now, target_now);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_CURRENT_DATE_TIME:
</span><span class="cx">                 say_date = say_time = 1;
</span><span class="cx">                 break;
</span><span class="lines">@@ -481,8 +489,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t en_say_money(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method,
-                                                                        switch_input_args_t *args)
</del><ins>+static switch_status_t en_say_money(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char sbuf[16] = &quot;&quot;;                        /* enough for 999,999,999,999.99 (w/o the commas or leading $) */
</span><span class="cx">         char *dollars = NULL;
</span><span class="lines">@@ -514,7 +521,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* Say dollar amount */
</span><del>-        en_say_general_count(session, dollars, type, method, args);
</del><ins>+        en_say_general_count(session, dollars, say_args, args);
</ins><span class="cx">         if (atoi(dollars) == 1) {
</span><span class="cx">                 say_file(&quot;currency/dollar.wav&quot;);
</span><span class="cx">         } else {
</span><span class="lines">@@ -526,7 +533,7 @@
</span><span class="cx"> 
</span><span class="cx">         /* Say cents */
</span><span class="cx">         if (cents) {
</span><del>-                en_say_general_count(session, cents, type, method, args);
</del><ins>+                en_say_general_count(session, cents, say_args, args);
</ins><span class="cx">                 if (atoi(cents) == 1) {
</span><span class="cx">                         say_file(&quot;currency/cent.wav&quot;);
</span><span class="cx">                 } else {
</span><span class="lines">@@ -542,12 +549,12 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t en_say(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t en_say(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx"> 
</span><span class="cx">         switch_say_callback_t say_cb = NULL;
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_NUMBER:
</span><span class="cx">         case SST_ITEMS:
</span><span class="cx">         case SST_PERSONS:
</span><span class="lines">@@ -572,12 +579,12 @@
</span><span class="cx">                 say_cb = en_say_money;
</span><span class="cx">                 break;
</span><span class="cx">         default:
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, type);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, say_args-&gt;type);
</ins><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (say_cb) {
</span><del>-                return say_cb(session, tosay, type, method, args);
</del><ins>+                return say_cb(session, tosay, say_args, args);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_FALSE;
</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 (16928 => 16929)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/say/mod_say_es/mod_say_es.c        2010-03-06 22:51:33 UTC (rev 16928)
+++ freeswitch/trunk/src/mod/say/mod_say_es/mod_say_es.c        2010-03-07 19:34:05 UTC (rev 16929)
</span><span class="lines">@@ -51,27 +51,37 @@
</span><span class="cx"> SWITCH_MODULE_LOAD_FUNCTION(mod_say_es_load);
</span><span class="cx"> SWITCH_MODULE_DEFINITION(mod_say_es, mod_say_es_load, NULL, NULL);
</span><span class="cx"> 
</span><del>-#define say_num(num, t) {                                                        \
-                char tmp[80];\
-                switch_status_t tstatus;\
-                switch_snprintf(tmp, sizeof(tmp), &quot;%u&quot;, (unsigned)num);                                \
-        if ((tstatus = es_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
-                return tstatus;\
-        }}\
</del><ins>+#define say_num(num, meth) {                                                                                        \
+                char tmp[80];                                                                                                        \
+                switch_status_t tstatus;                                                                                \
+                switch_say_method_t smeth = say_args-&gt;method;                                        \
+                switch_say_type_t stype = say_args-&gt;type;                                                \
+                say_args-&gt;type = SST_ITEMS; say_args-&gt;method = meth;                        \
+                switch_snprintf(tmp, sizeof(tmp), &quot;%u&quot;, (unsigned)num);                        \
+                if ((tstatus =                                                                                                        \
+                         es_say_general_count(session, tmp, say_args, args))                \
+                        != SWITCH_STATUS_SUCCESS) {                                                                        \
+                        return tstatus;                                                                                                \
+                }                                                                                                                                \
+                say_args-&gt;method = smeth; say_args-&gt;type = stype;                                \
+        }                                                                                                                                        \
</ins><span class="cx"> 
</span><del>-#define say_file(...) {\
-                char tmp[80];\
-                switch_status_t tstatus;\
-                switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);\
-                if ((tstatus = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
-                        return tstatus;\
-                }\
-                if (!switch_channel_ready(switch_core_session_get_channel(session))) {\
-                        return SWITCH_STATUS_FALSE;\
-                }}\
</del><span class="cx"> 
</span><ins>+#define say_file(...) {                                                                                                        \
+                char tmp[80];                                                                                                        \
+                switch_status_t tstatus;                                                                                \
+                switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);                                        \
+                if ((tstatus =                                                                                                        \
+                         switch_ivr_play_file(session, NULL, tmp, args))                        \
+                        != SWITCH_STATUS_SUCCESS){                                                                        \
+                        return tstatus;                                                                                                \
+                }                                                                                                                                \
+                if (!switch_channel_ready(switch_core_session_get_channel(session))) { \
+                        return SWITCH_STATUS_FALSE;                                                                        \
+                }}                                                                                                                                \
</ins><span class="cx"> 
</span><del>-static switch_status_t es_spell(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+
+static switch_status_t es_spell(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *p;
</span><span class="cx"> 
</span><span class="lines">@@ -80,9 +90,9 @@
</span><span class="cx">                 if (a &gt;= 48 &amp;&amp; a &lt;= 57) {
</span><span class="cx">                         say_file(&quot;digits/%d.wav&quot;, a - 48);
</span><span class="cx">                 } else {
</span><del>-                        if (type == SST_NAME_SPELLED) {
</del><ins>+                        if (say_args-&gt;type == SST_NAME_SPELLED) {
</ins><span class="cx">                                 say_file(&quot;ascii/%d.wav&quot;, a);
</span><del>-                        } else if (type == SST_NAME_PHONETIC) {
</del><ins>+                        } else if (say_args-&gt;type == SST_NAME_PHONETIC) {
</ins><span class="cx">                                 say_file(&quot;phonetic-ascii/%d.wav&quot;, a);
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -196,8 +206,7 @@
</span><span class="cx">         return ret;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static switch_status_t es_say_general_count(switch_core_session_t *session,
-                                                                                        char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t es_say_general_count(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         int in;
</span><span class="cx">         int x = 0;
</span><span class="lines">@@ -220,7 +229,7 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                switch (method) {
</del><ins>+                switch (say_args-&gt;method) {
</ins><span class="cx">                 case SSM_COUNTED:
</span><span class="cx">                 case SSM_PRONOUNCED:
</span><span class="cx">                         if ((status = play_group(SSM_PRONOUNCED, places[8], places[7], places[6], &quot;digits/million.wav&quot;, session, args)) != SWITCH_STATUS_SUCCESS) {
</span><span class="lines">@@ -229,7 +238,7 @@
</span><span class="cx">                         if ((status = play_group(SSM_PRONOUNCED, places[5], places[4], places[3], &quot;digits/thousand.wav&quot;, session, args)) != SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                                 return status;
</span><span class="cx">                         }
</span><del>-                        if ((status = play_group(method, places[2], places[1], places[0], NULL, session, args)) != SWITCH_STATUS_SUCCESS) {
</del><ins>+                        if ((status = play_group(say_args-&gt;method, places[2], places[1], places[0], NULL, session, args)) != SWITCH_STATUS_SUCCESS) {
</ins><span class="cx">                                 return status;
</span><span class="cx">                         }
</span><span class="cx">                         break;
</span><span class="lines">@@ -252,7 +261,7 @@
</span><span class="cx"> }
</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_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t es_ip(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *a, *b, *c, *d;
</span><span class="cx">         if (!(a = switch_core_session_strdup(session, tosay))) {
</span><span class="lines">@@ -277,27 +286,26 @@
</span><span class="cx"> 
</span><span class="cx">         *d++ = '\0';
</span><span class="cx"> 
</span><del>-        say_num(atoi(a), method);
</del><ins>+        say_num(atoi(a), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(b), method);
</del><ins>+        say_num(atoi(b), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(c), method);
</del><ins>+        say_num(atoi(c), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(d), method);
</del><ins>+        say_num(atoi(d), say_args-&gt;method);
</ins><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t es_say_time(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method,
-                                                                   switch_input_args_t *args)
</del><ins>+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)
</ins><span class="cx"> {
</span><span class="cx">         int32_t t;
</span><span class="cx">         switch_time_t target = 0;
</span><span class="cx">         switch_time_exp_t tm;
</span><span class="cx">         uint8_t say_date = 0, say_time = 0;
</span><span class="cx"> 
</span><del>-        if (type == SST_TIME_MEASUREMENT) {
</del><ins>+        if (say_args-&gt;type == SST_TIME_MEASUREMENT) {
</ins><span class="cx">                 int64_t hours = 0;
</span><span class="cx">                 int64_t minutes = 0;
</span><span class="cx">                 int64_t seconds = 0;
</span><span class="lines">@@ -384,7 +392,7 @@
</span><span class="cx">         }
</span><span class="cx">         switch_time_exp_lt(&amp;tm, target);
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_CURRENT_DATE_TIME:
</span><span class="cx">                 say_date = say_time = 1;
</span><span class="cx">                 break;
</span><span class="lines">@@ -436,8 +444,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t es_say_money(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method,
-                                                                        switch_input_args_t *args)
</del><ins>+static switch_status_t es_say_money(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char sbuf[16] = &quot;&quot;;                        /* enough for 999,999,999,999.99 (w/o the commas or leading $) */
</span><span class="cx">         char *dollars = NULL;
</span><span class="lines">@@ -469,7 +476,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* Say dollar amount */
</span><del>-        es_say_general_count(session, dollars, type, method, args);
</del><ins>+        es_say_general_count(session, dollars, say_args, args);
</ins><span class="cx">         if (atoi(dollars) == 1) {
</span><span class="cx">                 say_file(&quot;currency/dollar.wav&quot;);
</span><span class="cx">         } else {
</span><span class="lines">@@ -481,7 +488,7 @@
</span><span class="cx"> 
</span><span class="cx">         /* Say cents */
</span><span class="cx">         if (cents) {
</span><del>-                es_say_general_count(session, cents, type, method, args);
</del><ins>+                es_say_general_count(session, cents, say_args, args);
</ins><span class="cx">                 if (atoi(cents) == 1) {
</span><span class="cx">                         say_file(&quot;currency/cent.wav&quot;);
</span><span class="cx">                 } else {
</span><span class="lines">@@ -497,12 +504,12 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t es_say(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t es_say(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx"> 
</span><span class="cx">         switch_say_callback_t say_cb = NULL;
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_NUMBER:
</span><span class="cx">         case SST_ITEMS:
</span><span class="cx">         case SST_PERSONS:
</span><span class="lines">@@ -526,12 +533,12 @@
</span><span class="cx">                 say_cb = es_say_money;
</span><span class="cx">                 break;
</span><span class="cx">         default:
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, type);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, say_args-&gt;type);
</ins><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (say_cb) {
</span><del>-                return say_cb(session, tosay, type, method, args);
</del><ins>+                return say_cb(session, tosay, say_args, args);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_FALSE;
</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 (16928 => 16929)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/say/mod_say_fr/mod_say_fr.c        2010-03-06 22:51:33 UTC (rev 16928)
+++ freeswitch/trunk/src/mod/say/mod_say_fr/mod_say_fr.c        2010-03-07 19:34:05 UTC (rev 16929)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">  * Anthony Minessale II &lt;anthm@freeswitch.org&gt;
</span><span class="cx">  * Michael B. Murdock &lt;mike@mmurdock.org&gt;
</span><span class="cx">  *
</span><del>- * mod_say_fr.c -- Say for English
</del><ins>+ * mod_say_fr.c -- Say for french
</ins><span class="cx">  *
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="lines">@@ -51,27 +51,37 @@
</span><span class="cx"> SWITCH_MODULE_LOAD_FUNCTION(mod_say_fr_load);
</span><span class="cx"> SWITCH_MODULE_DEFINITION(mod_say_fr, mod_say_fr_load, NULL, NULL);
</span><span class="cx"> 
</span><del>-#define say_num(num, t) {                                                        \
-                char tmp[80];\
-                switch_status_t tstatus;\
-                switch_snprintf(tmp, sizeof(tmp), &quot;%u&quot;, (unsigned)num);                                \
-        if ((tstatus = fr_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
-                return tstatus;\
-        }}\
</del><ins>+#define say_num(num, meth) {                                                                                        \
+                char tmp[80];                                                                                                        \
+                switch_status_t tstatus;                                                                                \
+                switch_say_method_t smeth = say_args-&gt;method;                                        \
+                switch_say_type_t stype = say_args-&gt;type;                                                \
+                say_args-&gt;type = SST_ITEMS; say_args-&gt;method = meth;                        \
+                switch_snprintf(tmp, sizeof(tmp), &quot;%u&quot;, (unsigned)num);                        \
+                if ((tstatus =                                                                                                        \
+                         fr_say_general_count(session, tmp, say_args, args))                \
+                        != SWITCH_STATUS_SUCCESS) {                                                                        \
+                        return tstatus;                                                                                                \
+                }                                                                                                                                \
+                say_args-&gt;method = smeth; say_args-&gt;type = stype;                                \
+        }                                                                                                                                        \
</ins><span class="cx"> 
</span><del>-#define say_file(...) {\
-                char tmp[80];\
-                switch_status_t tstatus;\
-                switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);\
-                if ((tstatus = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
-                        return tstatus;\
-                }\
-                if (!switch_channel_ready(switch_core_session_get_channel(session))) {\
-                        return SWITCH_STATUS_FALSE;\
-                }}\
</del><span class="cx"> 
</span><ins>+#define say_file(...) {                                                                                                        \
+                char tmp[80];                                                                                                        \
+                switch_status_t tstatus;                                                                                \
+                switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);                                        \
+                if ((tstatus =                                                                                                        \
+                         switch_ivr_play_file(session, NULL, tmp, args))                        \
+                        != SWITCH_STATUS_SUCCESS){                                                                        \
+                        return tstatus;                                                                                                \
+                }                                                                                                                                \
+                if (!switch_channel_ready(switch_core_session_get_channel(session))) { \
+                        return SWITCH_STATUS_FALSE;                                                                        \
+                }}                                                                                                                                \
</ins><span class="cx"> 
</span><del>-static switch_status_t fr_spell(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+
+static switch_status_t fr_spell(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *p;
</span><span class="cx"> 
</span><span class="lines">@@ -80,9 +90,9 @@
</span><span class="cx">                 if (a &gt;= 48 &amp;&amp; a &lt;= 57) {
</span><span class="cx">                         say_file(&quot;digits/%d.wav&quot;, a - 48);
</span><span class="cx">                 } else {
</span><del>-                        if (type == SST_NAME_SPELLED) {
</del><ins>+                        if (say_args-&gt;type == SST_NAME_SPELLED) {
</ins><span class="cx">                                 say_file(&quot;ascii/%d.wav&quot;, a);
</span><del>-                        } else if (type == SST_NAME_PHONETIC) {
</del><ins>+                        } else if (say_args-&gt;type == SST_NAME_PHONETIC) {
</ins><span class="cx">                                 say_file(&quot;phonetic-ascii/%d.wav&quot;, a);
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -166,8 +176,7 @@
</span><span class="cx">         return ret;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static switch_status_t fr_say_general_count(switch_core_session_t *session,
-                                                                                        char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t fr_say_general_count(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         int in;
</span><span class="cx">         int x = 0;
</span><span class="lines">@@ -190,7 +199,7 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                switch (method) {
</del><ins>+                switch (say_args-&gt;method) {
</ins><span class="cx">                 case SSM_COUNTED:
</span><span class="cx">                 case SSM_PRONOUNCED:
</span><span class="cx">                         if ((status = play_group(SSM_PRONOUNCED, places[8], places[7], places[6], &quot;digits/million.wav&quot;, session, args)) != SWITCH_STATUS_SUCCESS) {
</span><span class="lines">@@ -199,7 +208,7 @@
</span><span class="cx">                         if ((status = play_group(SSM_PRONOUNCED, places[5], places[4], places[3], &quot;digits/thousand.wav&quot;, session, args)) != SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                                 return status;
</span><span class="cx">                         }
</span><del>-                        if ((status = play_group(method, places[2], places[1], places[0], NULL, session, args)) != SWITCH_STATUS_SUCCESS) {
</del><ins>+                        if ((status = play_group(say_args-&gt;method, places[2], places[1], places[0], NULL, session, args)) != SWITCH_STATUS_SUCCESS) {
</ins><span class="cx">                                 return status;
</span><span class="cx">                         }
</span><span class="cx">                         break;
</span><span class="lines">@@ -222,7 +231,7 @@
</span><span class="cx"> }
</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_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t fr_ip(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *a, *b, *c, *d;
</span><span class="cx">         if (!(a = switch_core_session_strdup(session, tosay))) {
</span><span class="lines">@@ -247,27 +256,26 @@
</span><span class="cx"> 
</span><span class="cx">         *d++ = '\0';
</span><span class="cx"> 
</span><del>-        say_num(atoi(a), method);
</del><ins>+        say_num(atoi(a), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(b), method);
</del><ins>+        say_num(atoi(b), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(c), method);
</del><ins>+        say_num(atoi(c), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(d), method);
</del><ins>+        say_num(atoi(d), say_args-&gt;method);
</ins><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t fr_say_time(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method,
-                                                                   switch_input_args_t *args)
</del><ins>+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)
</ins><span class="cx"> {
</span><span class="cx">         int32_t t;
</span><span class="cx">         switch_time_t target = 0;
</span><span class="cx">         switch_time_exp_t tm;
</span><span class="cx">         uint8_t say_date = 0, say_time = 0;
</span><span class="cx"> 
</span><del>-        if (type == SST_TIME_MEASUREMENT) {
</del><ins>+        if (say_args-&gt;type == SST_TIME_MEASUREMENT) {
</ins><span class="cx">                 int64_t hours = 0;
</span><span class="cx">                 int64_t minutes = 0;
</span><span class="cx">                 int64_t seconds = 0;
</span><span class="lines">@@ -354,7 +362,7 @@
</span><span class="cx">         }
</span><span class="cx">         switch_time_exp_lt(&amp;tm, target);
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_CURRENT_DATE_TIME:
</span><span class="cx">                 say_date = say_time = 1;
</span><span class="cx">                 break;
</span><span class="lines">@@ -406,8 +414,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t fr_say_money(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method,
-                                                                        switch_input_args_t *args)
</del><ins>+static switch_status_t fr_say_money(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char sbuf[16] = &quot;&quot;;                        /* enough for 999,999,999,999.99 (w/o the commas or leading $) */
</span><span class="cx">         char *dollars = NULL;
</span><span class="lines">@@ -439,7 +446,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* Say dollar amount */
</span><del>-        fr_say_general_count(session, dollars, type, method, args);
</del><ins>+        fr_say_general_count(session, dollars, say_args, args);
</ins><span class="cx">         if (atoi(dollars) == 1) {
</span><span class="cx">                 say_file(&quot;currency/dollar.wav&quot;);
</span><span class="cx">         } else {
</span><span class="lines">@@ -451,7 +458,7 @@
</span><span class="cx"> 
</span><span class="cx">         /* Say cents */
</span><span class="cx">         if (cents) {
</span><del>-                fr_say_general_count(session, cents, type, method, args);
</del><ins>+                fr_say_general_count(session, cents, say_args, args);
</ins><span class="cx">                 if (atoi(cents) == 1) {
</span><span class="cx">                         say_file(&quot;currency/cent.wav&quot;);
</span><span class="cx">                 } else {
</span><span class="lines">@@ -467,12 +474,12 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t fr_say(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t fr_say(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx"> 
</span><span class="cx">         switch_say_callback_t say_cb = NULL;
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_NUMBER:
</span><span class="cx">         case SST_ITEMS:
</span><span class="cx">         case SST_PERSONS:
</span><span class="lines">@@ -496,12 +503,12 @@
</span><span class="cx">                 say_cb = fr_say_money;
</span><span class="cx">                 break;
</span><span class="cx">         default:
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, type);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, say_args-&gt;type);
</ins><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (say_cb) {
</span><del>-                return say_cb(session, tosay, type, method, args);
</del><ins>+                return say_cb(session, tosay, say_args, args);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_FALSE;
</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 (16928 => 16929)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/say/mod_say_hu/mod_say_hu.c        2010-03-06 22:51:33 UTC (rev 16928)
+++ freeswitch/trunk/src/mod/say/mod_say_hu/mod_say_hu.c        2010-03-07 19:34:05 UTC (rev 16929)
</span><span class="lines">@@ -51,27 +51,37 @@
</span><span class="cx"> SWITCH_MODULE_LOAD_FUNCTION(mod_say_hu_load);
</span><span class="cx"> SWITCH_MODULE_DEFINITION(mod_say_hu, mod_say_hu_load, NULL, NULL);
</span><span class="cx"> 
</span><del>-#define say_num(num, t) {                                                        \
-                char tmp[80];\
-                switch_status_t tstatus;\
-                switch_snprintf(tmp, sizeof(tmp), &quot;%u&quot;, (unsigned)num);                                \
-        if ((tstatus = hu_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
-                return tstatus;\
-        }}\
</del><ins>+#define say_num(num, meth) {                                                                                        \
+                char tmp[80];                                                                                                        \
+                switch_status_t tstatus;                                                                                \
+                switch_say_method_t smeth = say_args-&gt;method;                                        \
+                switch_say_type_t stype = say_args-&gt;type;                                                \
+                say_args-&gt;type = SST_ITEMS; say_args-&gt;method = meth;                        \
+                switch_snprintf(tmp, sizeof(tmp), &quot;%u&quot;, (unsigned)num);                        \
+                if ((tstatus =                                                                                                        \
+                         hu_say_general_count(session, tmp, say_args, args))                \
+                        != SWITCH_STATUS_SUCCESS) {                                                                        \
+                        return tstatus;                                                                                                \
+                }                                                                                                                                \
+                say_args-&gt;method = smeth; say_args-&gt;type = stype;                                \
+        }                                                                                                                                        \
</ins><span class="cx"> 
</span><del>-#define say_file(...) {\
-                char tmp[80];\
-                switch_status_t tstatus;\
-                switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);\
-                if ((tstatus = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
-                        return tstatus;\
-                }\
-                if (!switch_channel_ready(switch_core_session_get_channel(session))) {\
-                        return SWITCH_STATUS_FALSE;\
-                }}\
</del><span class="cx"> 
</span><ins>+#define say_file(...) {                                                                                                        \
+                char tmp[80];                                                                                                        \
+                switch_status_t tstatus;                                                                                \
+                switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);                                        \
+                if ((tstatus =                                                                                                        \
+                         switch_ivr_play_file(session, NULL, tmp, args))                        \
+                        != SWITCH_STATUS_SUCCESS){                                                                        \
+                        return tstatus;                                                                                                \
+                }                                                                                                                                \
+                if (!switch_channel_ready(switch_core_session_get_channel(session))) { \
+                        return SWITCH_STATUS_FALSE;                                                                        \
+                }}                                                                                                                                \
</ins><span class="cx"> 
</span><del>-static switch_status_t hu_spell(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+
+static switch_status_t hu_spell(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *p;
</span><span class="cx"> 
</span><span class="lines">@@ -80,9 +90,9 @@
</span><span class="cx">                 if (a &gt;= 48 &amp;&amp; a &lt;= 57) {
</span><span class="cx">                         say_file(&quot;digits/%d.wav&quot;, a - 48);
</span><span class="cx">                 } else {
</span><del>-                        if (type == SST_NAME_SPELLED) {
</del><ins>+                        if (say_args-&gt;type == SST_NAME_SPELLED) {
</ins><span class="cx">                                 say_file(&quot;ascii/%d.wav&quot;, a);
</span><del>-                        } else if (type == SST_NAME_PHONETIC) {
</del><ins>+                        } else if (say_args-&gt;type == SST_NAME_PHONETIC) {
</ins><span class="cx">                                 say_file(&quot;phonetic-ascii/%d.wav&quot;, a);
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -170,8 +180,7 @@
</span><span class="cx">         return ret;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static switch_status_t hu_say_general_count(switch_core_session_t *session,
-                                                                                        char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t hu_say_general_count(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         int in;
</span><span class="cx">         int x = 0;
</span><span class="lines">@@ -196,7 +205,7 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                switch (method) {
</del><ins>+                switch (say_args-&gt;method) {
</ins><span class="cx">                 case SSM_COUNTED:
</span><span class="cx">                 case SSM_PRONOUNCED:
</span><span class="cx">                         if ((status =
</span><span class="lines">@@ -207,7 +216,7 @@
</span><span class="cx">                                  play_group(SSM_PRONOUNCED, places[5], places[4], places[3], &quot;digits/thousand.wav&quot;, number, session, args)) != SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                                 return status;
</span><span class="cx">                         }
</span><del>-                        if ((status = play_group(method, places[2], places[1], places[0], NULL, number, session, args)) != SWITCH_STATUS_SUCCESS) {
</del><ins>+                        if ((status = play_group(say_args-&gt;method, places[2], places[1], places[0], NULL, number, session, args)) != SWITCH_STATUS_SUCCESS) {
</ins><span class="cx">                                 return status;
</span><span class="cx">                         }
</span><span class="cx">                         break;
</span><span class="lines">@@ -230,7 +239,7 @@
</span><span class="cx"> }
</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_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t hu_ip(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *a, *b, *c, *d;
</span><span class="cx">         if (!(a = switch_core_session_strdup(session, tosay))) {
</span><span class="lines">@@ -255,20 +264,19 @@
</span><span class="cx"> 
</span><span class="cx">         *d++ = '\0';
</span><span class="cx"> 
</span><del>-        say_num(atoi(a), method);
</del><ins>+        say_num(atoi(a), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(b), method);
</del><ins>+        say_num(atoi(b), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(c), method);
</del><ins>+        say_num(atoi(c), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(d), method);
</del><ins>+        say_num(atoi(d), say_args-&gt;method);
</ins><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t hu_say_time(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method,
-                                                                   switch_input_args_t *args)
</del><ins>+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)
</ins><span class="cx"> {
</span><span class="cx">         int32_t t;
</span><span class="cx">         switch_time_t target = 0, target_now = 0;
</span><span class="lines">@@ -277,7 +285,7 @@
</span><span class="cx">         switch_channel_t *channel = switch_core_session_get_channel(session);
</span><span class="cx">         const char *tz = switch_channel_get_variable(channel, &quot;timezone&quot;);
</span><span class="cx"> 
</span><del>-        if (type == SST_TIME_MEASUREMENT) {
</del><ins>+        if (say_args-&gt;type == SST_TIME_MEASUREMENT) {
</ins><span class="cx">                 int64_t hours = 0;
</span><span class="cx">                 int64_t minutes = 0;
</span><span class="cx">                 int64_t seconds = 0;
</span><span class="lines">@@ -368,7 +376,7 @@
</span><span class="cx">                 switch_time_exp_lt(&amp;tm_now, target_now);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_CURRENT_DATE_TIME:
</span><span class="cx">                 say_date = say_time = 1;
</span><span class="cx">                 break;
</span><span class="lines">@@ -444,8 +452,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t hu_say_money(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method,
-                                                                        switch_input_args_t *args)
</del><ins>+static switch_status_t hu_say_money(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char sbuf[16] = &quot;&quot;;
</span><span class="cx">         char *forint;
</span><span class="lines">@@ -466,7 +473,7 @@
</span><span class="cx">                 forint++;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        hu_say_general_count(session, forint, type, method, args);
</del><ins>+        hu_say_general_count(session, forint, say_args, args);
</ins><span class="cx">         say_file(&quot;currency/forint.wav&quot;);
</span><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="lines">@@ -474,12 +481,12 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t hu_say(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t hu_say(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx"> 
</span><span class="cx">         switch_say_callback_t say_cb = NULL;
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_NUMBER:
</span><span class="cx">         case SST_ITEMS:
</span><span class="cx">         case SST_PERSONS:
</span><span class="lines">@@ -504,12 +511,12 @@
</span><span class="cx">                 say_cb = hu_say_money;
</span><span class="cx">                 break;
</span><span class="cx">         default:
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, type);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, say_args-&gt;type);
</ins><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (say_cb) {
</span><del>-                return say_cb(session, tosay, type, method, args);
</del><ins>+                return say_cb(session, tosay, say_args, args);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_FALSE;
</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 (16928 => 16929)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/say/mod_say_it/mod_say_it.c        2010-03-06 22:51:33 UTC (rev 16928)
+++ freeswitch/trunk/src/mod/say/mod_say_it/mod_say_it.c        2010-03-07 19:34:05 UTC (rev 16929)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">  * Anthony Minessale II &lt;anthm@freeswitch.org&gt;
</span><span class="cx">  * Michael B. Murdock &lt;mike@mmurdock.org&gt;
</span><span class="cx">  *
</span><del>- * mod_say_it.c -- Say for English
</del><ins>+ * mod_say_it.c -- Say for Italian
</ins><span class="cx">  *
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="lines">@@ -51,14 +51,35 @@
</span><span class="cx"> SWITCH_MODULE_LOAD_FUNCTION(mod_say_it_load);
</span><span class="cx"> SWITCH_MODULE_DEFINITION(mod_say_it, mod_say_it_load, NULL, NULL);
</span><span class="cx"> 
</span><del>-#define say_num(num, t) {                                                        \
-                char tmp[80];\
-                switch_status_t tstatus;\
-                switch_snprintf(tmp, sizeof(tmp), &quot;%u&quot;, (unsigned)num);                                \
-        if ((tstatus = it_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
-                return tstatus;\
-        }}\
</del><ins>+#define say_num(num, meth) {                                                                                        \
+                char tmp[80];                                                                                                        \
+                switch_status_t tstatus;                                                                                \
+                switch_say_method_t smeth = say_args-&gt;method;                                        \
+                switch_say_type_t stype = say_args-&gt;type;                                                \
+                say_args-&gt;type = SST_ITEMS; say_args-&gt;method = meth;                        \
+                switch_snprintf(tmp, sizeof(tmp), &quot;%u&quot;, (unsigned)num);                        \
+                if ((tstatus =                                                                                                        \
+                         it_say_general_count(session, tmp, say_args, args))                \
+                        != SWITCH_STATUS_SUCCESS) {                                                                        \
+                        return tstatus;                                                                                                \
+                }                                                                                                                                \
+                say_args-&gt;method = smeth; say_args-&gt;type = stype;                                \
+        }                                                                                                                                        \
</ins><span class="cx"> 
</span><ins>+
+#define say_file(...) {                                                                                                        \
+                char tmp[80];                                                                                                        \
+                switch_status_t tstatus;                                                                                \
+                switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);                                        \
+                if ((tstatus =                                                                                                        \
+                         switch_ivr_play_file(session, NULL, tmp, args))                        \
+                        != SWITCH_STATUS_SUCCESS){                                                                        \
+                        return tstatus;                                                                                                \
+                }                                                                                                                                \
+                if (!switch_channel_ready(switch_core_session_get_channel(session))) { \
+                        return SWITCH_STATUS_FALSE;                                                                        \
+                }}                                                                                                                                \
+
</ins><span class="cx"> #define say_file(...) {\
</span><span class="cx">                 char tmp[80];\
</span><span class="cx">                 switch_status_t tstatus;\
</span><span class="lines">@@ -71,7 +92,7 @@
</span><span class="cx">                 }}\
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t it_spell(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t it_spell(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *p;
</span><span class="cx"> 
</span><span class="lines">@@ -80,9 +101,9 @@
</span><span class="cx">                 if (a &gt;= 48 &amp;&amp; a &lt;= 57) {
</span><span class="cx">                         say_file(&quot;digits/%d.wav&quot;, a - 48);
</span><span class="cx">                 } else {
</span><del>-                        if (type == SST_NAME_SPELLED) {
</del><ins>+                        if (say_args-&gt;type == SST_NAME_SPELLED) {
</ins><span class="cx">                                 say_file(&quot;ascii/%d.wav&quot;, a);
</span><del>-                        } else if (type == SST_NAME_PHONETIC) {
</del><ins>+                        } else if (say_args-&gt;type == SST_NAME_PHONETIC) {
</ins><span class="cx">                                 say_file(&quot;phonetic-ascii/%d.wav&quot;, a);
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -168,8 +189,7 @@
</span><span class="cx">         return ret;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static switch_status_t it_say_general_count(switch_core_session_t *session,
-                                                                                        char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t it_say_general_count(switch_core_session_t *session,        char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         int in;
</span><span class="cx">         int places_count = 0;
</span><span class="lines">@@ -207,7 +227,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 while (in &gt; 0 &amp;&amp; ++places_count &gt; 0 /* fake check to put in while */ );
</span><span class="cx"> 
</span><del>-                switch (method) {
</del><ins>+                switch (say_args-&gt;method) {
</ins><span class="cx">                 case SSM_COUNTED:
</span><span class="cx">                 case SSM_PRONOUNCED:
</span><span class="cx"> 
</span><span class="lines">@@ -241,7 +261,7 @@
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         /* Play last group */
</span><del>-                        if ((status = play_group(method, places[2], places[1], places[0], NULL, session, args)) != SWITCH_STATUS_SUCCESS) {
</del><ins>+                        if ((status = play_group(say_args-&gt;method, places[2], places[1], places[0], NULL, session, args)) != SWITCH_STATUS_SUCCESS) {
</ins><span class="cx">                                 return status;
</span><span class="cx">                         }
</span><span class="cx">                         break;
</span><span class="lines">@@ -264,7 +284,7 @@
</span><span class="cx"> }
</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_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t it_ip(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *a, *b, *c, *d;
</span><span class="cx">         if (!(a = switch_core_session_strdup(session, tosay))) {
</span><span class="lines">@@ -289,27 +309,26 @@
</span><span class="cx"> 
</span><span class="cx">         *d++ = '\0';
</span><span class="cx"> 
</span><del>-        say_num(atoi(a), method);
</del><ins>+        say_num(atoi(a), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(b), method);
</del><ins>+        say_num(atoi(b), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(c), method);
</del><ins>+        say_num(atoi(c), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(d), method);
</del><ins>+        say_num(atoi(d), say_args-&gt;method);
</ins><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t it_say_time(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method,
-                                                                   switch_input_args_t *args)
</del><ins>+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)
</ins><span class="cx"> {
</span><span class="cx">         int32_t t;
</span><span class="cx">         switch_time_t target = 0;
</span><span class="cx">         switch_time_exp_t tm;
</span><span class="cx">         uint8_t say_date = 0, say_time = 0;
</span><span class="cx"> 
</span><del>-        if (type == SST_TIME_MEASUREMENT) {
</del><ins>+        if (say_args-&gt;type == SST_TIME_MEASUREMENT) {
</ins><span class="cx">                 int64_t hours = 0;
</span><span class="cx">                 int64_t minutes = 0;
</span><span class="cx">                 int64_t seconds = 0;
</span><span class="lines">@@ -396,7 +415,7 @@
</span><span class="cx">         }
</span><span class="cx">         switch_time_exp_lt(&amp;tm, target);
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_CURRENT_DATE_TIME:
</span><span class="cx">                 say_date = say_time = 1;
</span><span class="cx">                 break;
</span><span class="lines">@@ -431,8 +450,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t it_say_money(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method,
-                                                                        switch_input_args_t *args)
</del><ins>+static switch_status_t it_say_money(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char sbuf[16] = &quot;&quot;;                        /* enough for 999,999,999,999.99 (w/o the commas or leading $) */
</span><span class="cx">         char *dollars = NULL;
</span><span class="lines">@@ -464,7 +482,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* Say dollar amount */
</span><del>-        it_say_general_count(session, dollars, type, method, args);
</del><ins>+        it_say_general_count(session, dollars, say_args, args);
</ins><span class="cx">         if (atoi(dollars) == 1) {
</span><span class="cx">                 say_file(&quot;currency/dollar.wav&quot;);
</span><span class="cx">         } else {
</span><span class="lines">@@ -476,7 +494,7 @@
</span><span class="cx"> 
</span><span class="cx">         /* Say cents */
</span><span class="cx">         if (cents) {
</span><del>-                it_say_general_count(session, cents, type, method, args);
</del><ins>+                it_say_general_count(session, cents, say_args, args);
</ins><span class="cx">                 if (atoi(cents) == 1) {
</span><span class="cx">                         say_file(&quot;currency/cent.wav&quot;);
</span><span class="cx">                 } else {
</span><span class="lines">@@ -492,12 +510,12 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t it_say(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t it_say(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx"> 
</span><span class="cx">         switch_say_callback_t say_cb = NULL;
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_NUMBER:
</span><span class="cx">         case SST_ITEMS:
</span><span class="cx">         case SST_PERSONS:
</span><span class="lines">@@ -521,12 +539,12 @@
</span><span class="cx">                 say_cb = it_say_money;
</span><span class="cx">                 break;
</span><span class="cx">         default:
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, type);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, say_args-&gt;type);
</ins><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (say_cb) {
</span><del>-                return say_cb(session, tosay, type, method, args);
</del><ins>+                return say_cb(session, tosay, say_args, args);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_FALSE;
</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 (16928 => 16929)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/say/mod_say_nl/mod_say_nl.c        2010-03-06 22:51:33 UTC (rev 16928)
+++ freeswitch/trunk/src/mod/say/mod_say_nl/mod_say_nl.c        2010-03-07 19:34:05 UTC (rev 16929)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">  * Anthony Minessale II &lt;anthm@freeswitch.org&gt;
</span><span class="cx">  * Michael B. Murdock &lt;mike@mmurdock.org&gt;
</span><span class="cx">  *
</span><del>- * mod_say_nl.c -- Say for English
</del><ins>+ * mod_say_nl.c -- Say for nl
</ins><span class="cx">  *
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="lines">@@ -51,27 +51,37 @@
</span><span class="cx"> SWITCH_MODULE_LOAD_FUNCTION(mod_say_nl_load);
</span><span class="cx"> SWITCH_MODULE_DEFINITION(mod_say_nl, mod_say_nl_load, NULL, NULL);
</span><span class="cx"> 
</span><del>-#define say_num(num, t) {                                                        \
-                char tmp[80];\
-                switch_status_t tstatus;\
-                switch_snprintf(tmp, sizeof(tmp), &quot;%u&quot;, (unsigned)num);                                \
-        if ((tstatus = nl_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
-                return tstatus;\
-        }}\
</del><ins>+#define say_num(num, meth) {                                                                                        \
+                char tmp[80];                                                                                                        \
+                switch_status_t tstatus;                                                                                \
+                switch_say_method_t smeth = say_args-&gt;method;                                        \
+                switch_say_type_t stype = say_args-&gt;type;                                                \
+                say_args-&gt;type = SST_ITEMS; say_args-&gt;method = meth;                        \
+                switch_snprintf(tmp, sizeof(tmp), &quot;%u&quot;, (unsigned)num);                        \
+                if ((tstatus =                                                                                                        \
+                         nl_say_general_count(session, tmp, say_args, args))                \
+                        != SWITCH_STATUS_SUCCESS) {                                                                        \
+                        return tstatus;                                                                                                \
+                }                                                                                                                                \
+                say_args-&gt;method = smeth; say_args-&gt;type = stype;                                \
+        }                                                                                                                                        \
</ins><span class="cx"> 
</span><del>-#define say_file(...) {\
-                char tmp[80];\
-                switch_status_t tstatus;\
-                switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);\
-                if ((tstatus = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
-                        return tstatus;\
-                }\
-                if (!switch_channel_ready(switch_core_session_get_channel(session))) {\
-                        return SWITCH_STATUS_FALSE;\
-                }}\
</del><span class="cx"> 
</span><ins>+#define say_file(...) {                                                                                                        \
+                char tmp[80];                                                                                                        \
+                switch_status_t tstatus;                                                                                \
+                switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);                                        \
+                if ((tstatus =                                                                                                        \
+                         switch_ivr_play_file(session, NULL, tmp, args))                        \
+                        != SWITCH_STATUS_SUCCESS){                                                                        \
+                        return tstatus;                                                                                                \
+                }                                                                                                                                \
+                if (!switch_channel_ready(switch_core_session_get_channel(session))) { \
+                        return SWITCH_STATUS_FALSE;                                                                        \
+                }}                                                                                                                                \
</ins><span class="cx"> 
</span><del>-static switch_status_t nl_spell(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+
+static switch_status_t nl_spell(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *p;
</span><span class="cx"> 
</span><span class="lines">@@ -80,9 +90,9 @@
</span><span class="cx">                 if (a &gt;= 48 &amp;&amp; a &lt;= 57) {
</span><span class="cx">                         say_file(&quot;digits/%d.wav&quot;, a - 48);
</span><span class="cx">                 } else {
</span><del>-                        if (type == SST_NAME_SPELLED) {
</del><ins>+                        if (say_args-&gt;type == SST_NAME_SPELLED) {
</ins><span class="cx">                                 say_file(&quot;ascii/%d.wav&quot;, a);
</span><del>-                        } else if (type == SST_NAME_PHONETIC) {
</del><ins>+                        } else if (say_args-&gt;type == SST_NAME_PHONETIC) {
</ins><span class="cx">                                 say_file(&quot;phonetic-ascii/%d.wav&quot;, a);
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -166,8 +176,7 @@
</span><span class="cx">         return ret;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static switch_status_t nl_say_general_count(switch_core_session_t *session,
-                                                                                        char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t nl_say_general_count(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         int in;
</span><span class="cx">         int x = 0;
</span><span class="lines">@@ -190,7 +199,7 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                switch (method) {
</del><ins>+                switch (say_args-&gt;method) {
</ins><span class="cx">                 case SSM_COUNTED:
</span><span class="cx">                 case SSM_PRONOUNCED:
</span><span class="cx">                         if ((status = play_group(SSM_PRONOUNCED, places[8], places[7], places[6], &quot;digits/million.wav&quot;, session, args)) != SWITCH_STATUS_SUCCESS) {
</span><span class="lines">@@ -199,7 +208,7 @@
</span><span class="cx">                         if ((status = play_group(SSM_PRONOUNCED, places[5], places[4], places[3], &quot;digits/thousand.wav&quot;, session, args)) != SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                                 return status;
</span><span class="cx">                         }
</span><del>-                        if ((status = play_group(method, places[2], places[1], places[0], NULL, session, args)) != SWITCH_STATUS_SUCCESS) {
</del><ins>+                        if ((status = play_group(say_args-&gt;method, places[2], places[1], places[0], NULL, session, args)) != SWITCH_STATUS_SUCCESS) {
</ins><span class="cx">                                 return status;
</span><span class="cx">                         }
</span><span class="cx">                         break;
</span><span class="lines">@@ -222,7 +231,7 @@
</span><span class="cx"> }
</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_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t nl_ip(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *a, *b, *c, *d;
</span><span class="cx">         if (!(a = switch_core_session_strdup(session, tosay))) {
</span><span class="lines">@@ -247,27 +256,26 @@
</span><span class="cx"> 
</span><span class="cx">         *d++ = '\0';
</span><span class="cx"> 
</span><del>-        say_num(atoi(a), method);
</del><ins>+        say_num(atoi(a), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(b), method);
</del><ins>+        say_num(atoi(b), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(c), method);
</del><ins>+        say_num(atoi(c), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(d), method);
</del><ins>+        say_num(atoi(d), say_args-&gt;method);
</ins><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t nl_say_time(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method,
-                                                                   switch_input_args_t *args)
</del><ins>+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)
</ins><span class="cx"> {
</span><span class="cx">         int32_t t;
</span><span class="cx">         switch_time_t target = 0;
</span><span class="cx">         switch_time_exp_t tm;
</span><span class="cx">         uint8_t say_date = 0, say_time = 0;
</span><span class="cx"> 
</span><del>-        if (type == SST_TIME_MEASUREMENT) {
</del><ins>+        if (say_args-&gt;type == SST_TIME_MEASUREMENT) {
</ins><span class="cx">                 int64_t hours = 0;
</span><span class="cx">                 int64_t minutes = 0;
</span><span class="cx">                 int64_t seconds = 0;
</span><span class="lines">@@ -354,7 +362,7 @@
</span><span class="cx">         }
</span><span class="cx">         switch_time_exp_lt(&amp;tm, target);
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_CURRENT_DATE_TIME:
</span><span class="cx">                 say_date = say_time = 1;
</span><span class="cx">                 break;
</span><span class="lines">@@ -406,8 +414,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t nl_say_money(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method,
-                                                                        switch_input_args_t *args)
</del><ins>+static switch_status_t nl_say_money(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char sbuf[16] = &quot;&quot;;                        /* enough for 999,999,999,999.99 (w/o the commas or leading $) */
</span><span class="cx">         char *dollars = NULL;
</span><span class="lines">@@ -439,7 +446,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* Say dollar amount */
</span><del>-        nl_say_general_count(session, dollars, type, method, args);
</del><ins>+        nl_say_general_count(session, dollars, say_args, args);
</ins><span class="cx">         if (atoi(dollars) == 1) {
</span><span class="cx">                 say_file(&quot;currency/dollar.wav&quot;);
</span><span class="cx">         } else {
</span><span class="lines">@@ -451,7 +458,7 @@
</span><span class="cx"> 
</span><span class="cx">         /* Say cents */
</span><span class="cx">         if (cents) {
</span><del>-                nl_say_general_count(session, cents, type, method, args);
</del><ins>+                nl_say_general_count(session, cents, say_args, args);
</ins><span class="cx">                 if (atoi(cents) == 1) {
</span><span class="cx">                         say_file(&quot;currency/cent.wav&quot;);
</span><span class="cx">                 } else {
</span><span class="lines">@@ -467,12 +474,12 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static switch_status_t nl_say(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t nl_say(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx"> 
</span><span class="cx">         switch_say_callback_t say_cb = NULL;
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_NUMBER:
</span><span class="cx">         case SST_ITEMS:
</span><span class="cx">         case SST_PERSONS:
</span><span class="lines">@@ -496,12 +503,12 @@
</span><span class="cx">                 say_cb = nl_say_money;
</span><span class="cx">                 break;
</span><span class="cx">         default:
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, type);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, say_args-&gt;type);
</ins><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (say_cb) {
</span><del>-                return say_cb(session, tosay, type, method, args);
</del><ins>+                return say_cb(session, tosay, say_args, args);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_FALSE;
</span></span></pre></div>
<a id="freeswitchtrunksrcmodsaymod_say_rumod_say_ruc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/say/mod_say_ru/mod_say_ru.c (16928 => 16929)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/say/mod_say_ru/mod_say_ru.c        2010-03-06 22:51:33 UTC (rev 16928)
+++ freeswitch/trunk/src/mod/say/mod_say_ru/mod_say_ru.c        2010-03-07 19:34:05 UTC (rev 16929)
</span><span class="lines">@@ -111,7 +111,7 @@
</span><span class="cx">         return ret;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static switch_status_t ru_spell(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t ru_spell(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *p;
</span><span class="cx"> 
</span><span class="lines">@@ -120,9 +120,9 @@
</span><span class="cx">                 if (a &gt;= 48 &amp;&amp; a &lt;= 57) {
</span><span class="cx">                         say_file(&quot;digits/%d.wav&quot;, a - 48);
</span><span class="cx">                 } else {
</span><del>-                        if (type == SST_NAME_SPELLED) {
</del><ins>+                        if (say_args-&gt;type == SST_NAME_SPELLED) {
</ins><span class="cx">                                 say_file(&quot;ascii/%d.wav&quot;, a);
</span><del>-                        } else if (type == SST_NAME_PHONETIC) {
</del><ins>+                        } else if (say_args-&gt;type == SST_NAME_PHONETIC) {
</ins><span class="cx">                                 say_file(&quot;phonetic-ascii/%d.wav&quot;, a);
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -286,14 +286,13 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> //дописать
</span><del>-static switch_status_t ru_say_general_count(switch_core_session_t *session,
-                                                                                        char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t ru_say_general_count(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         switch_status_t status;
</span><span class="cx">         casus_t casus;                                //падеж
</span><span class="cx">         say_type_t say_type;                //тип произношения
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_MESSAGES:
</span><span class="cx">                 say_type = it_c;
</span><span class="cx">                 casus = nominativus;
</span><span class="lines">@@ -308,8 +307,7 @@
</span><span class="cx">         return status;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static switch_status_t ru_say_money(switch_core_session_t *session, char *tosay, switch_say_type_t type,
-                                                                        switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t ru_say_money(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char sbuf[16] = &quot;&quot;;
</span><span class="cx">         char *rubles = NULL;
</span><span class="lines">@@ -380,8 +378,7 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static switch_status_t ru_say_time(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method,
-                                                                   switch_input_args_t *args)
</del><ins>+static switch_status_t ru_say_time(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         int32_t t;
</span><span class="cx">         char buf[80];
</span><span class="lines">@@ -391,9 +388,9 @@
</span><span class="cx">         switch_channel_t *channel = switch_core_session_get_channel(session);
</span><span class="cx">         const char *tz = switch_channel_get_variable(channel, &quot;timezone&quot;);
</span><span class="cx"> 
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot; ru_say_time %s  type=%d method=%d\n&quot;, tosay, type, method);
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot; ru_say_time %s  type=%d method=%d\n&quot;, tosay, say_args-&gt;type, say_args-&gt;method);
</ins><span class="cx"> 
</span><del>-        if (type == SST_TIME_MEASUREMENT) {
</del><ins>+        if (say_args-&gt;type == SST_TIME_MEASUREMENT) {
</ins><span class="cx">                 int64_t hours = 0;
</span><span class="cx">                 int64_t minutes = 0;
</span><span class="cx">                 int64_t seconds = 0;
</span><span class="lines">@@ -492,7 +489,7 @@
</span><span class="cx">                 switch_time_exp_lt(&amp;tm_now, target_now);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_CURRENT_DATE_TIME:
</span><span class="cx">                 say_date = say_time = 1;
</span><span class="cx">                 break;
</span><span class="lines">@@ -562,12 +559,13 @@
</span><span class="cx">         }
</span><span class="cx">         if (say_time) {
</span><span class="cx">                 switch_snprintf(buf, sizeof(buf), &quot;%d:%d:%d&quot;, tm.tm_hour + 1, tm.tm_min, tm.tm_sec);
</span><del>-                ru_say_time(session, buf, SST_TIME_MEASUREMENT, method, args);
</del><ins>+                say_args-&gt;type = SST_TIME_MEASUREMENT;
+                ru_say_time(session, buf, say_args, args);
</ins><span class="cx">         }
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-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)
</del><ins>+static switch_status_t ru_ip(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *a, *b, *c, *d;
</span><span class="cx">         if (!(a = switch_core_session_strdup(session, tosay))) {
</span><span class="lines">@@ -605,11 +603,11 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-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)
</del><ins>+static switch_status_t ru_say(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         switch_say_callback_t say_cb = NULL;
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_NUMBER:
</span><span class="cx">         case SST_ITEMS:
</span><span class="cx">         case SST_PERSONS:
</span><span class="lines">@@ -642,12 +640,12 @@
</span><span class="cx">                 say_cb = ru_say_money;
</span><span class="cx">                 break;
</span><span class="cx">         default:
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, type);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, say_args-&gt;type);
</ins><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (say_cb) {
</span><del>-                return say_cb(session, tosay, type, method, args);
</del><ins>+                return say_cb(session, tosay, say_args, args);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_FALSE;
</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 (16928 => 16929)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/say/mod_say_th/mod_say_th.c        2010-03-06 22:51:33 UTC (rev 16928)
+++ freeswitch/trunk/src/mod/say/mod_say_th/mod_say_th.c        2010-03-07 19:34:05 UTC (rev 16929)
</span><span class="lines">@@ -58,29 +58,36 @@
</span><span class="cx"> SWITCH_MODULE_LOAD_FUNCTION(mod_say_th_load);
</span><span class="cx"> SWITCH_MODULE_DEFINITION(mod_say_th, mod_say_th_load, NULL, NULL);
</span><span class="cx"> 
</span><del>-#define say_num(num, t) {                                                        \
-                char tmp[80];\
-                switch_status_t tstatus;\
-                switch_snprintf(tmp, sizeof(tmp), &quot;%u&quot;, (unsigned)num);                                \
-        if ((tstatus = th_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
-                return tstatus;\
-        }\
-}\
</del><ins>+#define say_num(num, meth) {                                                                                        \
+                char tmp[80];                                                                                                        \
+                switch_status_t tstatus;                                                                                \
+                switch_say_method_t smeth = say_args-&gt;method;                                        \
+                switch_say_type_t stype = say_args-&gt;type;                                                \
+                say_args-&gt;type = SST_ITEMS; say_args-&gt;method = meth;                        \
+                switch_snprintf(tmp, sizeof(tmp), &quot;%u&quot;, (unsigned)num);                        \
+                if ((tstatus =                                                                                                        \
+                         th_say_general_count(session, tmp, say_args, args))                \
+                        != SWITCH_STATUS_SUCCESS) {                                                                        \
+                        return tstatus;                                                                                                \
+                }                                                                                                                                \
+                say_args-&gt;method = smeth; say_args-&gt;type = stype;                                \
+        }                                                                                                                                        \
</ins><span class="cx"> 
</span><del>-#define say_file(...) {\
-                char tmp[80];\
-                switch_status_t tstatus;\
-                switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);\
-                if ((tstatus = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
-                        return tstatus;\
-                }\
-                if (!switch_channel_ready(switch_core_session_get_channel(session))) {\
-                        return SWITCH_STATUS_FALSE;\
-                }\
-}\
</del><span class="cx"> 
</span><ins>+#define say_file(...) {                                                                                                        \
+                char tmp[80];                                                                                                        \
+                switch_status_t tstatus;                                                                                \
+                switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);                                        \
+                if ((tstatus =                                                                                                        \
+                         switch_ivr_play_file(session, NULL, tmp, args))                        \
+                        != SWITCH_STATUS_SUCCESS){                                                                        \
+                        return tstatus;                                                                                                \
+                }                                                                                                                                \
+                if (!switch_channel_ready(switch_core_session_get_channel(session))) { \
+                        return SWITCH_STATUS_FALSE;                                                                        \
+                }}                                                                                                                                \
</ins><span class="cx"> 
</span><del>-static switch_status_t th_spell(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t th_spell(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *p;
</span><span class="cx"> 
</span><span class="lines">@@ -89,9 +96,9 @@
</span><span class="cx">                 if (a &gt;= '0' &amp;&amp; a &lt;= '9') {
</span><span class="cx">                         say_file(&quot;digits/%d.wav&quot;, a - '0');
</span><span class="cx">                 } else {
</span><del>-                        if (type == SST_NAME_SPELLED) {
</del><ins>+                        if (say_args-&gt;type == SST_NAME_SPELLED) {
</ins><span class="cx">                                 say_file(&quot;ascii/%d.wav&quot;, a);
</span><del>-                        } else if (type == SST_NAME_PHONETIC) {
</del><ins>+                        } else if (say_args-&gt;type == SST_NAME_PHONETIC) {
</ins><span class="cx">                                 say_file(&quot;phonetic-ascii/%d.wav&quot;, a);
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -146,8 +153,7 @@
</span><span class="cx">         return ret;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static switch_status_t th_say_general_count(switch_core_session_t *session,
-                                                                                        char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+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)
</ins><span class="cx"> {
</span><span class="cx">         int in;
</span><span class="cx">         char sbuf[13] = &quot;&quot;;
</span><span class="lines">@@ -164,7 +170,7 @@
</span><span class="cx">         if (in != 0) {
</span><span class="cx">                 snprintf(digits, sizeof(digits), &quot;%10.10d&quot;, in);
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Say: %s \n&quot;, digits);
</span><del>-                switch (method) {
</del><ins>+                switch (say_args-&gt;method) {
</ins><span class="cx">                 case SSM_COUNTED:
</span><span class="cx">                         say_file(&quot;digits/ordinal.wav&quot;);
</span><span class="cx">                         /* Fall through */
</span><span class="lines">@@ -286,7 +292,7 @@
</span><span class="cx"> }
</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_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t th_ip(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *a, *b, *c, *d;
</span><span class="cx">         if (!(a = switch_core_session_strdup(session, tosay))) {
</span><span class="lines">@@ -311,19 +317,18 @@
</span><span class="cx"> 
</span><span class="cx">         *d++ = '\0';
</span><span class="cx"> 
</span><del>-        say_num(atoi(a), method);
</del><ins>+        say_num(atoi(a), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(b), method);
</del><ins>+        say_num(atoi(b), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(c), method);
</del><ins>+        say_num(atoi(c), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(d), method);
</del><ins>+        say_num(atoi(d), say_args-&gt;method);
</ins><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static switch_status_t th_say_time(switch_core_session_t *session,
-                                                                   char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+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)
</ins><span class="cx"> {
</span><span class="cx">         int32_t t;
</span><span class="cx">         switch_time_t target = 0;
</span><span class="lines">@@ -335,7 +340,7 @@
</span><span class="cx">         uint8_t say_date = 0;
</span><span class="cx">         uint8_t say_time = 0;
</span><span class="cx"> 
</span><del>-        if (type == SST_TIME_MEASUREMENT) {
</del><ins>+        if (say_args-&gt;type == SST_TIME_MEASUREMENT) {
</ins><span class="cx">                 int64_t hours = 0;
</span><span class="cx">                 int64_t minutes = 0;
</span><span class="cx">                 int64_t seconds = 0;
</span><span class="lines">@@ -421,7 +426,7 @@
</span><span class="cx">                 target = switch_micro_time_now();
</span><span class="cx">         switch_time_exp_lt(&amp;tm, target);
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_CURRENT_DATE_TIME:
</span><span class="cx">                 say_date = say_time = 1;
</span><span class="cx">                 break;
</span><span class="lines">@@ -514,8 +519,7 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static switch_status_t th_say_money(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method,
-                                                                        switch_input_args_t *args)
</del><ins>+static switch_status_t th_say_money(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char sbuf[16] = &quot;&quot;;                        /* enough for 999,999,999,999.99 (w/o the commas or leading $) */
</span><span class="cx">         char *dollars = NULL;
</span><span class="lines">@@ -547,12 +551,12 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* Say dollar amount */
</span><del>-        th_say_general_count(session, dollars, type, method, args);
</del><ins>+        th_say_general_count(session, dollars, say_args, args);
</ins><span class="cx">         say_file(&quot;currency/dollar.wav&quot;);
</span><span class="cx"> 
</span><span class="cx">         /* Say cents */
</span><span class="cx">         if (cents) {
</span><del>-                th_say_general_count(session, cents, type, method, args);
</del><ins>+                th_say_general_count(session, cents, say_args, args);
</ins><span class="cx">         } else {
</span><span class="cx">                 say_file(&quot;digits/0.wav&quot;);
</span><span class="cx">         }
</span><span class="lines">@@ -561,11 +565,11 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static switch_status_t th_say(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t th_say(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         switch_say_callback_t say_cb = NULL;
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_NUMBER:
</span><span class="cx">         case SST_ITEMS:
</span><span class="cx">         case SST_PERSONS:
</span><span class="lines">@@ -589,12 +593,12 @@
</span><span class="cx">                 say_cb = th_say_money;
</span><span class="cx">                 break;
</span><span class="cx">         default:
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, type);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, say_args-&gt;type);
</ins><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (say_cb) {
</span><del>-                return say_cb(session, tosay, type, method, args);
</del><ins>+                return say_cb(session, tosay, say_args, args);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_FALSE;
</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 (16928 => 16929)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/say/mod_say_zh/mod_say_zh.c        2010-03-06 22:51:33 UTC (rev 16928)
+++ freeswitch/trunk/src/mod/say/mod_say_zh/mod_say_zh.c        2010-03-07 19:34:05 UTC (rev 16929)
</span><span class="lines">@@ -58,29 +58,35 @@
</span><span class="cx"> SWITCH_MODULE_LOAD_FUNCTION(mod_say_zh_load);
</span><span class="cx"> SWITCH_MODULE_DEFINITION(mod_say_zh, mod_say_zh_load, NULL, NULL);
</span><span class="cx"> 
</span><del>-#define say_num(num, t) {                                                        \
-                char tmp[80];\
-                switch_status_t tstatus;\
-                switch_snprintf(tmp, sizeof(tmp), &quot;%u&quot;, (unsigned)num);                                \
-        if ((tstatus = zh_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
-                return tstatus;\
-        }\
-}\
</del><ins>+#define say_num(num, meth) {                                                                                        \
+                char tmp[80];                                                                                                        \
+                switch_status_t tstatus;                                                                                \
+                switch_say_method_t smeth = say_args-&gt;method;                                        \
+                switch_say_type_t stype = say_args-&gt;type;                                                \
+                say_args-&gt;type = SST_ITEMS; say_args-&gt;method = meth;                        \
+                switch_snprintf(tmp, sizeof(tmp), &quot;%u&quot;, (unsigned)num);                        \
+                if ((tstatus =                                                                                                        \
+                         zh_say_general_count(session, tmp, say_args, args))                \
+                        != SWITCH_STATUS_SUCCESS) {                                                                        \
+                        return tstatus;                                                                                                \
+                }                                                                                                                                \
+                say_args-&gt;method = smeth; say_args-&gt;type = stype;                                \
+        }                                                                                                                                        \
</ins><span class="cx"> 
</span><del>-#define say_file(...) {\
-                char tmp[80];\
-                switch_status_t tstatus;\
-                switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);\
-                if ((tstatus = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
-                        return tstatus;\
-                }\
-                if (!switch_channel_ready(switch_core_session_get_channel(session))) {\
-                        return SWITCH_STATUS_FALSE;\
-                }\
-}\
</del><ins>+#define say_file(...) {                                                                                                        \
+                char tmp[80];                                                                                                        \
+                switch_status_t tstatus;                                                                                \
+                switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);                                        \
+                if ((tstatus =                                                                                                        \
+                         switch_ivr_play_file(session, NULL, tmp, args))                        \
+                        != SWITCH_STATUS_SUCCESS){                                                                        \
+                        return tstatus;                                                                                                \
+                }                                                                                                                                \
+                if (!switch_channel_ready(switch_core_session_get_channel(session))) { \
+                        return SWITCH_STATUS_FALSE;                                                                        \
+                }}                                                                                                                                \
</ins><span class="cx"> 
</span><del>-
-static switch_status_t zh_spell(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t zh_spell(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *p;
</span><span class="cx"> 
</span><span class="lines">@@ -89,9 +95,9 @@
</span><span class="cx">                 if (a &gt;= '0' &amp;&amp; a &lt;= '9') {
</span><span class="cx">                         say_file(&quot;digits/%d.wav&quot;, a - '0');
</span><span class="cx">                 } else {
</span><del>-                        if (type == SST_NAME_SPELLED) {
</del><ins>+                        if (say_args-&gt;type == SST_NAME_SPELLED) {
</ins><span class="cx">                                 say_file(&quot;ascii/%d.wav&quot;, a);
</span><del>-                        } else if (type == SST_NAME_PHONETIC) {
</del><ins>+                        } else if (say_args-&gt;type == SST_NAME_PHONETIC) {
</ins><span class="cx">                                 say_file(&quot;phonetic-ascii/%d.wav&quot;, a);
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -146,8 +152,7 @@
</span><span class="cx">         return ret;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static switch_status_t zh_say_general_count(switch_core_session_t *session,
-                                                                                        char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+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)
</ins><span class="cx"> {
</span><span class="cx">         int in;
</span><span class="cx">         char sbuf[13] = &quot;&quot;;
</span><span class="lines">@@ -163,7 +168,7 @@
</span><span class="cx"> 
</span><span class="cx">         if (in != 0) {
</span><span class="cx">                 snprintf(digits, sizeof(digits), &quot;%10.10d&quot;, in);
</span><del>-                switch (method) {
</del><ins>+                switch (say_args-&gt;method) {
</ins><span class="cx">                 case SSM_COUNTED:
</span><span class="cx">                         say_file(&quot;digits/ordinal.wav&quot;);
</span><span class="cx">                         /* Fall through */
</span><span class="lines">@@ -266,7 +271,7 @@
</span><span class="cx"> }
</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_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t zh_ip(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char *a, *b, *c, *d;
</span><span class="cx">         if (!(a = switch_core_session_strdup(session, tosay))) {
</span><span class="lines">@@ -291,19 +296,18 @@
</span><span class="cx"> 
</span><span class="cx">         *d++ = '\0';
</span><span class="cx"> 
</span><del>-        say_num(atoi(a), method);
</del><ins>+        say_num(atoi(a), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(b), method);
</del><ins>+        say_num(atoi(b), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(c), method);
</del><ins>+        say_num(atoi(c), say_args-&gt;method);
</ins><span class="cx">         say_file(&quot;digits/dot.wav&quot;);
</span><del>-        say_num(atoi(d), method);
</del><ins>+        say_num(atoi(d), say_args-&gt;method);
</ins><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static switch_status_t zh_say_time(switch_core_session_t *session,
-                                                                   char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+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)
</ins><span class="cx"> {
</span><span class="cx">         int32_t t;
</span><span class="cx">         switch_time_t target = 0;
</span><span class="lines">@@ -315,7 +319,7 @@
</span><span class="cx">         uint8_t say_date = 0;
</span><span class="cx">         uint8_t say_time = 0;
</span><span class="cx"> 
</span><del>-        if (type == SST_TIME_MEASUREMENT) {
</del><ins>+        if (say_args-&gt;type == SST_TIME_MEASUREMENT) {
</ins><span class="cx">                 int64_t hours = 0;
</span><span class="cx">                 int64_t minutes = 0;
</span><span class="cx">                 int64_t seconds = 0;
</span><span class="lines">@@ -401,7 +405,7 @@
</span><span class="cx">                 target = switch_micro_time_now();
</span><span class="cx">         switch_time_exp_lt(&amp;tm, target);
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_CURRENT_DATE_TIME:
</span><span class="cx">                 say_date = say_time = 1;
</span><span class="cx">                 break;
</span><span class="lines">@@ -494,8 +498,7 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static switch_status_t zh_say_money(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method,
-                                                                        switch_input_args_t *args)
</del><ins>+static switch_status_t zh_say_money(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         char sbuf[16] = &quot;&quot;;                        /* enough for 999,999,999,999.99 (w/o the commas or leading $) */
</span><span class="cx">         char *dollars = NULL;
</span><span class="lines">@@ -527,12 +530,12 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* Say dollar amount */
</span><del>-        zh_say_general_count(session, dollars, type, method, args);
</del><ins>+        zh_say_general_count(session, dollars, say_args, args);
</ins><span class="cx">         say_file(&quot;currency/dollar.wav&quot;);
</span><span class="cx"> 
</span><span class="cx">         /* Say cents */
</span><span class="cx">         if (cents) {
</span><del>-                zh_say_general_count(session, cents, type, method, args);
</del><ins>+                zh_say_general_count(session, cents, say_args, args);
</ins><span class="cx">         } else {
</span><span class="cx">                 say_file(&quot;digits/0.wav&quot;);
</span><span class="cx">         }
</span><span class="lines">@@ -541,11 +544,11 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static switch_status_t zh_say(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args)
</del><ins>+static switch_status_t zh_say(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         switch_say_callback_t say_cb = NULL;
</span><span class="cx"> 
</span><del>-        switch (type) {
</del><ins>+        switch (say_args-&gt;type) {
</ins><span class="cx">         case SST_NUMBER:
</span><span class="cx">         case SST_ITEMS:
</span><span class="cx">         case SST_PERSONS:
</span><span class="lines">@@ -569,12 +572,12 @@
</span><span class="cx">                 say_cb = zh_say_money;
</span><span class="cx">                 break;
</span><span class="cx">         default:
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, type);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unknown Say type=[%d]\n&quot;, say_args-&gt;type);
</ins><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (say_cb) {
</span><del>-                return say_cb(session, tosay, type, method, args);
</del><ins>+                return say_cb(session, tosay, say_args, args);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_FALSE;
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_cppcpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_cpp.cpp (16928 => 16929)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_cpp.cpp        2010-03-06 22:51:33 UTC (rev 16928)
+++ freeswitch/trunk/src/switch_cpp.cpp        2010-03-07 19:34:05 UTC (rev 16929)
</span><span class="lines">@@ -809,7 +809,7 @@
</span><span class="cx">         return dtmf_buf;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-SWITCH_DECLARE(void) CoreSession::say(const char *tosay, const char *module_name, const char *say_type, const char *say_method) 
</del><ins>+SWITCH_DECLARE(void) CoreSession::say(const char *tosay, const char *module_name, const char *say_type, const char *say_method, const char *say_gender) 
</ins><span class="cx"> {
</span><span class="cx">         this_check_void();
</span><span class="cx">         sanity_check_noreturn;
</span><span class="lines">@@ -818,7 +818,7 @@
</span><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">         begin_allow_threads();
</span><del>-        switch_ivr_say(session, tosay, module_name, say_type, say_method, ap);
</del><ins>+        switch_ivr_say(session, tosay, module_name, say_type, say_method, say_gender, ap);
</ins><span class="cx">     end_allow_threads();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_ivrc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_ivr.c (16928 => 16929)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_ivr.c        2010-03-06 22:51:33 UTC (rev 16928)
+++ freeswitch/trunk/src/switch_ivr.c        2010-03-07 19:34:05 UTC (rev 16929)
</span><span class="lines">@@ -2137,8 +2137,13 @@
</span><span class="cx">         stfu_n_destroy(&amp;jb);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-SWITCH_DECLARE(switch_status_t) switch_ivr_say(switch_core_session_t *session, const char *tosay, const char *module_name, const char *say_type,
-                                                                                           const char *say_method, switch_input_args_t *args)
</del><ins>+SWITCH_DECLARE(switch_status_t) switch_ivr_say(switch_core_session_t *session,
+                                                                                           const char *tosay,
+                                                                                           const char *module_name,
+                                                                                           const char *say_type,
+                                                                                           const char *say_method,
+                                                                                           const char *say_gender,
+                                                                                           switch_input_args_t *args)
</ins><span class="cx"> {
</span><span class="cx">         switch_say_interface_t *si;
</span><span class="cx">         switch_channel_t *channel;
</span><span class="lines">@@ -2215,7 +2220,13 @@
</span><span class="cx"> 
</span><span class="cx">         if ((si = switch_loadable_module_get_say_interface(module_name))) {
</span><span class="cx">                 /* should go back and proto all the say mods to const.... */
</span><del>-                status = si-&gt;say_function(session, (char *) tosay, switch_ivr_get_say_type_by_name(say_type), switch_ivr_get_say_method_by_name(say_method), args);
</del><ins>+                switch_say_args_t say_args = {0};
+                
+                say_args.type = switch_ivr_get_say_type_by_name(say_type);
+                say_args.method = switch_ivr_get_say_method_by_name(say_method);
+                say_args.gender = switch_ivr_get_say_gender_by_name(say_gender);
+                
+                status = si-&gt;say_function(session, (char *) tosay, &amp;say_args, args);
</ins><span class="cx">         } else {
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Invalid SAY Interface [%s]!\n&quot;, module_name);
</span><span class="cx">                 status = SWITCH_STATUS_FALSE;
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_ivr_play_sayc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_ivr_play_say.c (16928 => 16929)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_ivr_play_say.c        2010-03-06 22:51:33 UTC (rev 16928)
+++ freeswitch/trunk/src/switch_ivr_play_say.c        2010-03-07 19:34:05 UTC (rev 16929)
</span><span class="lines">@@ -66,9 +66,34 @@
</span><span class="cx">         NULL
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+static char *SAY_GENDER_NAMES[] = {
+        &quot;MASCULINE&quot;,
+        &quot;FEMININE&quot;,
+        &quot;NEUTER&quot;,
+        NULL
+};
+
+SWITCH_DECLARE(switch_say_gender_t) switch_ivr_get_say_gender_by_name(const char *name)
+{
+        int x = 0;
+
+        if (!name) return (switch_say_gender_t)0;
+
+        for (x = 0; SAY_GENDER_NAMES[x]; x++) {
+                if (!strcasecmp(SAY_GENDER_NAMES[x], name)) {
+                        break;
+                }
+        }
+
+        return (switch_say_gender_t) x;
+}
+
</ins><span class="cx"> SWITCH_DECLARE(switch_say_method_t) switch_ivr_get_say_method_by_name(const char *name)
</span><span class="cx"> {
</span><span class="cx">         int x = 0;
</span><ins>+
+        if (!name) return (switch_say_method_t)0;
+
</ins><span class="cx">         for (x = 0; SAY_METHOD_NAMES[x]; x++) {
</span><span class="cx">                 if (!strcasecmp(SAY_METHOD_NAMES[x], name)) {
</span><span class="cx">                         break;
</span><span class="lines">@@ -81,6 +106,9 @@
</span><span class="cx"> SWITCH_DECLARE(switch_say_type_t) switch_ivr_get_say_type_by_name(const char *name)
</span><span class="cx"> {
</span><span class="cx">         int x = 0;
</span><ins>+
+        if (!name) return (switch_say_type_t)0;
+
</ins><span class="cx">         for (x = 0; SAY_TYPE_NAMES[x]; x++) {
</span><span class="cx">                 if (!strcasecmp(SAY_TYPE_NAMES[x], name)) {
</span><span class="cx">                         break;
</span><span class="lines">@@ -330,10 +358,14 @@
</span><span class="cx">                                                 if ((si = switch_loadable_module_get_say_interface(module_name))) {
</span><span class="cx">                                                         char *say_type = (char *) switch_xml_attr_soft(action, &quot;type&quot;);
</span><span class="cx">                                                         char *say_method = (char *) switch_xml_attr_soft(action, &quot;method&quot;);
</span><ins>+                                                        char *say_gender = (char *) switch_xml_attr_soft(action, &quot;gender&quot;);
+                                                        switch_say_args_t say_args = {0};
</ins><span class="cx"> 
</span><del>-                                                        status =
-                                                                si-&gt;say_function(session, odata, switch_ivr_get_say_type_by_name(say_type), switch_ivr_get_say_method_by_name(say_method),
-                                                                                                 args);
</del><ins>+                                                        say_args.type = switch_ivr_get_say_type_by_name(say_type);
+                                                        say_args.method = switch_ivr_get_say_method_by_name(say_method);
+                                                        say_args.gender = switch_ivr_get_say_gender_by_name(say_gender);
+
+                                                        status = si-&gt;say_function(session, odata, &amp;say_args, args);
</ins><span class="cx">                                                 } else {
</span><span class="cx">                                                         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Invalid SAY Interface [%s]!\n&quot;, module_name);
</span><span class="cx">                                                 }
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>

</body>
</html>