<div dir="ltr"><div><div><div><div><div><div><div><div>Hello Jeremy,<br><br></div>ok, understood now.<br><br></div>Gsmopen uses internally spandsp to detect DTMFs.<br><br></div>Because of possible false multiple detections, there is an hardcoded minimum duration of 350 ms for each DTMF.<br><br></div>In your specific case, edit mod_gsmopen.cpp in /usr/src/freeswitch/src/mod/endpoints/mod_gsmopen, and modify the value at line 3302:<br><br>                if ((new_dtmf_timestamp - tech_pvt-&gt;old_dtmf_timestamp) &gt; 350000) {     //FIXME: make it configurable<br><br></div>change that value to 50000 or little less (is not configurable, as you can see :) ) and recompile (eg: from /usr/src/freeswitch type make mod_gsmopen-install)<br><br></div>That should do the trick.<br><br></div>Let us know if you encounter problems.<br><br></div>-giovanni<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 23, 2015 at 2:39 PM, Jeremy <span dir="ltr">&lt;<a href="mailto:jhorsburgh@gmail.com" target="_blank">jhorsburgh@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><pre style="color:rgb(0,0,0)">Hi G<span style="font-family:arial,sans-serif">iovanni,<br></span></pre><pre><font face="arial, sans-serif" color="#000000">Thank you for your reply, sorry I didn&#39;t explain the problem very well.</font></pre><pre><font face="arial, sans-serif" color="#000000">I am trying to detect a string of DTMF&#39;s with a short pulse duration (about 50ms) and the normal DTMF detection is not able to reliably do this (it seems to miss almost all of the tones).</font></pre><pre><font face="arial, sans-serif" color="#000000">Spandsp appears to be able to reliably do this but when I enable spandsp, I get duplicate tones detected by both spandsp and gsmopen (I think its gsmopen, example below).</font></pre><pre><font face="arial, sans-serif" color="#000000">You are correct. Is it possible for gsmopen not to recognize DTMF&#39;s and use only spandsp to analyze the audio?</font></pre><pre><font face="arial, sans-serif" color="#000000">Thank you for your help in advance.</font></pre><pre><font face="arial, sans-serif" color="#000000">Jeremy.</font></pre><pre><font face="arial, sans-serif" color="#000000"><br></font></pre><pre><font face="arial, sans-serif" color="#000000">P.S. Greatly appreciate the work you have put into GSMopen, brilliant work!</font></pre><pre style="color:rgb(0,0,0)"><br></pre><pre style="color:rgb(0,0,0)">Hello Jeremy,

I&#39;ve not understood the problem, and the solution you are looking for.

You want gsmopen not to recognize DTMFs, so you can analyze the audio with
spandsp?

Can you give more info ?

-giovanni

On Wed, Apr 22, 2015 at 2:58 PM, jhorsburgh &lt;<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">jhorsburgh at gmail.com</a>&gt; wrote:

&gt;<i> Hello All,
</i>&gt;<i>             I am having some issues detecting DTMF tones and was hoping
</i>&gt;<i> someone could shed some light on the problem.
</i>&gt;<i>
</i>&gt;<i> *Background*
</i>&gt;<i> I am using Freeswitch (1.4.14~32bit) with GSMopen to receive calls and
</i>&gt;<i> process high-speed DTMF signal for use with Alarm Systems. Unfortunately
</i>&gt;<i> the
</i>&gt;<i> standard inband DTMF detection is not quite up to the task but spandsp
</i>&gt;<i> works
</i>&gt;<i> perfectly.
</i>&gt;<i>
</i>&gt;<i> *Problem*
</i>&gt;<i> The problem I am having is that the standard inband DTMF detection remains
</i>&gt;<i> enabled when spandsp is enabled producing duplicates of each detected tone.
</i>&gt;<i>
</i>&gt;<i> Is there a way of disabling DTMF detection with the exception of spandsp?
</i>&gt;<i>
</i>&gt;<i> Any help would be greatly appreciated.
</i>&gt;<i>
</i>&gt;<i> Kind regards,
</i>&gt;<i> Jeremy
</i>&gt;<i>
</i>&gt;<i>
</i>&gt;<i>
</i>&gt;<i> 2015-04-22 12:18:22.129468 [DEBUG] mod_gsmopen.cpp:919 rev 1.4.14~32bit
</i>&gt;<i> [(nil)|37     ][DEBUG_GSMOPEN  919  ][interface1][-1, 5, 5]
</i>&gt;<i> gsmopen/interface1 CHANNEL got
</i>&gt;<i> SWITCH_MESSAGE_INDICATE_TRANSCODING_NECESSARY
</i>&gt;<i> 2015-04-22 12:18:22.569494 [DEBUG] switch_channel.c:488 RECV DTMF 5:2000
</i>&gt;<i> 2015-04-22 12:18:22.569494 [DEBUG] mod_gsmopen.cpp:745 rev 1.4.14~32bit
</i>&gt;<i> [(nil)|37     ][DEBUG_GSMOPEN  745  ][interface1][-1, 5, 5] DTMF DETECTED:
</i>&gt;<i> [5] new_dtmf_timestamp: 1652802529, delta_t: 515839955
</i>&gt;<i> 2015-04-22 12:18:22.569494 [DEBUG] mod_spandsp_dsp.c:373 DTMF BEGIN
</i>&gt;<i> DETECTED: [5]
</i>&gt;<i> 2015-04-22 12:18:22.569494 [DEBUG] switch_channel.c:488 RECV DTMF 5:2000
</i>&gt;<i> 2015-04-22 12:18:22.749457 [DEBUG] mod_spandsp_dsp.c:385 DTMF END DETECTED:
</i>&gt;<i> [5], duration = 178 ms
</i>&gt;<i> 2015-04-22 12:18:23.049446 [DEBUG] switch_channel.c:488 RECV DTMF 3:2000
</i>&gt;<i> 2015-04-22 12:18:23.049446 [DEBUG] mod_gsmopen.cpp:745 rev 1.4.14~32bit
</i>&gt;<i> [(nil)|37     ][DEBUG_GSMOPEN  745  ][interface1][-1, 5, 5] DTMF DETECTED:
</i>&gt;<i> [3] new_dtmf_timestamp: 1653282480, delta_t: 479951
</i>&gt;<i> 2015-04-22 12:18:23.049446 [DEBUG] mod_spandsp_dsp.c:373 DTMF BEGIN
</i>&gt;<i> DETECTED: [3]
</i>&gt;<i> 2015-04-22 12:18:23.049446 [DEBUG] switch_channel.c:488 RECV DTMF 3:2000
</i>&gt;<i> 2015-04-22 12:18:23.229447 [DEBUG] mod_spandsp_dsp.c:385 DTMF END DETECTED:
</i>&gt;<i> [3], duration = 165 ms
</i>&gt;<i> 2015-04-22 12:18:23.529449 [DEBUG] switch_channel.c:488 RECV DTMF 5:2000
</i>&gt;<i> 2015-04-22 12:18:23.529449 [DEBUG] mod_gsmopen.cpp:745 rev 1.4.14~32bit
</i>&gt;<i> [(nil)|37     ][DEBUG_GSMOPEN  745  ][interface1][-1, 5, 5] DTMF DETECTED:
</i>&gt;<i> [5] new_dtmf_timestamp: 1653762488, delta_t: 480008
</i>&gt;<i> 2015-04-22 12:18:23.549464 [DEBUG] mod_spandsp_dsp.c:373 DTMF BEGIN
</i>&gt;<i> DETECTED: [5]
</i>&gt;<i> 2015-04-22 12:18:23.549464 [DEBUG] switch_channel.c:488 RECV DTMF 5:2000
</i>&gt;<i> 2015-04-22 12:18:23.689495 [DEBUG] mod_spandsp_dsp.c:385 DTMF END DETECTED:
</i>&gt;<i> [5], duration = 140 ms
</i>&gt;<i> 2015-04-22 12:18:24.029440 [DEBUG] switch_channel.c:488 RECV DTMF 2:2000
</i>&gt;<i> 2015-04-22 12:18:24.029440 [DEBUG] mod_gsmopen.cpp:745 rev 1.4.14~32bit
</i>&gt;<i> [(nil)|37     ][DEBUG_GSMOPEN  745  ][interface1][-1, 5, 5] DTMF DETECTED:
</i>&gt;<i> [2] new_dtmf_timestamp: 1654262471, delta_t: 499983
</i>&gt;<i> 2015-04-22 12:18:24.029440 [DEBUG] mod_spandsp_dsp.c:373 DTMF BEGIN
</i>&gt;<i> DETECTED: [2]
</i>&gt;<i> 2015-04-22 12:18:24.029440 [DEBUG] switch_channel.c:488 RECV DTMF 2:2000
</i>&gt;<i> 2015-04-22 12:18:24.169442 [DEBUG] mod_spandsp_dsp.c:385 DTMF END DETECTED:
</i>&gt;<i> [2], duration = 153 ms
</i>&gt;<i> 2015-04-22 12:18:24.489445 [DEBUG] switch_channel.c:488 RECV DTMF 5:2000
</i>&gt;<i> 2015-04-22 12:18:24.489445 [DEBUG] mod_gsmopen.cpp:745 rev 1.4.14~32bit
</i>&gt;<i> [(nil)|37     ][DEBUG_GSMOPEN  745  ][interface1][-1, 5, 5] DTMF DETECTED:
</i>&gt;<i> [5] new_dtmf_timestamp: 1654722477, delta_t: 460006
</i>&gt;<i> 2015-04-22 12:18:24.489445 [DEBUG] mod_spandsp_dsp.c:373 DTMF BEGIN
</i>&gt;<i> DETECTED: [5]
</i>&gt;<i> 2015-04-22 12:18:24.489445 [DEBUG] switch_channel.c:488 RECV DTMF 5:2000
</i>&gt;<i> 2015-04-22 12:18:24.649447 [DEBUG] mod_spandsp_dsp.c:385 DTMF END DETECTED:
</i>&gt;<i> [5], duration = 153 ms
</i>&gt;<i> 2015-04-22 12:18:25.609450 [INFO] switch_cpp.cpp:1328 Failed to validate
</i>&gt;<i> Checksum - &#39;5533552255&#39;
</i>&gt;<i>
</i>&gt;<i>
</i>&gt;<i>
</i>&gt;<i>
</i>&gt;<i>
</i>&gt;<i>
</i>&gt;<i> --
</i>&gt;<i> View this message in context:
</i>&gt;<i> <a href="http://freeswitch-users.2379917.n2.nabble.com/Duplicate-DTMF-Issue-tp7596155.html" target="_blank">http://freeswitch-users.2379917.n2.nabble.com/Duplicate-DTMF-Issue-tp7596155.html</a>
</i>&gt;<i> Sent from the freeswitch-users mailing list archive at Nabble.com.
</i>&gt;<i>
</i>&gt;<i> _________________________________________________________________________
</i>&gt;<i> Professional FreeSWITCH Consulting Services:
</i>&gt;<i> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">consulting at freeswitch.org</a>
</i>&gt;<i> <a href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions.com</a>
</i>&gt;<i>
</i>&gt;<i> Official FreeSWITCH Sites
</i>&gt;<i> <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a>
</i>&gt;<i> <a href="http://confluence.freeswitch.org/" target="_blank">http://confluence.freeswitch.org</a>
</i>&gt;<i> <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a>
</i>&gt;<i>
</i>&gt;<i> FreeSWITCH-users mailing list
</i>&gt;<i> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">FreeSWITCH-users at lists.freeswitch.org</a>
</i>&gt;<i> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
</i>&gt;<i> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
</i>&gt;<i> <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a>
</i>&gt;<span class="HOEnZb"><font color="#888888"><i>
</i>


-- 
Sincerely,

Giovanni Maruzzelli
Cell : <a href="tel:%2B39-347-2665618" value="+393472665618" target="_blank">+39-347-2665618</a>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <a href="http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150422/c1e71dbc/attachment.html" target="_blank">http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150422/c1e71dbc/attachment.html</a> 
</font></span></pre><div><br></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Sincerely,<br><br>Giovanni Maruzzelli<br>Cell : +39-347-2665618<br></div>
</div>