<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><font face="HelveticaNeue" class="">Hi All,</font></div><div class=""><font face="HelveticaNeue" class=""><br class=""></font></div><div class=""><font face="HelveticaNeue" class="">I am trying to transcode between OPUS and G711. I encountered a strange problem which I couldn’t find any clue about the cause. After the channel has been answered with opus, I hear a strange sound (highly distorted version of my voice) for 10 seconds and it starts to operate properly with the message "[DEBUG] switch_core_media_bug.c:1198 Removing BUG from…” . I can reproduce same problem with echo application. Here is my logs and opus.conf.xml files. Did anybody experienced this issue?</font></div><div class=""><font face="HelveticaNeue" class=""><br class=""></font></div><div class=""><font face="HelveticaNeue" class="">Thanks.</font></div><div class=""><font face="HelveticaNeue" class=""><br class=""></font></div><div class=""><font face="HelveticaNeue" class="">/Volkan</font></div><div class=""><font face="HelveticaNeue" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class="">My FreeSWITH Version:</font></div><div class=""><font face="Menlo" class="">FreeSWITCH Version 1.6.16+git~20170407T164913Z~3da6bd0108~64bit (git 3da6bd0 2017-04-07 16:49:13Z 64bit)</font></div><div class=""><br class=""></div><div class=""><font face="Menlo" class="">Opus.xml config:</font></div><div class=""><font face="Menlo" class=""><configuration name="opus.conf"></font></div><div class=""><font face="Menlo" class=""><settings></font></div><div class=""><font face="Menlo" class=""><param name="use-vbr" value="1"/></font></div><div class=""><font face="Menlo" class=""><param name="use-dtx" value="1"/></font></div><div class=""><font face="Menlo" class=""><param name="complexity" value="10"/></font></div><div class=""><font face="Menlo" class=""><param name="maxaveragebitrate" value="14400"/></font></div><div class=""><font face="Menlo" class=""><param name="maxplaybackrate" value="8000"/></font></div><div class=""><font face="Menlo" class=""><param name="packet-loss-percent" value="15"/></font></div><div class=""><font face="Menlo" class=""><param name="keep-fec-enabled" value="1"/></font></div><div class=""><font face="Menlo" class=""><param name="use-jb-lookahead" value="0"/></font></div><div class=""><font face="Menlo" class=""><param name="advertise-useinbandfec" value="1"/></font></div><div class=""><font face="Menlo" class=""><param name="asymmetric-sample-rates" value="1"/></font></div><div class=""><font face="Menlo" class=""></settings></font></div><div class=""><font face="Menlo" class=""></configuration></font></div><div class=""><br class=""></div><div class=""><font face="Menlo" class="">Freeswitch Log:</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.277462 [NOTICE] switch_channel.c:1104 New Channel <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a> [1048c869-8d71-41fd-b0b7-f8fbd01a0d93]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.277462 [DEBUG] switch_core_state_machine.c:584 (<a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a>) Running State Change CS_NEW (Cur 2 Tot 3196652)</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.277462 [DEBUG] sofia.c:9828 <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a> receiving invite from 192.168.100.2:5060 version: 1.6.16 git 3da6bd0 2017-04-07 16:49:13Z 64bit</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.277462 [DEBUG] sofia.c:7048 Channel <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a> entering state [received][100]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.277462 [DEBUG] sofia.c:7058 Remote SDP:</font></div><div class=""><font face="Menlo" class="">v=0</font></div><div class=""><font face="Menlo" class="">o=- 8070049943 45777 IN IP4 192.168.100.2</font></div><div class=""><font face="Menlo" class="">s=dvjtiwu</font></div><div class=""><font face="Menlo" class="">c=IN IP4 192.168.100.2</font></div><div class=""><font face="Menlo" class="">t=0 0</font></div><div class=""><font face="Menlo" class="">m=audio 10036 RTP/AVP 103 8 0 9 101</font></div><div class=""><font face="Menlo" class="">a=rtpmap:103 opus/48000/2</font></div><div class=""><font face="Menlo" class="">a=fmtp:103 maxplaybackrate=8000;maxaveragebitrate=15500;useinbandfec=1;usedtx=1</font></div><div class=""><font face="Menlo" class="">a=rtpmap:101 telephone-event/8000</font></div><div class=""><font face="Menlo" class="">a=fmtp:101 0-15</font></div><div class=""><font face="Menlo" class="">a=ptime:20</font></div><div class=""><font face="Menlo" class="">a=nortpproxy:yes</font></div><div class=""><font face="Menlo" class="">.</font></div><div class=""><font face="Menlo" class="">.</font></div><div class=""><font face="Menlo" class="">.</font></div><div class=""><font face="Menlo" class="">.</font></div><div class=""><font face="Menlo" class="">.</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.337394 [INFO] mod_dialplan_xml.c:637 Processing 2223 <2223>->*71 in context default</font></div><div class=""><font face="Menlo" class="">Dialplan: <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a> parsing [default->echo] continue=false</font></div><div class=""><font face="Menlo" class="">Dialplan: <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a> Regex (PASS) [echo] destination_number(*71) =~ /^\*71$/ break=on-false</font></div><div class=""><font face="Menlo" class="">Dialplan: <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a> Action answer()</font></div><div class=""><font face="Menlo" class="">Dialplan: <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a> Action echo()</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_state_machine.c:286 (<a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a>) State Change CS_ROUTING -> CS_EXECUTE</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_state_machine.c:643 (<a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a>) State ROUTING going to sleep</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_state_machine.c:584 (<a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a>) Running State Change CS_EXECUTE (Cur 2 Tot 3196652)</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_state_machine.c:650 (<a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a>) State EXECUTE</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] mod_sofia.c:198 <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a> SOFIA EXECUTE</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_state_machine.c:328 <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a> Standard EXECUTE</font></div><div class=""><font face="Menlo" class="">EXECUTE <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a> answer()</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:4429 Audio Codec Compare [opus:103:48000:20:0:1]/[opus:116:48000:20:0:1]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:4484 Audio Codec Compare [opus:116:48000:20:0:1] ++++ is saved as a match</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:4429 Audio Codec Compare [opus:103:48000:20:0:1]/[PCMU:0:8000:20:64000:1]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:4429 Audio Codec Compare [opus:103:48000:20:0:1]/[PCMA:8:8000:20:64000:1]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:4429 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[opus:116:48000:20:0:1]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:4429 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:4429 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:4484 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:4429 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[opus:116:48000:20:0:1]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:4429 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:4484 Audio Codec Compare [PCMU:0:8000:20:64000:1] ++++ is saved as a match</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:4429 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:4429 Audio Codec Compare [G722:9:8000:20:64000:1]/[opus:116:48000:20:0:1]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:4429 Audio Codec Compare [G722:9:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:4429 Audio Codec Compare [G722:9:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:4345 Set telephone-event payload to 101@8000</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] mod_opus.c:596 Opus encoder: set bitrate based on maxaveragebitrate value found in SDP or local config [14400bps]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] mod_opus.c:613 Opus encoder: set audio bandwidth to [NARROWBAND] based on maxplaybackrate value found in SDP or local config [8000Hz]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] mod_opus.c:596 Opus encoder: set bitrate based on maxaveragebitrate value found in SDP or local config [14400bps]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] mod_opus.c:613 Opus encoder: set audio bandwidth to [NARROWBAND] based on maxplaybackrate value found in SDP or local config [8000Hz]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:3049 Set Codec <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a> opus/8000 20 ms 960 samples 0 bits 1 channels</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_codec.c:111 <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a> Original read codec set to opus:116</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:4747 <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a> Set 2833 dtmf send payload to 101 recv payload to 101</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:6803 AUDIO RTP [<a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a>] 192.168.100.12 port 23594 -> 192.168.100.2 port 10036 codec: 103 ms: 20</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_rtp.c:4096 Starting timer [soft] 960 bytes per 20ms</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:7109 <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a> Set 2833 dtmf send payload to 101</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:7116 <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a> Set 2833 dtmf receive payload to 101</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:7139 <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a> Set rtp dtmf delay to 40</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [NOTICE] sofia_media.c:92 Pre-Answer <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a>!</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_channel.c:3473 (<a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a>) Callstate Change RINGING -> EARLY</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media.c:6786 Audio params are unchanged for <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a>.</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] mod_sofia.c:850 Local SDP <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a>:</font></div><div class=""><font face="Menlo" class="">v=0</font></div><div class=""><font face="Menlo" class="">o=FreeSWITCH 1506342472 1506342473 IN IP4 192.168.100.12</font></div><div class=""><font face="Menlo" class="">s=FreeSWITCH</font></div><div class=""><font face="Menlo" class="">c=IN IP4 192.168.100.12</font></div><div class=""><font face="Menlo" class="">t=0 0</font></div><div class=""><font face="Menlo" class="">m=audio 23594 RTP/AVP 103 101</font></div><div class=""><font face="Menlo" class="">a=rtpmap:103 opus/48000/2</font></div><div class=""><font face="Menlo" class="">a=fmtp:103 useinbandfec=1; usedtx=1; maxaveragebitrate=14400; maxplaybackrate=8000</font></div><div class=""><font face="Menlo" class="">a=rtpmap:101 telephone-event/8000</font></div><div class=""><font face="Menlo" class="">a=fmtp:101 0-16</font></div><div class=""><font face="Menlo" class="">a=ptime:20</font></div><div class=""><font face="Menlo" class="">a=sendrecv</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [NOTICE] mod_dptools.c:1312 Channel [<a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a>] has been answered</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] sofia.c:7048 Channel <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a> entering state [completed][200]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_core_media_bug.c:828 Attaching BUG to <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a></font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.357410 [DEBUG] switch_channel.c:3772 (<a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a>) Callstate Change EARLY -> ACTIVE</font></div><div class=""><font face="Menlo" class="">EXECUTE <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a> echo()</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.737463 [DEBUG] sofia.c:7048 Channel <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a> entering state [ready][200]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.837459 [DEBUG] switch_rtp.c:7229 Correct audio ip/port confirmed.</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.837459 [DEBUG] switch_core_io.c:448 Setting BUG Codec opus:116</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.837459 [DEBUG] mod_opus.c:596 Opus encoder: set bitrate based on maxaveragebitrate value found in SDP or local config [14400bps]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.837459 [DEBUG] mod_opus.c:613 Opus encoder: set audio bandwidth to [NARROWBAND] based on maxplaybackrate value found in SDP or local config [8000Hz]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:06.837459 [DEBUG] switch_core_io.c:780 Engaging Read Buffer at 320 bytes vs 15</font></div><div class=""><font face="Menlo" color="#ff2600" class="">[...CREEPY VOICE STARTS HERE AND ENDS WITH THE BELOW MESSAGE...]</font></div><div class=""><font face="Menlo" class="">2017-09-25 22:01:16.017463 [DEBUG] switch_core_media_bug.c:1198 Removing BUG from <a href="mailto:sofia/internalopus/2223@sip.example.com" class="">sofia/internalopus/2223@sip.example.com</a></font></div><div class=""><br class=""></div><div class=""><font face="Menlo" class=""><br class="Apple-interchange-newline">
</font></div>
<br class=""></body></html>