<div dir="ltr"><div>Media bugs can force a transcoding situation in some cases because it must decode the audio in order to tap into it.</div><div><br></div><div><br></div>If you use the jitterbuffer with opus its possible to configure it to use PLC to handle packet loss.<div><a href="https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+And+The+Opus+Audio+Codec">https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+And+The+Opus+Audio+Codec</a><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 31, 2017 at 1:02 PM, Dmitriy Ageev <span dir="ltr"><<a href="mailto:dmitriy.a@soniccloud.com" target="_blank">dmitriy.a@soniccloud.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="RU" link="blue" vlink="purple">
<div class="m_-1198048035350074552WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Thank you for quick response.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Maybe it’s not clearly related but we have another question related to the situation described below. Probably partially
due to the spoken problem with sequence numbers we clearly observe audio drops in previous situation.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">But we have another use case when we make a direct client to client call with Opus codec through Freesiwtch with invoking
media bugs. And in such case we don’t notice any audio drops.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">So from this there are questions in which we would be thankful to have answer:<u></u><u></u></span></p>
<p class="m_-1198048035350074552MsoListParagraph"><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><span>-<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Maybe there are some difference in how Freesiwtch handles packet out of order or lost packets when media bug
is involved? Why there is a clear difference in audio for these two situations because in both cases we don’t enable Freeswitch Jitter Buffer?<u></u><u></u></span></p>
<p class="m_-1198048035350074552MsoListParagraph"><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><span>-<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> I assume that the reason is that for media bug it performs opus decoding so mod_opus performs accurate FEC
based on the sequence number and maybe some other opus internal work. Also looking into mod_opus code we see that even jitter buffer is used there. Is that correct? Is there something we are missing?<u></u><u></u></span></p>
<p class="m_-1198048035350074552MsoListParagraph"><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><span>-<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Would you recommend to enable jitter buffer at Freeswitch for the use case below?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Thanks a lot for all you efforts in Freeswitch and making it clear to us on how it works.<u></u><u></u></span></p><span class="">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">___________<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Best Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Dmitriy Ageev<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</span><p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@<wbr>lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-<wbr>bounces@lists.freeswitch.org</a>]
<b>On Behalf Of </b>Anthony Minessale<br>
<b>Sent:</b> Monday, January 30, 2017 7:54 PM<br>
<b>To:</b> FreeSWITCH Users Help <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.<wbr>freeswitch.org</a>><br>
<b>Subject:</b> Re: [Freeswitch-users] Sequence numbers are created on outgoing call leg without taking into account lost sequence number on incoming call leg<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">This is why audio jitter buffers need to look at timestamp and not seq numbers to determine lost packets.<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">Its required by the RFC to always write new seq numbers when generating a new stream.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">On Mon, Jan 30, 2017 at 10:12 AM, Dmitriy Ageev <</span><a href="mailto:dmitriy.a@soniccloud.com" target="_blank"><span lang="EN-US">dmitriy.a@soniccloud.com</span></a><span lang="EN-US">> wrote:<u></u><u></u></span></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">Hello,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">It would be much appreciated to have some advice on following
<span style="color:black">use case</span>.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">We establish a call on a Freeswitch
<span style="color:black">by</span> creat<span style="color:black">ing</span> two call legs separately and then bridged them together:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Client <--Call Leg A--> Freeswtich <--Call Leg B--> Gstreamer<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1f497d"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">During a call there are packet losses on Call Leg A between Client and Freeswitch and we have appropriate notifications in a Freeswitch debug logs. As well as
it's clear from the pcap logs taken from a Freeswitch that RTP packets are missing with certain sequence number.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Since Client and Gstreamer using same Opus codec Freeswitch just sends packets straightly with same payload and timestamp to Gstreamer. The only thing is changed
in RTP packets are SSRC and Sequence Numbers.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">In a case when RTP packet is lost sequence numbers are not preserved between Call Leg A and Call Leg B. So Call Leg B just got packets which are make it up to
Freeswitch. That means that Call Leg B gets for all received on a Freeswitch RTP packets consecutive sequence numbers (unfortunately lost packets are not count) and so Gstreamer is not aware of the packet loss which took precedence on a previous Call Leg A.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Due to this since all RTP packets are consecutive on Call Leg B Gstreamer have no notion of a lost packet. So it is not starting a procedure of Forward Error
Correction (FEC) on a lost packet and eventually we got audio drops which are not handled. As well as Freeswitch is not decoding payload so it doesn't do FEC on Opus side.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">That's why we are wondering what could be a solution for that? From first glance into RTP RFC it seems ok to have such behavior, i.e. not take into account previous
sequence numbers for a packet loss. But maybe it's just not considering such cases. Is there other RFCs which cover such situations?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">We thinking maybe it make sense to have a patch to FS so that we would receive if not the same but at least have the same gaps in the sequence numbers as on Call
Leg A?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Or maybe some other solution to that problem which is available on a Freeswitch?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">If you need us to share any FS logs will be happy to provide.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I’ll attach pcap logs for the time being.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">188.130.168.205 - Client<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">10.240.0.12 – Freeswitch<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">10.240.0.7 – Gstreamer<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Please take a look at following filter. Where 24632 is missing packet on Call leg A:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">rtp.seq== 24631 || rtp.seq== 24632 || rtp.seq== 24633 || rtp.seq == 56583 || rtp.seq == 56582<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">___________<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Best Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Dmitriy Ageev<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><br>
______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
</span><a href="mailto:consulting@freeswitch.org" target="_blank"><span lang="EN-US">consulting@freeswitch.org</span></a><span lang="EN-US"><br>
</span><a href="http://www.freeswitchsolutions.com" target="_blank"><span lang="EN-US">http://www.<wbr>freeswitchsolutions.com</span></a><span lang="EN-US"><br>
<br>
Official FreeSWITCH Sites<br>
</span><a href="http://www.freeswitch.org" target="_blank"><span lang="EN-US">http://www.freeswitch.org</span></a><span lang="EN-US"><br>
</span><a href="http://confluence.freeswitch.org" target="_blank"><span lang="EN-US">http://confluence.freeswitch.<wbr>org</span></a><span lang="EN-US"><br>
</span><a href="http://www.cluecon.com" target="_blank"><span lang="EN-US">http://www.cluecon.com</span></a><span lang="EN-US"><br>
<br>
FreeSWITCH-users mailing list<br>
</span><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank"><span lang="EN-US">FreeSWITCH-users@lists.<wbr>freeswitch.org</span></a><span lang="EN-US"><br>
</span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank"><span lang="EN-US">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</span></a><span lang="EN-US"><br>
UNSUBSCRIBE:</span><a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank"><span lang="EN-US">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</span></a><span lang="EN-US"><br>
</span><a href="http://www.freeswitch.org" target="_blank"><span lang="EN-US">http://www.freeswitch.org</span></a><span lang="EN-US"><u></u><u></u></span></p>
</blockquote>
</div>
<p class="MsoNormal"><span lang="EN-US"><br>
<br clear="all">
<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US">-- <u></u><u></u></span></p>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">Anthony Minessale II </span><span lang="EN-US" style="font-family:"Segoe UI Symbol",sans-serif">♬</span><span lang="EN-US"> @anthmfs </span><span lang="EN-US" style="font-family:"Segoe UI Symbol",sans-serif">♬</span><span lang="EN-US">
@FreeSWITCH </span><span lang="EN-US" style="font-family:"Segoe UI Symbol",sans-serif">♬</span><span lang="EN-US"><u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Segoe UI Symbol",sans-serif">☞</span><span lang="EN-US">
</span><a href="http://freeswitch.org/" target="_blank"><span lang="EN-US">http://freeswitch.org/</span></a><span lang="EN-US"> </span><span lang="EN-US" style="font-family:"Segoe UI Symbol",sans-serif">☞</span><span lang="EN-US">
</span><a href="http://cluecon.com/" target="_blank"><span lang="EN-US">http://cluecon.com/</span></a><span lang="EN-US"> </span><span lang="EN-US" style="font-family:"Segoe UI Symbol",sans-serif">☞</span><span lang="EN-US">
</span><a href="http://twitter.com/FreeSWITCH" target="_blank"><span lang="EN-US">http://twitter.com/FreeSWITCH</span></a><span lang="EN-US"><u></u><u></u></span></p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US" style="font-family:"Segoe UI Symbol",sans-serif">☞</span><span lang="EN-US">
</span><a href="http://irc.freenode.net" target="_blank"><span lang="EN-US">irc.freenode.net</span></a><span lang="EN-US"> #freeswitch </span><span lang="EN-US" style="font-family:"Segoe UI Symbol",sans-serif">☞</span><span lang="EN-US">
</span><a href="http://freeswitch.org/g+" target="_blank"><span lang="EN-US">http://freeswitch.org/g+</span></a><span lang="EN-US"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">ClueCon Weekly Development Call <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Segoe UI Symbol",sans-serif">☎</span><span lang="EN-US"> </span><a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank"><span lang="EN-US">sip:888@conference.<wbr>freeswitch.org</span></a><span lang="EN-US">
</span><span lang="EN-US" style="font-family:"Segoe UI Symbol",sans-serif">☎</span><span lang="EN-US"> <a href="tel:(919)%20386-9900" value="+19193869900" target="_blank">+19193869900</a> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><a href="https://www.youtube.com/watch?v=9XXgW34t40s" target="_blank"><span lang="EN-US" style="font-size:9.5pt;color:#1155cc">https://www.youtube.com/watch?<wbr>v=9XXgW34t40s</span></a><span lang="EN-US"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><a href="https://www.youtube.com/watch?v=NLaDpGQuZDA" target="_blank"><span lang="EN-US">https://www.youtube.com/watch?<wbr>v=NLaDpGQuZDA</span></a><span lang="EN-US"><u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div></div>
</div>
<br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" 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.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬<div><br><div>☞ <a href="http://freeswitch.org/" target="_blank">http://freeswitch.org/</a> ☞ <a href="http://cluecon.com/" target="_blank">http://cluecon.com/</a> ☞ <a href="http://twitter.com/FreeSWITCH" target="_blank">http://twitter.com/FreeSWITCH</a></div><div><div>☞ <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch ☞ <u><a href="http://freeswitch.org/g+" target="_blank">http://freeswitch.org/g+</a></u><br><br></div><div>ClueCon Weekly Development Call <br></div><div>☎ <a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a> ☎ +19193869900 </div><div><br></div></div></div><div><a href="https://www.youtube.com/watch?v=9XXgW34t40s" style="color:rgb(17,85,204);font-size:12.8000001907349px" target="_blank">https://www.youtube.com/watch?v=9XXgW34t40s</a></div><div><a href="https://www.youtube.com/watch?v=NLaDpGQuZDA" target="_blank">https://www.youtube.com/watch?v=NLaDpGQuZDA</a><br></div></div></div></div></div></div></div>
</div>