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