<div dir="ltr">Hi All,<div><br></div><div>We have come across an issue where freeswitch ((Version 1.10.5 -release-17-25569c1631 64bit)</div><div>seems to be doing something wrong with regards to RFC4733 DTMF event packets generation.</div><div><br></div><div>What we see is that freeswitch would start using a new timestamp base for the RTP event packets (sometimes even for a few RTP packets preceeding the DTMF packetS) and then at the end of the DTMF event revert to older timestamp base. Although the marker bit is set on when new timestamp base is used but as far as I know this is not RFC compliant and causes issues for some of the PBX devices. </div><div><br></div><div><pre class="gmail-c-mrkdwn__pre" style="box-sizing:inherit;margin-top:4px;margin-bottom:4px;padding:8px;font-size:12px;line-height:1.50001;font-variant-ligatures:none;white-space:pre-wrap;word-break:normal;border-radius:4px;color:rgb(29,28,29);font-family:Monaco,Menlo,Consolas,"Courier New",monospace">RFC 4733, section 2.5.1.2 says:<br style="box-sizing:inherit">DTMF digits and other named telephone events are carried as part of<br style="box-sizing:inherit">the audio stream, and they MUST use the same sequence number and<br style="box-sizing:inherit">timestamp base as the regular audio channel to simplify the<br style="box-sizing:inherit">generation of audio waveforms at a gateway.```<br style="box-sizing:inherit"><a target="_blank" class="gmail-c-link" href="https://tools.ietf.org/html/rfc4733#section-2.5.1" rel="noopener noreferrer" style="box-sizing:inherit;color:inherit;text-decoration-line:none">https://tools.ietf.org/html/rfc4733#section-2.5.1</a></pre><pre class="gmail-c-mrkdwn__pre" style="box-sizing:inherit;margin-top:4px;margin-bottom:4px;padding:8px;font-size:12px;line-height:1.50001;font-variant-ligatures:none;white-space:pre-wrap;word-break:normal;border-radius:4px;color:rgb(29,28,29);font-family:Monaco,Menlo,Consolas,"Courier New",monospace"><span style="font-family:Arial,Helvetica,sans-serif;font-size:small;font-variant-ligatures:normal;color:rgb(34,34,34)">--</span><br></pre><div class="gmail_signature" data-smartmail="gmail_signature">I think if freeswitch were to change the timestamp for DTMF event packets then it must also change the RTP  SSRC at same time (which does not happen)</div></div><div class="gmail_signature" data-smartmail="gmail_signature">Although I don't understand the need to change timestamp base at all for the start of DTMF event  packets or even with the few proceeding RTP packets.</div><div class="gmail_signature" data-smartmail="gmail_signature"><br></div><div class="gmail_signature" data-smartmail="gmail_signature">I have tried to use following parameter but that does not help<br></div><div class="gmail_signature" data-smartmail="gmail_signature"><span style="color:rgb(25,37,39);font-family:"Segoe UI","Segoe WP",Arial,sans-serif;font-size:17px"><param name="auto-rtp-bugs" data="CHANGE_SSRC_ON_MARKER"/></span><br></div><div class="gmail_signature" data-smartmail="gmail_signature"><span style="color:rgb(25,37,39);font-family:"Segoe UI","Segoe WP",Arial,sans-serif;font-size:17px"><br></span></div><div class="gmail_signature" data-smartmail="gmail_signature"> I have also tried to test with these additional parameters (in order to infleunce freeswitch to not use a new timestamp base for the start of dtmf event packets)  but no change in freeswitch behaviour.<br></div><div class="gmail_signature" data-smartmail="gmail_signature"><br></div><div class="gmail_signature" data-smartmail="gmail_signature">  <param name="pass-rfc2833" value="true"/>  <br></div><div class="gmail_signature" data-smartmail="gmail_signature"><font color="#000000"><code class="gmail-xml gmail-plain" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit"><</code><code class="gmail-xml gmail-keyword" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">param </code><code class="gmail-xml gmail-color1" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">name</code><code class="gmail-xml gmail-plain" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">=</code><code class="gmail-xml gmail-string" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">"rtp-rewrite-timestamps"</code><code class="gmail-xml gmail-color1" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">value</code><code class="gmail-xml gmail-plain" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">=</code><code class="gmail-xml gmail-string" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">"true"</code><code class="gmail-xml gmail-plain" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">/></code></font><br></div><div class="gmail_signature" data-smartmail="gmail_signature"><font color="#000000"><code class="gmail-xml gmail-plain" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit"><</code><code class="gmail-xml gmail-keyword" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">param </code><code class="gmail-xml gmail-color1" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">name</code><code class="gmail-xml gmail-plain" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">=</code><code class="gmail-xml gmail-string" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">"auto-rtp-bugs"</code><code class="gmail-xml gmail-color1" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">value</code><code class="gmail-xml gmail-plain" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">=</code><code class="gmail-xml gmail-string" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">"CISCO_SKIP_MARK_BIT_2833"</code><code class="gmail-xml gmail-plain" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">/></code></font><br></div><div class="gmail_signature" data-smartmail="gmail_signature"><font color="#000000"><code class="gmail-xml gmail-plain" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit"><</code><code class="gmail-xml gmail-keyword" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">param </code><code class="gmail-xml gmail-color1" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">name</code><code class="gmail-xml gmail-plain" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">=</code><code class="gmail-xml gmail-string" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">"auto-rtp-bugs"</code><code class="gmail-xml gmail-color1" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">value</code><code class="gmail-xml gmail-plain" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">=</code><code class="gmail-xml gmail-string" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">"clear"</code><code class="gmail-xml gmail-plain" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit">/></code>  <code class="gmail-xml gmail-plain" style="font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;white-space:pre-wrap;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:20px;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;box-sizing:content-box;font-size:14px;min-height:inherit"><br></code></font></div><div class="gmail_signature" data-smartmail="gmail_signature"><font color="#000000"> </font></div><div class="gmail_signature" data-smartmail="gmail_signature"><font color="#000000">In addition I have tried to use some jitter related sofia profile parameters but no affect.</font></div><div class="gmail_signature" data-smartmail="gmail_signature"><font color="#000000"><br></font></div><div class="gmail_signature" data-smartmail="gmail_signature"><font color="#000000">Another DTMF related issue that I have seen with freeswitch is that it sends DTMF event packets in a short burst and not evenly spaced out per the codec sample rate.</font></div><div class="gmail_signature" data-smartmail="gmail_signature"><font color="#000000">For example if RTP is being sent at 20ms, freeswitch would send dtmf event packets at different interval like it may send 8ms apart or 13 ms apat and at times it sends multiple event packets just a few ms apart. </font></div><div class="gmail_signature" data-smartmail="gmail_signature"><font color="#000000"><br></font></div><div class="gmail_signature" data-smartmail="gmail_signature"><font color="#000000">To fix that behaviour, when we explicity set the RTP-timer-name to "soft" using</font></div><div class="gmail_signature" data-smartmail="gmail_signature"><pre style="margin-top:10px;margin-bottom:0px;padding:0px;font-family:ConfluenceInstalledFont,monospace;font-size:14px"><font color="#000000"><param name="rtp-timer-name" value="soft"/></font></pre><pre style="margin-top:10px;margin-bottom:0px;padding:0px;font-family:ConfluenceInstalledFont,monospace;color:rgb(23,43,77);font-size:14px"><br></pre></div><div class="gmail_signature" data-smartmail="gmail_signature"><font color="#000000"> that fixes it and ensures evenly spaced DTMF packets say 20 ms apart (that fixes interop with some of the devices) </font></div><div class="gmail_signature" data-smartmail="gmail_signature"><font color="#000000">            </font></div><div class="gmail_signature" data-smartmail="gmail_signature">Any help is highly appreciated.</div><div class="gmail_signature" data-smartmail="gmail_signature"><br></div><div class="gmail_signature" data-smartmail="gmail_signature">Thanks</div><div class="gmail_signature" data-smartmail="gmail_signature">Arslan</div><div class="gmail_signature" data-smartmail="gmail_signature"><br></div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><br></div></div>