<!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][16891] </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=16891">16891</a></dd>
<dt>Author</dt> <dd>gmaruzz</dd>
<dt>Date</dt> <dd>2010-03-03 19:10:19 -0600 (Wed, 03 Mar 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>skypiax: write_silence_when_idle in config, general configuration code reshuffle</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunksrcmodendpointsmod_skypiaxmod_skypiaxc">freeswitch/trunk/src/mod/endpoints/mod_skypiax/mod_skypiax.c</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_skypiaxskypiaxh">freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax.h</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_skypiaxskypiax_protocolc">freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax_protocol.c</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunksrcmodendpointsmod_skypiaxmod_skypiaxc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_skypiax/mod_skypiax.c (16890 => 16891)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_skypiax/mod_skypiax.c        2010-03-04 00:41:42 UTC (rev 16890)
+++ freeswitch/trunk/src/mod/endpoints/mod_skypiax/mod_skypiax.c        2010-03-04 01:10:19 UTC (rev 16891)
</span><span class="lines">@@ -144,9 +144,13 @@
</span><span class="cx"> 
</span><span class="cx"> static struct {
</span><span class="cx">         int debug;
</span><ins>+        char *context;
</ins><span class="cx">         char *dialplan;
</span><span class="cx">         char *destination;
</span><del>-        char *context;
</del><ins>+        char *skype_user;
+        char *report_incoming_chatmessages;
+        char *silent_mode;
+        char *write_silence_when_idle;
</ins><span class="cx">         int calls;
</span><span class="cx">         int real_interfaces;
</span><span class="cx">         int next_interface;
</span><span class="lines">@@ -160,9 +164,13 @@
</span><span class="cx"> switch_memory_pool_t *skypiax_module_pool = NULL;
</span><span class="cx"> int running = 0;
</span><span class="cx"> 
</span><ins>+SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_context, globals.context);
</ins><span class="cx"> SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan);
</span><del>-SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_context, globals.context);
</del><span class="cx"> SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_destination, globals.destination);
</span><ins>+SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_skype_user, globals.skype_user);
+SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_report_incoming_chatmessages, globals.report_incoming_chatmessages);
+SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_silent_mode, globals.silent_mode);
+SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_write_silence_when_idle, globals.write_silence_when_idle);
</ins><span class="cx"> 
</span><span class="cx"> static switch_status_t interface_exists(char *the_interface);
</span><span class="cx"> static switch_status_t remove_interface(char *the_interface);
</span><span class="lines">@@ -1208,18 +1216,30 @@
</span><span class="cx">                         char *val = (char *) switch_xml_attr_soft(param, &quot;value&quot;);
</span><span class="cx"> 
</span><span class="cx">                         if (!strcasecmp(var, &quot;debug&quot;)) {
</span><del>-                                DEBUGA_SKYPE(&quot;globals.debug=%d\n&quot;, SKYPIAX_P_LOG, globals.debug);
</del><span class="cx">                                 globals.debug = atoi(val);
</span><span class="cx">                                 DEBUGA_SKYPE(&quot;globals.debug=%d\n&quot;, SKYPIAX_P_LOG, globals.debug);
</span><ins>+
+                        } else if (!strcmp(var, &quot;context&quot;)) {
+                                set_global_context(val);
+                                DEBUGA_SKYPE(&quot;globals.context=%s\n&quot;, SKYPIAX_P_LOG, globals.context);
</ins><span class="cx">                         } else if (!strcmp(var, &quot;dialplan&quot;)) {
</span><span class="cx">                                 set_global_dialplan(val);
</span><span class="cx">                                 DEBUGA_SKYPE(&quot;globals.dialplan=%s\n&quot;, SKYPIAX_P_LOG, globals.dialplan);
</span><span class="cx">                         } else if (!strcmp(var, &quot;destination&quot;)) {
</span><span class="cx">                                 set_global_destination(val);
</span><span class="cx">                                 DEBUGA_SKYPE(&quot;globals.destination=%s\n&quot;, SKYPIAX_P_LOG, globals.destination);
</span><del>-                        } else if (!strcmp(var, &quot;context&quot;)) {
-                                set_global_context(val);
-                                DEBUGA_SKYPE(&quot;globals.context=%s\n&quot;, SKYPIAX_P_LOG, globals.context);
</del><ins>+                        } else if (!strcmp(var, &quot;skype_user&quot;)) {
+                                set_global_skype_user(val);
+                                DEBUGA_SKYPE(&quot;globals.skype_user=%s\n&quot;, SKYPIAX_P_LOG, globals.skype_user);
+                        } else if (!strcmp(var, &quot;report_incoming_chatmessages&quot;)) {
+                                set_global_report_incoming_chatmessages(val);
+                                DEBUGA_SKYPE(&quot;globals.report_incoming_chatmessages=%s\n&quot;, SKYPIAX_P_LOG, globals.report_incoming_chatmessages);
+                        } else if (!strcmp(var, &quot;silent_mode&quot;)) {
+                                set_global_silent_mode(val);
+                                DEBUGA_SKYPE(&quot;globals.silent_mode=%s\n&quot;, SKYPIAX_P_LOG, globals.silent_mode);
+                        } else if (!strcmp(var, &quot;write_silence_when_idle&quot;)) {
+                                set_global_write_silence_when_idle(val);
+                                DEBUGA_SKYPE(&quot;globals.write_silence_when_idle=%s\n&quot;, SKYPIAX_P_LOG, globals.write_silence_when_idle);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                 }
</span><span class="lines">@@ -1235,20 +1255,27 @@
</span><span class="cx">                         char *context = &quot;default&quot;;
</span><span class="cx">                         char *dialplan = &quot;XML&quot;;
</span><span class="cx">                         char *destination = &quot;5000&quot;;
</span><del>-                        char *tonegroup = NULL;
-                        char *digit_timeout = NULL;
-                        char *max_digits = NULL;
-                        char *hotline = NULL;
-                        char *dial_regex = NULL;
-                        char *hold_music = NULL;
-                        char *fail_dial_regex = NULL;
-                        char *enable_callerid = &quot;true&quot;;
</del><span class="cx">                         char *X11_display = NULL;
</span><span class="cx">                         char *skype_user = NULL;
</span><span class="cx">                         char *report_incoming_chatmessages = &quot;true&quot;;
</span><span class="cx">                         char *silent_mode = &quot;false&quot;;
</span><ins>+                        char *write_silence_when_idle = &quot;true&quot;;
+                        uint32_t interface_id = 0;
</ins><span class="cx"> 
</span><del>-                        uint32_t interface_id = 0, to = 0, max = 0;
</del><ins>+                        if(globals.context)
+                                context=globals.context;
+                        if(globals.dialplan)
+                                dialplan=globals.dialplan;
+                        if(globals.destination)
+                                destination=globals.destination;
+                        if(globals.skype_user)
+                                skype_user=globals.skype_user;
+                        if(globals.report_incoming_chatmessages)
+                                report_incoming_chatmessages=globals.report_incoming_chatmessages;
+                        if(globals.silent_mode)
+                                silent_mode=globals.silent_mode;
+                        if(globals.write_silence_when_idle)
+                                write_silence_when_idle=globals.write_silence_when_idle;
</ins><span class="cx"> 
</span><span class="cx">                         tech_pvt = NULL;
</span><span class="cx"> 
</span><span class="lines">@@ -1256,36 +1283,22 @@
</span><span class="cx">                                 char *var = (char *) switch_xml_attr_soft(param, &quot;name&quot;);
</span><span class="cx">                                 char *val = (char *) switch_xml_attr_soft(param, &quot;value&quot;);
</span><span class="cx"> 
</span><del>-                                if (!strcasecmp(var, &quot;tonegroup&quot;)) {
-                                        tonegroup = val;
-                                } else if (!strcasecmp(var, &quot;digit_timeout&quot;) || !strcasecmp(var, &quot;digit-timeout&quot;)) {
-                                        digit_timeout = val;
-                                } else if (!strcasecmp(var, &quot;context&quot;)) {
</del><ins>+                                if (!strcasecmp(var, &quot;context&quot;)) {
</ins><span class="cx">                                         context = val;
</span><span class="cx">                                 } else if (!strcasecmp(var, &quot;dialplan&quot;)) {
</span><span class="cx">                                         dialplan = val;
</span><span class="cx">                                 } else if (!strcasecmp(var, &quot;destination&quot;)) {
</span><span class="cx">                                         destination = val;
</span><del>-                                } else if (!strcasecmp(var, &quot;dial-regex&quot;)) {
-                                        dial_regex = val;
-                                } else if (!strcasecmp(var, &quot;enable-callerid&quot;)) {
-                                        enable_callerid = val;
-                                } else if (!strcasecmp(var, &quot;fail-dial-regex&quot;)) {
-                                        fail_dial_regex = val;
-                                } else if (!strcasecmp(var, &quot;hold-music&quot;)) {
-                                        hold_music = val;
</del><span class="cx">                                 } else if (!strcasecmp(var, &quot;skype_user&quot;)) {
</span><span class="cx">                                         skype_user = val;
</span><span class="cx">                                 } else if (!strcasecmp(var, &quot;report_incoming_chatmessages&quot;)) {
</span><span class="cx">                                         report_incoming_chatmessages = val;
</span><span class="cx">                                 } else if (!strcasecmp(var, &quot;silent_mode&quot;)) {
</span><span class="cx">                                         silent_mode = val;
</span><ins>+                                } else if (!strcasecmp(var, &quot;write_silence_when_idle&quot;)) {
+                                        write_silence_when_idle = val;
</ins><span class="cx">                                 } else if (!strcasecmp(var, &quot;X11-display&quot;) || !strcasecmp(var, &quot;X11_display&quot;)) {
</span><span class="cx">                                         X11_display = val;
</span><del>-                                } else if (!strcasecmp(var, &quot;max_digits&quot;) || !strcasecmp(var, &quot;max-digits&quot;)) {
-                                        max_digits = val;
-                                } else if (!strcasecmp(var, &quot;hotline&quot;)) {
-                                        hotline = val;
</del><span class="cx">                                 }
</span><span class="cx"> 
</span><span class="cx">                         }
</span><span class="lines">@@ -1324,18 +1337,6 @@
</span><span class="cx">                                 WARNINGA(&quot;interface missing param 'name', not nice, but works\n&quot;, SKYPIAX_P_LOG);
</span><span class="cx">                         }
</span><span class="cx"> 
</span><del>-                        if (!tonegroup) {
-                                tonegroup = &quot;us&quot;;
-                        }
-
-                        if (digit_timeout) {
-                                to = atoi(digit_timeout);
-                        }
-
-                        if (max_digits) {
-                                max = atoi(max_digits);
-                        }
-
</del><span class="cx">                         if (name) {
</span><span class="cx">                                 DEBUGA_SKYPE(&quot;name=%s\n&quot;, SKYPIAX_P_LOG, name);
</span><span class="cx">                         }
</span><span class="lines">@@ -1368,12 +1369,11 @@
</span><span class="cx">                                 }
</span><span class="cx">                                 DEBUGA_SKYPE(&quot;CONFIGURING interface_id=%d\n&quot;, SKYPIAX_P_LOG, interface_id);
</span><span class="cx"> 
</span><del>-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].X11_display, X11_display);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].skype_user, skype_user);
</del><span class="cx">                                 switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].context, context);
</span><span class="cx">                                 switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].dialplan, dialplan);
</span><span class="cx">                                 switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].destination, destination);
</span><del>-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].context, context);
</del><ins>+                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].X11_display, X11_display);
+                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].skype_user, skype_user);
</ins><span class="cx"> 
</span><span class="cx">                                 if (!strcmp(report_incoming_chatmessages, &quot;true&quot;) || !strcmp(report_incoming_chatmessages, &quot;1&quot;)) {
</span><span class="cx">                                         globals.SKYPIAX_INTERFACES[interface_id].report_incoming_chatmessages = 1;
</span><span class="lines">@@ -1389,12 +1389,13 @@
</span><span class="cx"> 
</span><span class="cx">                                 }
</span><span class="cx"> 
</span><del>-                                DEBUGA_SKYPE
-                                        (&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].X11_display=%s\n&quot;,
-                                         SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].X11_display);
-                                DEBUGA_SKYPE
-                                        (&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].skype_user=%s\n&quot;,
-                                         SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].skype_user);
</del><ins>+                                if (!strcmp(write_silence_when_idle, &quot;true&quot;) || !strcmp(write_silence_when_idle, &quot;1&quot;)) {
+                                        globals.SKYPIAX_INTERFACES[interface_id].write_silence_when_idle = 1;
+                                } else {
+                                        globals.SKYPIAX_INTERFACES[interface_id].write_silence_when_idle = 0;        //redundant, just in case
+
+                                }
+
</ins><span class="cx">                                 DEBUGA_SKYPE(&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].name=%s\n&quot;,
</span><span class="cx">                                                          SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].name);
</span><span class="cx">                                 DEBUGA_SKYPE
</span><span class="lines">@@ -1407,16 +1408,20 @@
</span><span class="cx">                                         (&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].destination=%s\n&quot;,
</span><span class="cx">                                          SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].destination);
</span><span class="cx">                                 DEBUGA_SKYPE
</span><del>-                                        (&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].context=%s\n&quot;,
-                                         SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].context);
-
</del><ins>+                                        (&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].X11_display=%s\n&quot;,
+                                         SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].X11_display);
</ins><span class="cx">                                 DEBUGA_SKYPE
</span><ins>+                                        (&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].skype_user=%s\n&quot;,
+                                         SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].skype_user);
+                                DEBUGA_SKYPE
</ins><span class="cx">                                         (&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].report_incoming_chatmessages=%d\n&quot;,
</span><span class="cx">                                          SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].report_incoming_chatmessages);
</span><del>-
</del><span class="cx">                                 DEBUGA_SKYPE
</span><span class="cx">                                         (&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].silent_mode=%d\n&quot;,
</span><span class="cx">                                          SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].silent_mode);
</span><ins>+                                DEBUGA_SKYPE
+                                        (&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].write_silence_when_idle=%d\n&quot;,
+                                         SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].write_silence_when_idle);
</ins><span class="cx"> 
</span><span class="cx">                                 WARNINGA(&quot;STARTING interface_id=%d\n&quot;, SKYPIAX_P_LOG, interface_id);
</span><span class="cx"> 
</span><span class="lines">@@ -1516,14 +1521,16 @@
</span><span class="cx">                                 tech_pvt = &amp;globals.SKYPIAX_INTERFACES[i];
</span><span class="cx"> 
</span><span class="cx">                                 DEBUGA_SKYPE(&quot;i=%d globals.SKYPIAX_INTERFACES[%d].interface_id=%s\n&quot;, SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].interface_id);
</span><del>-                                DEBUGA_SKYPE(&quot;i=%d globals.SKYPIAX_INTERFACES[%d].X11_display=%s\n&quot;, SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].X11_display);
</del><span class="cx">                                 DEBUGA_SKYPE(&quot;i=%d globals.SKYPIAX_INTERFACES[%d].name=%s\n&quot;, SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].name);
</span><span class="cx">                                 DEBUGA_SKYPE(&quot;i=%d globals.SKYPIAX_INTERFACES[%d].context=%s\n&quot;, SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].context);
</span><span class="cx">                                 DEBUGA_SKYPE(&quot;i=%d globals.SKYPIAX_INTERFACES[%d].dialplan=%s\n&quot;, SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].dialplan);
</span><span class="cx">                                 DEBUGA_SKYPE(&quot;i=%d globals.SKYPIAX_INTERFACES[%d].destination=%s\n&quot;, SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].destination);
</span><ins>+                                DEBUGA_SKYPE(&quot;i=%d globals.SKYPIAX_INTERFACES[%d].X11_display=%s\n&quot;, SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].X11_display);
+                                DEBUGA_SKYPE(&quot;i=%d globals.SKYPIAX_INTERFACES[%d].skype_user=%s\n&quot;, SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].skype_user);
</ins><span class="cx">                                 DEBUGA_SKYPE(&quot;i=%d globals.SKYPIAX_INTERFACES[%d].report_incoming_chatmessages=%d\n&quot;, SKYPIAX_P_LOG, i, i,
</span><span class="cx">                                                          globals.SKYPIAX_INTERFACES[i].report_incoming_chatmessages);
</span><span class="cx">                                 DEBUGA_SKYPE(&quot;i=%d globals.SKYPIAX_INTERFACES[%d].silent_mode=%d\n&quot;, SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].silent_mode);
</span><ins>+                                DEBUGA_SKYPE(&quot;i=%d globals.SKYPIAX_INTERFACES[%d].write_silence_when_idle=%d\n&quot;, SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].write_silence_when_idle);
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="lines">@@ -1758,9 +1765,13 @@
</span><span class="cx">         }
</span><span class="cx">         switch_event_free_subclass(MY_EVENT_INCOMING_CHATMESSAGE);
</span><span class="cx"> 
</span><ins>+        switch_safe_free(globals.context);
</ins><span class="cx">         switch_safe_free(globals.dialplan);
</span><del>-        switch_safe_free(globals.context);
</del><span class="cx">         switch_safe_free(globals.destination);
</span><ins>+        switch_safe_free(globals.skype_user);
+        switch_safe_free(globals.report_incoming_chatmessages);
+        switch_safe_free(globals.silent_mode);
+        switch_safe_free(globals.write_silence_when_idle);
</ins><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_skypiaxskypiaxh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax.h (16890 => 16891)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax.h        2010-03-04 00:41:42 UTC (rev 16890)
+++ freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax.h        2010-03-04 01:10:19 UTC (rev 16891)
</span><span class="lines">@@ -286,6 +286,7 @@
</span><span class="cx">         switch_buffer_t *write_buffer;
</span><span class="cx">         switch_buffer_t *read_buffer;
</span><span class="cx">         int silent_mode;
</span><ins>+        int write_silence_when_idle;
</ins><span class="cx"> 
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_skypiaxskypiax_protocolc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax_protocol.c (16890 => 16891)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax_protocol.c        2010-03-04 00:41:42 UTC (rev 16890)
+++ freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax_protocol.c        2010-03-04 01:10:19 UTC (rev 16891)
</span><span class="lines">@@ -996,11 +996,13 @@
</span><span class="cx">                                                 switch_mutex_unlock(tech_pvt-&gt;mutex_audio_cli);
</span><span class="cx"> 
</span><span class="cx">                                                 if (!bytes_to_write) {
</span><del>-                                                        continue;
-                                                        memset(cli_out, 255, sizeof(cli_out));
-                                                        bytes_to_write = 640;
-                                                        //NOTICA(&quot;WRITE Silence!\n&quot;, SKYPIAX_P_LOG);
-
</del><ins>+                                                        if(tech_pvt-&gt;write_silence_when_idle){
+                                                                memset(cli_out, 255, sizeof(cli_out));
+                                                                bytes_to_write = 640;
+                                                                DEBUGA_SKYPE(&quot;WRITE Silence!\n&quot;, SKYPIAX_P_LOG);
+                                                        }else{
+                                                                continue;
+                                                        }
</ins><span class="cx">                                                 }
</span><span class="cx">                                                 /* send the 16khz frame to the Skype client waiting for incoming audio to be sent to the remote party */
</span><span class="cx">                                                 if (tech_pvt-&gt;skype_callflow != CALLFLOW_STATUS_REMOTEHOLD) {
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>

</body>
</html>