Sorry about not including the version. The version of freeswitch I am using is.<div>FreeSWITCH Version 1.0.head (git-256a82d 2011-01-31 10-12-28 -0600)</div><div><br></div><div> I just updated to the latest yesterday to re-test it.<div>
<div><br><div class="gmail_quote">On Tue, Feb 1, 2011 at 10:10 AM, Matt Stockton <span dir="ltr">&lt;<a href="mailto:mstockton@harqen.com">mstockton@harqen.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I have having trouble with both missing and duplicated DTMF in Freeswitch. <div><br></div><div>Here are the steps of how I am using it:</div><div><br></div><div>1. Leg A - I am calling out from my Freeswitch instance (through iCall), and I am calling an iCall number that is also connected to the same Freeswitch instance. </div>



<div><br></div><div>2. Leg B - The above call is routed through iCall and then answered by the same Freeswitch instance. </div><div><br></div><div>3. On Leg B, I play a file and attempt to get DTMF in a lua script. Here is the code of interest:</div>


<div>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco">callPin = session:playAndGetDigits(1, 10, 4, 30000, &quot;#&quot;,&quot;/<span style="text-decoration:underline">tmp</span>/cw_17.<span style="text-decoration:underline">wav</span>&quot;, &quot;&quot;, &quot;\\d+&quot;);</p>



<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco"><br></p><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco"><span style="font-family:arial;font-size:small">4. On Leg A, I send DTMF information in a lua script. Here is the code of interest. I initiate a delay between each digit:</span></p>



<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco">local newPin = &quot;&quot;;</p><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco"><span style="font-family:arial;font-size:small">
</span></p><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco">for i = 1, string.len(pin) do</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco">  newPin = newPin .. string.sub(pin, i, i) .. &quot;W&quot;;</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco">end</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco">session:execute(&quot;send_dtmf&quot;, newPin .. &quot;#@200&quot;);</p><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco"><font face="arial"><span style="font-size:small"><font face="Monaco" size="3"><span style="font-size:11px"><br>



</span></font></span></font></p><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco"><font face="arial"><span style="font-size:small"><font face="Monaco" size="3"><span style="font-size:11px">** Note that there is a session:sleep on Leg A before I send the DTMF to make sure i don&#39;t send it too early **
</span></font></span></font></p><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco"><font face="arial"><span style="font-size:small"><font face="Monaco" size="3"><span style="font-size:11px"><br></span></font></span></font></p>


<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco"><font face="arial"><span style="font-size:small"><font face="Monaco" size="3"><span style="font-size:11px">The problem is that the recognized DTMF on Leg B is wrong about 30% of the time. For example, if Leg A enters: 22063083, Leg B will get the DTMF digits 222063083. This is an example of duplication, but I have also experienced missing DTMF codes (and an occasional wrong code completely) </span></font></span></font></p>


<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco"><font face="arial"><span style="font-size:small"><font face="Monaco" size="3"><span style="font-size:11px"><br></span></font></span></font></p><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco">


<font face="arial"><span style="font-size:small"><font face="Monaco" size="3"><span style="font-size:11px">I have messed with a bunch of DTMF settings in hopes of fixing this issue, but I cannot seem to find something that is reliable 100% of the time.</span></font></span></font></p>

<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco"><font face="arial"><span style="font-size:small"><font face="Monaco" size="3"><span style="font-size:11px"><br></span></font></span></font></p><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco">

<font face="arial"><span style="font-size:small"><font face="Monaco" size="3"><span style="font-size:11px">_____________________________</span></font></span></font></p><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco">

<font face="arial"><span style="font-size:small"><font face="Monaco" size="3"><span style="font-size:11px">Here are the DTMF settings I have looked at / messed with. I&#39;ve tried various values for the dtmf-duration in the config (and in the send_dtmf command above)</span></font></span></font></p>

<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco"><font face="arial"><span style="font-size:small"><font face="Monaco" size="3"><span style="font-size:11px"><br></span></font></span></font></p><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco">

<font face="arial"><span style="font-size:small"><font face="Monaco" size="3"><span style="font-size:11px">    &lt;!-- This is in external.xml --&gt;</span></font></span></font></p><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco">

<font face="arial"><span style="font-size:small"><font face="Monaco" size="3"><span style="font-size:11px"></span></font></span></font></p><font face="arial"><font face="Monaco" size="3"><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco">

    &lt;param name=&quot;dtmf-duration&quot; value=&quot;500&quot;/&gt;</p><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco">    &lt;param name=&quot;dtmf-type&quot; value=&quot;rfc2833&quot;/&gt;</p><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco">

    &lt;param name=&quot;inbound-codec-prefs&quot; value=&quot;$${global_codec_prefs}&quot;/&gt;</p><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco">    &lt;param name=&quot;outbound-codec-prefs&quot; value=&quot;$${outbound_codec_prefs}&quot;/&gt;</p>

<div>    &lt;param name=&quot;inbound-codec-negotiation&quot; value=&quot;greedy&quot;/&gt;</div><div><br></div><div>    &lt;!-- This is in vars.xml --&gt;</div><div><div>    &lt;X-PRE-PROCESS cmd=&quot;set&quot; data=&quot;global_codec_prefs=PCMU&quot;/&gt;</div>

<div>    &lt;X-PRE-PROCESS cmd=&quot;set&quot; data=&quot;outbound_codec_prefs=PCMU&quot;/&gt;</div></div><div><br></div><div>________________________</div><div><br></div><div>I have run fs_cli with event logging and the DTMF events that Freeswitch gets do correlate to the wrong value (e.g. the duplication / missing digits is noticable in the Freeswitch events as well). </div>

<div><br></div><div>Also, I am not running any dtmf-related applications on the session before I give control to the lua scripts (e.g. not running start_dtmf)</div><div><br></div><div>Has anyone experienced this type of issue? Or know what I can do to resolve it? My next step was going to be trying this against another provider besides iCall, but I figured I would see if anyone has encountered a similar problem before. Any help is appreciated.</div>

<div><br></div><div>Thanks</div></font></font><p></p><p></p></div>
</blockquote></div><br></div></div></div>