<div dir="ltr"><pre style="color:rgb(0,0,0)">Hey Giovanni,</pre><pre style="color:rgb(0,0,0)">Awesome! I will compile it tonight and let you know how it goes.</pre><pre style="color:rgb(0,0,0)">Thank you again for your help.</pre><pre style="color:rgb(0,0,0)">Jeremy</pre><pre style="color:rgb(0,0,0)"><br></pre><pre style="color:rgb(0,0,0)"><br></pre><pre style="color:rgb(0,0,0)"><br></pre><pre style="color:rgb(0,0,0)"><br></pre><pre style="color:rgb(0,0,0)"><br></pre><pre style="color:rgb(0,0,0)">Hello Jeremy,
ok, understood now.
Gsmopen uses internally spandsp to detect DTMFs.
Because of possible false multiple detections, there is an hardcoded
minimum duration of 350 ms for each DTMF.
In your specific case, edit mod_gsmopen.cpp in
/usr/src/freeswitch/src/mod/endpoints/mod_gsmopen, and modify the value at
line 3302:
if ((new_dtmf_timestamp - tech_pvt->old_dtmf_timestamp) >
350000) { //FIXME: make it configurable
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)
That should do the trick.
Let us know if you encounter problems.
-giovanni
On Thu, Apr 23, 2015 at 2:39 PM, Jeremy <<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">jhorsburgh at gmail.com</a>> wrote:
><i> Hi Giovanni,
</i>><i>
</i>><i> Thank you for your reply, sorry I didn't explain the problem very well.
</i>><i>
</i>><i> 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).
</i>><i>
</i>><i> 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).
</i>><i>
</i>><i> You are correct. Is it possible for gsmopen not to recognize DTMF's and use only spandsp to analyze the audio?
</i>><i>
</i>><i> Thank you for your help in advance.
</i>><i>
</i>><i> Jeremy.
</i>><i>
</i>><i>
</i>><i> P.S. Greatly appreciate the work you have put into GSMopen, brilliant work!
</i>><i>
</i>><i>
</i>><i> Hello Jeremy,
</i>><i>
</i>><i> I've not understood the problem, and the solution you are looking for.
</i>><i>
</i>><i> You want gsmopen not to recognize DTMFs, so you can analyze the audio with
</i>><i> spandsp?
</i>><i>
</i>><i> Can you give more info ?
</i>><i>
</i>><i> -giovanni
</i>><i>
</i>><i> On Wed, Apr 22, 2015 at 2:58 PM, jhorsburgh <jhorsburgh at <a href="http://gmail.com">gmail.com</a> <<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>>> wrote:
</i>><i>
</i>><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> *>>* *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> *>>* *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> *>>* Is there a way of disabling DTMF detection with the exception of spandsp?
</i>><i> *>>* Any help would be greatly appreciated.
</i>><i> *>>* Kind regards,
</i>><i> *>* Jeremy
</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> *>* View this message in context:
</i>><i> *>* <a href="http://freeswitch-users.2379917.n2.nabble.com/Duplicate-DTMF-Issue-tp7596155.html">http://freeswitch-users.2379917.n2.nabble.com/Duplicate-DTMF-Issue-tp7596155.html</a> <<a href="http://freeswitch-users.2379917.n2.nabble.com/Duplicate-DTMF-Issue-tp7596155.html">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> *>* Professional FreeSWITCH Consulting Services:
</i>><i> *>* consulting at <a href="http://freeswitch.org">freeswitch.org</a> <<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>>
</i>><i> *>* <a href="http://www.freeswitchsolutions.com/">http://www.freeswitchsolutions.com</a> <<a href="http://www.freeswitchsolutions.com/">http://www.freeswitchsolutions.com/</a>>
</i>><i> *>>* Official FreeSWITCH Sites
</i>><i> *>* <a href="http://www.freeswitch.org/">http://www.freeswitch.org</a> <<a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a>>
</i>><i> *>* <a href="http://confluence.freeswitch.org/">http://confluence.freeswitch.org</a> <<a href="http://confluence.freeswitch.org/">http://confluence.freeswitch.org/</a>>
</i>><i> *>* <a href="http://www.cluecon.com/">http://www.cluecon.com</a> <<a href="http://www.cluecon.com/">http://www.cluecon.com/</a>>
</i>><i> *>>* FreeSWITCH-users mailing list
</i>><i> *>* FreeSWITCH-users at <a href="http://lists.freeswitch.org">lists.freeswitch.org</a> <<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>>
</i>><i> *>* <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a> <<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>>
</i>><i> *>* UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a> <<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>>
</i>><i> *>* <a href="http://www.freeswitch.org/">http://www.freeswitch.org</a> <<a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a>>
</i>><i> *>
</i>><i>
</i>><i>
</i>><i> --
</i>><i> Sincerely,
</i>><i>
</i>><i> Giovanni Maruzzelli
</i>><i> Cell : +39-347-2665618
</i>><i> -------------- next part --------------
</i>><i> An HTML attachment was scrubbed...
</i>><i> URL: <a href="http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150422/c1e71dbc/attachment.html">http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150422/c1e71dbc/attachment.html</a>
</i>><i>
</i>><i>
</i>><i>
</i>><i> _________________________________________________________________________
</i>><i> Professional FreeSWITCH Consulting Services:
</i>><i> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">consulting at freeswitch.org</a>
</i>><i> <a href="http://www.freeswitchsolutions.com/">http://www.freeswitchsolutions.com</a>
</i>><i>
</i>><i> Official FreeSWITCH Sites
</i>><i> <a href="http://www.freeswitch.org/">http://www.freeswitch.org</a>
</i>><i> <a href="http://confluence.freeswitch.org/">http://confluence.freeswitch.org</a>
</i>><i> <a href="http://www.cluecon.com/">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">FreeSWITCH-users at lists.freeswitch.org</a>
</i>><i> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
</i>><i> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
</i>><i> <a href="http://www.freeswitch.org/">http://www.freeswitch.org</a>
</i>><i>
</i>
--
Sincerely,
Giovanni Maruzzelli
Cell : +39-347-2665618
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <a href="http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150423/9c2753e2/attachment-0001.html">http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150423/9c2753e2/attachment-0001.html</a> </pre></div>