<div dir="ltr">Hi Andrew,<div><br></div><div>It's reproducible - please then </div><div><br></div><div>- attach or send me directly a pcap (with a=crypto line if it's SRTP)</div><div>- describe call setup</div><div>- describe configuration (variables set on channel) </div><div>- anything else if significant</div><div><br></div><div>and I can have a look.</div><div><br></div><div>regards,</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font style="background-color:rgb(255,255,255)" size="4" face="arial, helvetica, sans-serif"><img width="96" height="49" src="https://ci3.googleusercontent.com/mail-sig/AIorK4wE8rSMg277YOGBrgEQayYWXH2G53bMgBu7uf-k-vU6x5SD1T6YWorVfbkDegPbnXcFyHwBODg"><br></font></div><div><font style="background-color:rgb(255,255,255)" size="4" face="arial, helvetica, sans-serif"><br></font></div><div><font style="background-color:rgb(255,255,255)" size="4" face="arial, helvetica, sans-serif">Piotr Gregor</font></div><div><span style="background-color:rgb(255,255,255)"><font size="2" face="arial, helvetica, sans-serif">Software Engineer</font></span></div><div><span style="font-family:arial,helvetica,sans-serif;font-size:x-small"><br></span></div><div><span style="font-family:arial,helvetica,sans-serif;font-size:x-small">M: (+44) 07483 866 525 </span><span style="font-family:arial,helvetica,sans-serif;font-size:x-small">L: (+44) 01256 597 470 </span><span style="font-family:arial,helvetica,sans-serif;font-size:x-small">www: </span><a href="http://dataandsignal.com" style="font-family:arial,helvetica,sans-serif;font-size:x-small" target="_blank">dataandsignal.com</a></div><div><br></div><div><br><br><br></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 12, 2022 at 4:34 PM Dragos Oancea <<a href="mailto:dragos@freeswitch.org">dragos@freeswitch.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">You could open a github issue.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 8, 2022 at 1:40 PM Andy Newlands <<a href="mailto:andynewlands@gmail.com" target="_blank">andynewlands@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Further to my earlier quest, and after a lot of pain, I believe I have figured out the cause of the issue. It lies with what appears to be a bug do_flush() in switch_rtp.c - this would certainly manifest as seemingly random/intermittent behaviour in respect of DTMF handling/processing.<div><br></div><div>I have amended the code and I am currently testing my fix.<br><div><br></div><div><div><div dir="ltr"><div dir="ltr"><div>Kind regards,<br></div><div><br></div><div>Andy</div></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 28 Feb 2022 at 14:12, Andy Newlands <<a href="mailto:andynewlands@gmail.com" target="_blank">andynewlands@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>We have a reproducible problem where spurious DTMF characters are introduced on calls from Freeswitch to a remote (3rd party) IVR, but ONLY when using SRTP (not with RTP)</div><div><br></div><div>When the spurious character is generated it is:</div><div><br></div><div>1. Only ever following a valid/legitimate character (one that was genuinely keyed)</div><div>2. Often has a very long duration (see below)</div><div>3. Appears to be a random character - often 0x00, but sometimes 0-9/A-F,#,* (and that's when we get problems with the IVR - FS automatically drops the 0x00 values).</div><div><br></div><div>We have been able to reproduce this from mobile/cell phones and traditional land-lines.</div><div><br></div><div>I added some code to: switch_rtp.c, in static handle_rfc2833_result_t handle_rfc2833(switch_rtp_t *rtp_session, switch_size_t bytes, int *do_cng), to try to address this.</div><div><br></div><div>It logs an error (with the character hex value and duration) for DTMF characters with "long" durations (over 10000) and then discards them. As you can see, below, this is a fairly frequent occurrence (although most of the time, the character value is null, so FS drps it, anyway - but sometimes, "real" characters are introduced).</div><div><br></div><div>2022-02-28 14:00:53.743665 [NOTICE] switch_vpx.c:599 VPX encoder reset (WxH/BW) from 0x0/0 to 352x288/1024<br>2022-02-28 14:00:56.103665 [INFO] switch_channel.c:522 RECV DTMF 4:2400<br>2022-02-28 14:00:56.303664 [ERR] switch_channel.c:557 Ignored invalid DTMF on Call-ID: 3b5d08d3-d898-40b6-ae00-5886713ca6dd, DTMF: 0x0 Duration: 5063<br>2022-02-28 14:00:56.383661 [INFO] switch_channel.c:522 RECV DTMF 4:2400<br>2022-02-28 14:00:56.583665 [INFO] switch_channel.c:522 RECV DTMF 5:2400<br>2022-02-28 14:00:57.063662 [INFO] switch_channel.c:522 RECV DTMF 5:2400<br>2022-02-28 14:00:57.123670 [INFO] switch_channel.c:522 RECV DTMF 8:2720<br>2022-02-28 14:00:57.323673 [ERR] switch_rtp.c:686 Discarded long-duration DTMF on Call-ID: 3b5d08d3-d898-40b6-ae00-5886713ca6dd, DTMF: 0x0 Duration: 54088<br>2022-02-28 14:00:57.603671 [INFO] switch_channel.c:522 RECV DTMF 9:2400<br>2022-02-28 14:00:57.824102 [INFO] switch_channel.c:522 RECV DTMF 8:2720<br>2022-02-28 14:00:57.903663 [ERR] switch_rtp.c:686 Discarded long-duration DTMF on Call-ID: 3b5d08d3-d898-40b6-ae00-5886713ca6dd, DTMF: 0x0 Duration: 57002<br>2022-02-28 14:00:58.183668 [INFO] switch_channel.c:522 RECV DTMF 6:2400<br>2022-02-28 14:00:58.363666 [ERR] switch_rtp.c:686 Discarded long-duration DTMF on Call-ID: 3b5d08d3-d898-40b6-ae00-5886713ca6dd, DTMF: 0x35 Duration: 57073<br>2022-02-28 14:00:58.503667 [INFO] switch_channel.c:522 RECV DTMF 9:2400<br>2022-02-28 14:00:58.643667 [INFO] switch_channel.c:522 RECV DTMF 1:2400<br>2022-02-28 14:00:58.963663 [INFO] switch_channel.c:522 RECV DTMF 6:2400<br>2022-02-28 14:00:59.283665 [INFO] switch_channel.c:522 RECV DTMF 1:2400<br></div><div><br></div><div>The first spurious character is 0x00 (which FS will drop anyway) but this could easily be a valid character (and would escape detection because its duration is not too long - it's long but not unreasonable). So, this is an imperfect "fix" as we occasionally see a spurious character with a legitimate value and a "sensible" duration - sufficiently often for users to complain. The last [ERR] entry shows a '5' being introduced but this is dropped because the duration is "crazy" (57073)</div><div><br></div><div>As mentioned, this does not happen with secure media disabled - only with SRTP. So, I am wondering if the code correctly processes a digit then, sometimes (somehow) incorrectly attempts to decode part of an audio packet as though it were RFC2833.<div><div dir="ltr"><div dir="ltr"><div><br></div><div>Has anyone else experienced this? Does anyone know what may be causing the problem and what the fix might be.</div><div><br></div><div>I can provide console output and tcp dumps if required, along with any other details that may help (I'm also comfortable making code changes - to for extra logging/diagnostics etc).</div><div><br></div><div>Thank you.</div><div><br></div>Kind regards,<div><br></div><div>Andy</div></div></div></div></div></div>
</blockquote></div>
_________________________________________________________________________<br>
<br>
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer" target="_blank">https://signalwire.com</a><br>
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>
Build your next product on our scalable cloud platform.<br>
<br>
Join our online community to chat in real time <a href="https://signalwire.community" rel="noreferrer" target="_blank">https://signalwire.community</a><br>
<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div>
_________________________________________________________________________<br>
<br>
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer" target="_blank">https://signalwire.com</a><br>
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>
Build your next product on our scalable cloud platform.<br>
<br>
Join our online community to chat in real time <a href="https://signalwire.community" rel="noreferrer" target="_blank">https://signalwire.community</a><br>
<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div>