<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Apr 3, 2017 at 1:28 PM, Yury Tsaregorodtsev <span dir="ltr"><<a href="mailto:aero.1080@icloud.com" target="_blank">aero.1080@icloud.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div style="word-wrap:break-word">after fixing attr->fec in open source edition of OPUS and applying Alexanders patch: ASTERISK-25629 (Native Packet-Loss Concealment)<br><div>I have following results:</div><div><br></div><div>I setup 2 hosts with asterisk 13.14.0 and made dozen calls in OPUS between them.</div><div><div>On 2nd host I've simulated packet delay and loss:</div><div><pre style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px;width:auto;max-height:600px;overflow:auto;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;background-color:rgb(239,240,241);word-wrap:normal;color:rgb(36,39,41)"><code style="margin:0px;padding:0px;border:0px;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;white-space:inherit">tc qdisc add dev eth0 root netem loss 20% delay 100ms 20ms distribution normal</code></pre><div><br></div></div><div>On 1st host (call origination side) all media been recorded using App_Monitor.</div><div>On 2nd host it was simple Playback extension with demo-instruct.sln16</div></div><div><br></div><div>Config for digium codec_opus on both was:</div><div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(191,191,191);background-color:rgb(0,0,179)"><span style="font-variant-ligatures:no-common-ligatures">[opus]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(191,191,191);background-color:rgb(0,0,179)"><span style="font-variant-ligatures:no-common-ligatures">type=opus</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(191,191,191);background-color:rgb(0,0,179)"><span style="font-variant-ligatures:no-common-ligatures">packet_loss=40</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(191,191,191);background-color:rgb(0,0,179)"><span style="font-variant-ligatures:no-common-ligatures">max_playback_rate=48000</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(191,191,191);background-color:rgb(0,0,179)"><span style="font-variant-ligatures:no-common-ligatures">bitrate=24000</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(191,191,191);background-color:rgb(0,0,179)"><span style="font-variant-ligatures:no-common-ligatures">cbr=0</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(191,191,191);background-color:rgb(0,0,179)"><span style="font-variant-ligatures:no-common-ligatures">fec=1</span></div></div><div><div><br></div><div>Config for open source edition of OPUS was same, but replaced values in include/asterisk/opus.h</div><div>(and as well I've added to <span style="font-family:menlo;font-size:11px;background-color:rgb(0,166,179)">codecs/codec_opus_open_<wbr>source.c </span> <span style="color:rgb(191,191,191);font-family:menlo;font-size:11px;background-color:rgb(0,0,179);font-variant-ligatures:no-common-ligatures">status </span><span style="font-family:menlo;font-size:11px;background-color:rgb(0,0,179);font-variant-ligatures:no-common-ligatures;color:rgb(230,230,0)">=</span><span style="color:rgb(191,191,191);font-family:menlo;font-size:11px;background-color:rgb(0,0,179);font-variant-ligatures:no-common-ligatures"> opus_encoder_ctl</span><span style="font-family:menlo;font-size:11px;background-color:rgb(0,0,179);font-variant-ligatures:no-common-ligatures;color:rgb(0,230,230)">(</span><span style="color:rgb(191,191,191);font-family:menlo;font-size:11px;background-color:rgb(0,0,179);font-variant-ligatures:no-common-ligatures">opvt</span><span style="font-family:menlo;font-size:11px;background-color:rgb(0,0,179);font-variant-ligatures:no-common-ligatures;color:rgb(230,230,0)">-></span><span style="color:rgb(191,191,191);font-family:menlo;font-size:11px;background-color:rgb(0,0,179);font-variant-ligatures:no-common-ligatures">opus</span><span style="font-family:menlo;font-size:11px;background-color:rgb(0,0,179);font-variant-ligatures:no-common-ligatures;color:rgb(0,230,230)">,</span><span style="color:rgb(191,191,191);font-family:menlo;font-size:11px;background-color:rgb(0,0,179);font-variant-ligatures:no-common-ligatures"> OPUS_SET_PACKET_LOSS_PERC</span><span style="font-family:menlo;font-size:11px;background-color:rgb(0,0,179);font-variant-ligatures:no-common-ligatures;color:rgb(0,230,230)">(</span><span style="color:rgb(191,191,191);font-family:menlo;font-size:11px;background-color:rgb(0,0,179);font-variant-ligatures:no-common-ligatures">pack<wbr>et_loss</span><span style="font-family:menlo;font-size:11px;background-color:rgb(0,0,179);font-variant-ligatures:no-common-ligatures;color:rgb(0,230,230)">))</span><span style="font-family:menlo;font-size:11px;background-color:rgb(0,0,179);font-variant-ligatures:no-common-ligatures;color:rgb(230,0,230)">;)</span></div><div><br></div><div>All recorded degraded media files were compared to original (recorded with AppMonitor as well, but without any delays, losses) accordingly to ITU-T <span style="font-family:menlo;font-size:11px;background-color:rgb(255,255,255)">P.862 (</span><span style="color:rgb(84,84,84);font-family:arial,sans-serif;font-size:small;background-color:rgb(255,255,255)">Perceptual evaluation of speech quality (PESQ))</span><span style="font-family:menlo;font-size:11px;background-color:rgb(255,255,255)">: </span></div><div><br></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Reading degraded file <span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> opus_opensource-maxbitrate_<wbr>24000-cbr_0-fec_1-ID1.wav<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> P.862 Prediction (Raw MOS, MOS-LQO): = 2.840<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> 2.589<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> 8000<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span>nb</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Reading degraded file <span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> opus_opensource-maxbitrate_<wbr>24000-cbr_0-fec_1-ID2.wav<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> P.862 Prediction (Raw MOS, MOS-LQO): = 2.507<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> 2.143<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> 8000<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span>nb</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Reading degraded file <span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> opus_opensource-maxbitrate_<wbr>24000-cbr_0-fec_1-ID3.wav<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> P.862 Prediction (Raw MOS, MOS-LQO): = 2.379<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> 1.994<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> 8000<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span>nb</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Reading degraded file <span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> opus_opensource-maxbitrate_<wbr>24000-cbr_0-fec_1-ID4.wav<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> P.862 Prediction (Raw MOS, MOS-LQO): = 2.472<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> 2.102<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> 8000<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span>nb</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Reading degraded file <span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> opus_opensource-maxbitrate_<wbr>24000-cbr_0-fec_1-ID5.wav<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> P.862 Prediction (Raw MOS, MOS-LQO): = 2.413<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> 2.032<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> 8000<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span>nb</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;background-color:rgb(255,255,255);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Reading degraded file <span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> opus_digium-maxbitrate_24000-<wbr>cbr_0-fec_1-ID1.wav<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> P.862 Prediction (Raw MOS, MOS-LQO): = 1.332<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> 1.258<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> 8000<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span>nb</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Reading degraded file <span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> opus_digium-maxbitrate_24000-<wbr>cbr_0-fec_1-ID2.wav<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> P.862 Prediction (Raw MOS, MOS-LQO): = 0.738<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> 1.110<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> 8000<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span>nb</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Reading degraded file <span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> opus_digium-maxbitrate_24000-<wbr>cbr_0-fec_1-ID3.wav<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> P.862 Prediction (Raw MOS, MOS-LQO): = 2.426<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> 2.047<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> 8000<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span>nb</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Reading degraded file <span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> opus_digium-maxbitrate_24000-<wbr>cbr_0-fec_1-ID4.wav<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> P.862 Prediction (Raw MOS, MOS-LQO): = 0.920<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> 1.143<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span> 8000<span class="gmail-m_4330234942358082959Apple-tab-span" style="white-space:pre-wrap"> </span>nb</span></div><div><span style="font-family:menlo;font-size:11px;background-color:rgb(255,255,255)">Reading degraded file</span><span style="font-family:menlo;font-size:11px;background-color:rgb(255,255,255)"> </span><span class="gmail-m_4330234942358082959Apple-tab-span" style="font-family:menlo;font-size:11px;white-space:pre-wrap"> </span><span style="font-family:menlo;font-size:11px;background-color:rgb(255,255,255)"> </span><span style="font-family:menlo;font-size:11px;background-color:rgb(255,255,255)">opus_digium-maxbitrate_24000-<wbr>cbr_0-fec_1-ID5.wav</span><span class="gmail-m_4330234942358082959Apple-tab-span" style="font-family:menlo;font-size:11px;white-space:pre-wrap"> </span><span style="font-family:menlo;font-size:11px;background-color:rgb(255,255,255)"> P.862 Prediction (Raw MOS, MOS-LQO):</span><span style="font-family:menlo;font-size:11px;background-color:rgb(255,255,255)"> </span><span style="font-family:menlo;font-size:11px;background-color:rgb(255,255,255)">= 2.680</span><span class="gmail-m_4330234942358082959Apple-tab-span" style="font-family:menlo;font-size:11px;white-space:pre-wrap"> </span><span style="font-family:menlo;font-size:11px;background-color:rgb(255,255,255)"> 2.366</span><span class="gmail-m_4330234942358082959Apple-tab-span" style="font-family:menlo;font-size:11px;white-space:pre-wrap"> </span><span style="font-family:menlo;font-size:11px;background-color:rgb(255,255,255)"> 8000</span><span class="gmail-m_4330234942358082959Apple-tab-span" style="font-family:menlo;font-size:11px;white-space:pre-wrap"> </span><span style="font-family:menlo;font-size:11px;background-color:rgb(255,255,255)">nb</span></div><div><br></div><div>MOS on calls using open source opus higher almost twice.</div><div>Subjective opinion regarding audio quality: using open source codec quality almost same as in example on <a href="http://opus-codec.org/examples/" target="_blank">http://opus-codec.org/examp<wbr>les/</a> with 30% loss and FEC, acceptable for ears, but</div><div>using digium opus quality is not acceptable, a lot of spikes, interruptions.</div><div><br></div><div>I also double checked the fact before applying ASTERISK-25629 patch asterisk don't drop lately arrived RTP.</div><div>I've recorded UDP dump and replayed it using "<span style="font-family:menlo;font-size:11px;background-color:rgb(255,255,255)">bittwist" utility, without patch all RTP packets been played again, with patch all of them been ignored.</span></div><div><br></div></div></div></div></blockquote><div><br></div><div>Hi Yury,</div><div><br></div><div>We for sure want to look more into this. If you would open an issue on the Asterisk issue tracker [1] it would be much appreciated. Be sure to include all your findings.<br></div><div><br></div><div>When possible list the exact version numbers you are using for the various tools and libraries being used (Asterisk - output of running "asterisk -V", PESQ, Opus library for when you used the Asterisk open source codec, etc).</div><div><br></div><div>Also if possible include information about your Asterisk setup. Dialplan used (extensions.conf), endpoint configuration (pjsip.conf or sip.conf), etc...</div><div><br></div><div>Also include the exact commands you used when running tests. All of this will greatly help in duplicating results.</div><div><br></div><div>[1] <a href="https://issues.asterisk.org">https://issues.asterisk.org</a></div><div><br></div><div>Thanks!</div><div><br></div><div>Kevin </div></div>
</div></div>