openzap_pre_buffer_size is a variable you can set to specific number of MS 60 for example.<div>it will pre_buffer the audio on the channel so when you detect dtmf it will completely drop the buffer so all of the original</div>
<div>dtmf should be dropped as well.  probably if the dtmf is too long then it will cause problems anyway.</div><div><br></div><div>if that pre buffer does not fix anything it would point to echo or bleeding.</div><div><br>
</div><div>We could make a variable to disable dtmf detection completely on a per-call basis possibly but you will still probably hear it bleeding.</div><div><br></div><div>This type of problem was reported fixed with sangoma because of the echo canceler.</div>
<div>I don&#39;t use dahdi or digium stuff much so I can&#39;t comment on what happens when you use it.</div><div> </div><div> <br><br><div class="gmail_quote">On Wed, Jun 16, 2010 at 3:41 AM, François Legal <span dir="ltr">&lt;<a href="mailto:devel@thom.fr.eu.org">devel@thom.fr.eu.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Does this really fix it ?<br>
I wonder because the problem I see here is also that the FXS side detects<br>
the DTMF and then queues it on the FXO side for generation. That leads to<br>
the called party receiving twice the DTMF, the first one is the inband<br>
DTMF, the second is the one queued/generated by the FXO channel.<br>
<br>
For a clean fix, I guess some kind of application should be created, that<br>
would prevent DTMF to be queued on the other channel. Such application<br>
would then be called before the bridge. Maybe there is a cleaner way to do<br>
this.<br>
<font color="#888888"><br>
François<br>
</font><div><div></div><div class="h5"><br>
On Tue, 15 Jun 2010 18:23:13 -0500, &quot;Jeroen C. van Gelderen&quot;<br>
&lt;<a href="mailto:jeroeng@thegreek.com">jeroeng@thegreek.com</a>&gt; wrote:<br>
&gt; Hi everybody,<br>
&gt;<br>
&gt; I have a problem that is very similar to a problem<br>
&gt; reported by François [1] except for the fact that<br>
&gt; my FXS and FXO ports are on a Xorcom Astribank<br>
&gt; device instead of a Sangoma.<br>
&gt;<br>
&gt; To quote François: &quot;The problem is that each leg of<br>
&gt; the bridge is detecting the inband DTMF, and so<br>
&gt; [F]reeswitch sends each detected DTMF from one leg<br>
&gt; to the other, and so on and so forth (as each leg<br>
&gt; detects the DTMF again and again)&quot;<br>
&gt;<br>
&gt; HIS words but evidenced by the MY log :)<br>
&gt;<br>
&gt; The snippet below has DTMF coming in on the FXS port<br>
&gt; (1:1) and bouncing between it and the FXO port (3:1).<br>
&gt; The ports are simply bridged together with<br>
&gt;<br>
&gt;   &quot;bridge(OpenZap/3/1/F)&quot; or &quot;bridge(OpenZap/3/1/w)&quot;<br>
&gt;<br>
&gt; I&#39;m running:<br>
&gt;<br>
&gt; FreeSWITCH version: 1.0.head (git-01c0c69 2010-06-08 16-22-21 -0500)<br>
&gt; dahdi: Version: SVN-trunk-r8762<br>
&gt;<br>
&gt; Output of lsdahdi at end of message.<br>
&gt;<br>
&gt; ----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----<br>
&gt; [...]<br>
&gt; 2010-06-13 04:18:39.217256 [DEBUG] mod_openzap.c:721 queue DTMF [4]<br>
&gt; 2010-06-13 04:18:39.256255 [DEBUG] zap_io.c:2062 3:1 GENERATE DTMF [4]<br>
&gt; 2010-06-13 04:18:39.397253 [DEBUG] mod_openzap.c:721 queue DTMF [4]<br>
&gt; 2010-06-13 04:18:39.439252 [DEBUG] mod_openzap.c:780 Dropping frame!<br>
(write<br>
&gt; not ready)<br>
&gt; 2010-06-13 04:18:39.439252 [DEBUG] zap_io.c:2062 1:1 GENERATE DTMF [4]<br>
&gt; 2010-06-13 04:18:39.637249 [DEBUG] mod_openzap.c:721 queue DTMF [4]<br>
&gt; 2010-06-13 04:18:39.676248 [DEBUG] zap_io.c:2062 3:1 GENERATE DTMF [4]<br>
&gt; 2010-06-13 04:18:39.859244 [DEBUG] mod_openzap.c:780 Dropping frame!<br>
(write<br>
&gt; not ready)<br>
&gt; [...ad infinitum...]<br>
&gt; ----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----<br>
&gt;<br>
&gt; Because I needed DTMF pass-through working &quot;now&quot;<br>
&gt; I applied an ugly HACK. This drops DTMF tones<br>
&gt; detected on spans 3 and 4 (which are my FXO<br>
&gt; spans). This is very WRONG but it does solve<br>
&gt; my immediate problem:<br>
&gt;<br>
&gt; ----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----<br>
&gt; diff --git a/libs/openzap/mod_openzap/mod_openzap.c<br>
&gt; b/libs/openzap/mod_openzap/mod_openzap.c<br>
&gt; index 5aebfea..ff3b081 100644<br>
&gt; --- a/libs/openzap/mod_openzap/mod_openzap.c<br>
&gt; +++ b/libs/openzap/mod_openzap/mod_openzap.c<br>
&gt; @@ -718,8 +718,12 @@ static switch_status_t<br>
&gt; channel_read_frame(switch_core_session_t *session, switch<br>
&gt;                 for (p = dtmf; p &amp;&amp; *p; p++) {<br>
&gt;                         if (is_dtmf(*p)) {<br>
&gt;                                 _dtmf.digit = *p;<br>
&gt; -                               zap_log(ZAP_LOG_DEBUG, &quot;queue DTMF<br>
[%c]\n&quot;,<br>
&gt; *p);<br>
&gt; -                               switch_channel_queue_dtmf(channel,<br>
&amp;_dtmf);<br>
&gt; +                               if (tech_pvt-&gt;zchan-&gt;span_id == 3 ||<br>
&gt; tech_pvt-&gt;zchan-&gt;span_id == 4) {<br>
&gt; +                                       zap_log(ZAP_LOG_DEBUG, &quot;Ignoring<br>
&gt; DTMF [%c] on FXO port %d:%d\n&quot;, *p, tech_pvt-&gt;zchan-&gt;span_id,<br>
&gt; tech_pvt-&gt;zchan-&gt;chan_id)<br>
&gt; ;<br>
&gt; +                               } else {<br>
&gt; +                                       zap_log(ZAP_LOG_DEBUG, &quot;queue<br>
DTMF<br>
&gt; [%c]\n&quot;, *p);<br>
&gt; +<br>
switch_channel_queue_dtmf(channel,<br>
&gt; &amp;_dtmf);<br>
&gt; +                               }<br>
&gt;                         }<br>
&gt;                 }<br>
&gt;         }<br>
&gt; ----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----<br>
&gt;<br>
&gt; Can someone point me in the &quot;right&quot; direction<br>
&gt; instead? Do I need to do this at the OpenZAP/DAHDI<br>
&gt; level by disabling some kind of DTMF detection<br>
&gt; like was done for the Sangoma driver?<br>
&gt;<br>
&gt; Any and all pointers appreciated.<br>
&gt;<br>
&gt; Cheers,<br>
&gt; -Slim<br>
&gt;<br>
&gt; [1] [Freeswitch-dev] FXS bridged on FXO ports and DTMF<br>
&gt;<br>
<a href="http://www.mail-archive.com/freeswitch-dev@lists.freeswitch.org/msg02830.htm" target="_blank">http://www.mail-archive.com/freeswitch-dev@lists.freeswitch.org/msg02830.htm</a><br>
&gt; l<br>
&gt;<br>
&gt; [Freeswitch-dev] Problem with sending<br>
&gt; DTMF on FXS port bridged to   an FXO port<br>
&gt;<br>
<a href="http://lists.freeswitch.org/pipermail/freeswitch-dev/2010-April/003607.html" target="_blank">http://lists.freeswitch.org/pipermail/freeswitch-dev/2010-April/003607.html</a><br>
&gt;<br>
&gt;<br>
&gt; ----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----<br>
&gt; [root@localhost freeswitch]# lsdahdi<br>
&gt; ### Span  1: XBUS-00/XPD-00 &quot;Xorcom XPD #00/00: FXS&quot; (MASTER)<br>
&gt;   1 FXS        FXOKS<br>
&gt;   2 FXS        FXOKS<br>
&gt;   3 FXS        FXOKS<br>
&gt;   4 FXS        FXOKS<br>
&gt;   5 FXS        FXOKS<br>
&gt;   6 FXS        FXOKS<br>
&gt;   7 FXS        FXOKS<br>
&gt;   8 FXS        FXOKS<br>
&gt;   9 Output     FXOKS<br>
&gt;  10 Output     FXOKS<br>
&gt;  11 Input      FXOKS<br>
&gt;  12 Input      FXOKS<br>
&gt;  13 Input      FXOKS<br>
&gt;  14 Input      FXOKS<br>
&gt; ### Span  2: XBUS-00/XPD-10 &quot;Xorcom XPD #00/10: FXS&quot;<br>
&gt;  15 FXS        FXOKS<br>
&gt;  16 FXS        FXOKS<br>
&gt;  17 FXS        FXOKS<br>
&gt;  18 FXS        FXOKS<br>
&gt;  19 FXS        FXOKS<br>
&gt;  20 FXS        FXOKS<br>
&gt;  21 FXS        FXOKS<br>
&gt;  22 FXS        FXOKS<br>
&gt; ### Span  3: XBUS-00/XPD-20 &quot;Xorcom XPD #00/20: FXO&quot;<br>
&gt;  23 FXO        FXSKS        RED<br>
&gt;  24 FXO        FXSKS        RED<br>
&gt;  25 FXO        FXSKS        RED<br>
&gt;  26 FXO        FXSKS        RED<br>
&gt;  27 FXO        FXSKS        RED<br>
&gt;  28 FXO        FXSKS        RED<br>
&gt;  29 FXO        FXSKS        RED<br>
&gt;  30 FXO        FXSKS        RED<br>
&gt; ### Span  4: XBUS-00/XPD-30 &quot;Xorcom XPD #00/30: FXO&quot;<br>
&gt;  31 FXO        FXSKS        RED<br>
&gt;  32 FXO        FXSKS        RED<br>
&gt;  33 FXO        FXSKS        RED<br>
&gt;  34 FXO        FXSKS        RED<br>
&gt;  35 FXO        FXSKS        RED<br>
&gt;  36 FXO        FXSKS        RED<br>
&gt;  37 FXO        FXSKS        RED<br>
&gt;  38 FXO        FXSKS        RED<br>
&gt; ----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----8&lt;----<br>
&gt;<br>
&gt;<br>
&gt; Cheers,<br>
&gt; -Slim<br>
&gt; --<br>
&gt; Jeroen C. &quot;Slim&quot; van Gelderen<br>
&gt; Olympic Sports Data Services<br>
&gt; Email: <a href="mailto:jeroeng@thegreek.com">jeroeng@thegreek.com</a><br>
&gt; Phone: +1 876 953 6182 x128<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; FreeSWITCH-dev mailing list<br>
&gt; <a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
_______________________________________________<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900<br>
</div>