<div dir="ltr">Hi,<div>I&#39;ve been working on Freeswitch and WebRTC applications for quite some time. I was working on Freeswitch version <b>(git c811580 2013-09-06 00:55:50Z)</b> and the voice quality was always good with that version.</div>
<div>Today I upgraded to the latest master version <b>(git f9f3699 2014-03-07 04:32:56Z 64bit)</b> and suddenly the sound that goes out of the WebRTC client is always distorted/choppy. I also tried with few versions which got committed in February but they also had choppy sound.</div>
<div><br></div><div>The call scenario is as follows:</div><div>Normal SIP Endpoint calls a WebRTC endpoint. I have enforced PCMU for the leg going towards WebRTC as I had read about some problems using <span id="92480cfa-df87-454a-a590-1902034f570f" class="GINGER_SOFTWARE_mark">OPUS codec</span> with <span id="27202c4b-4d66-4a20-8195-6646db7099e0" class="GINGER_SOFTWARE_mark">freeswitch</span> here <a href="https://code.google.com/p/webrtc/issues/detail?id=2768">https://code.google.com/p/webrtc/issues/detail?id=2768</a>. </div>
<div>My outgoing dial-string looks as below:</div><div>{sip_invite_domain=${context},absolute_codec_string=PCMU,media_webrtc=true}sofia/<a href="http://abc.com/${sip_req_uri}">abc.com/${sip_req_uri}</a><br></div><div><br>
</div><div>Sofia parameters are as follows:</div><div><div>&lt;<span id="b9fde0a9-d834-47fd-8c0e-2d1131bfeaac" class="GINGER_SOFTWARE_mark">param</span> name=&quot;sip-trace&quot; value=&quot;off&quot;/&gt;</div><div>&lt;<span id="577cd8ef-5c4f-4f4d-b1e5-4ffdbbd61b4a" class="GINGER_SOFTWARE_mark">param</span> name=&quot;log-<span id="ef2670e0-d41b-4214-978b-1338deada3a4" class="GINGER_SOFTWARE_mark">auth</span>-failures&quot; value=&quot;true&quot;/&gt;</div>
<div>&lt;param name=&quot;sip-ip&quot; value=&quot;203.XXX.123.57&quot;/&gt;</div><div>&lt;param name=&quot;rtp-ip&quot; value=&quot;203.XXX.123.57&quot;/&gt;</div><div>&lt;<span id="12f77d4a-d731-4299-8cbc-8d1ccbfa00fe" class="GINGER_SOFTWARE_mark">param</span> name=&quot;<span id="523ddcca-e4e7-4e24-805c-cf70ac2a549c" class="GINGER_SOFTWARE_mark">sip</span>-port&quot; value=&quot;5000&quot;/&gt;</div>
<div>&lt;<span id="ccb5bf7b-36d7-4a01-bbc9-b394f151c627" class="GINGER_SOFTWARE_mark">param</span> name=&quot;context&quot; value=&quot;<a href="http://abc.com">abc.com</a>&quot;/&gt;          </div><div>&lt;<span id="ddcfcfc0-4249-49ae-bca1-bb36ce7dd867" class="GINGER_SOFTWARE_mark">param</span> name=&quot;<span id="fe67fda9-696a-4964-9ae4-813708b65441" class="GINGER_SOFTWARE_mark">dtmf</span>-type&quot; value=&quot;rfc2833&quot;/&gt;</div>
<div>&lt;<span id="eff2b023-e4fd-4296-a799-5199b2dc3749" class="GINGER_SOFTWARE_mark">param</span> name=&quot;rfc2833-<span id="24aca49c-e3d9-4871-b725-260026f7ce5d" class="GINGER_SOFTWARE_mark">pt</span>&quot; value=&quot;101&quot;/&gt;</div>
<div>&lt;<span id="1ff40d85-6aac-42a8-91c0-8e65bcb699b2" class="GINGER_SOFTWARE_mark">param</span> name=&quot;<span id="0ebef6a9-c4e1-4089-995d-900179ae063b" class="GINGER_SOFTWARE_mark">dtmf</span>-duration&quot; value=&quot;2000&quot;/&gt;</div>
<div>&lt;<span id="45ed5842-07d8-4f90-93b5-e960dfa1664f" class="GINGER_SOFTWARE_mark">param</span> name=&quot;caller-id-in-from&quot; value=&quot;true&quot;/&gt;</div><div>&lt;<span id="d043e70c-a8d6-4900-acae-13379da887ce" class="GINGER_SOFTWARE_mark">param</span> name=&quot;caller-id-type&quot; value=&quot;<span id="aa7acb6f-b406-409a-b906-ba6185f218f2" class="GINGER_SOFTWARE_mark">pid</span>&quot;/&gt;       </div>
<div>&lt;param name=&quot;suppress-cng&quot; value=&quot;true&quot;/&gt;</div><div>&lt;param name=&quot;inbound-codec-prefs&quot; value=&quot;OPUS,G722,PCMU,PCMA&quot;/&gt;</div><div>&lt;<span id="6fd3f175-c2b7-4a5b-8240-e61a097dd8a0" class="GINGER_SOFTWARE_mark">param</span> name=&quot;outbound-codec-<span id="9c1bece8-3830-4c7b-8607-06c3c792933b" class="GINGER_SOFTWARE_mark">prefs</span>&quot; value=&quot;PCMU<span id="6b554e88-9c0b-43f9-9b06-c699cf6564a1" class="GINGER_SOFTWARE_mark">,</span>PCMA&quot;/&gt;</div>
<div>&lt;<span id="d6b769d6-a8e3-42d1-a973-2bdb406830c4" class="GINGER_SOFTWARE_mark">param</span> name=&quot;<span id="56dbf9f4-ae27-4efd-bb43-0126abf3820c" class="GINGER_SOFTWARE_mark">rtp</span>-timeout-<span id="8a9ad70d-0990-4c50-b596-9f2e876ab6fd" class="GINGER_SOFTWARE_mark">sec</span>&quot; value=&quot;300&quot;/&gt;</div>
<div>&lt;<span id="147c467d-47ce-45d3-97de-6037d9261f4d" class="GINGER_SOFTWARE_mark">param</span> name=&quot;<span id="b478f0f8-bb9b-43cc-bede-d547a85aa0ce" class="GINGER_SOFTWARE_mark">rtp</span>-hold-timeout-<span id="6b7a0c8d-257c-4b98-8b1f-64639236e21c" class="GINGER_SOFTWARE_mark">sec</span>&quot; value=&quot;300&quot;/&gt;</div>
<div>&lt;<span id="d383e921-852a-455f-bc55-09786abba5a9" class="GINGER_SOFTWARE_mark">param</span> name=&quot;outbound-use-<span id="838878ed-58f5-4cca-a856-3c48948ae783" class="GINGER_SOFTWARE_mark">uuid</span>-as-<span id="f98c4ea8-9d2d-4479-a47b-2d762a21bc86" class="GINGER_SOFTWARE_mark">callid</span>&quot; value=&quot;true&quot;/&gt;</div>
</div><div><br></div><div>I generally encountered such distorted quality with WebRTC when CN was advertised in SDP going towards JS-SIP. This is the reason I added <span id="e8408148-dd1f-499d-9f36-a6aa182eedf6" class="GINGER_SOFTWARE_mark">suppress</span>-<span id="99d8af17-952d-4272-acb6-d042a3392684" class="GINGER_SOFTWARE_mark">sng</span> as true in the profile. My outgoing SDP is as follows:</div>
<div><br></div><div><div>v=0.</div><div>o=FreeSWITCH 1394161698 1394161699 IN IP4 203.XXX.123.57.</div><div>s=FreeSWITCH.</div><div>c=IN IP4 203.XXX.123.57.</div><div>t=0 0.</div><div>a=msid-semantic: WMS lBMrtzG9kpA0bTRb2XqCeNEeEVGsBGsM.</div>
<div>m=audio 17482 RTP/SAVPF 0 101.</div><div>a=rtpmap<span id="c5debc2c-697f-473c-a783-6f48cb3db768" class="GINGER_SOFTWARE_mark">:</span>101 telephone-event/8000.</div><div>a=fingerprint:sha-256 A2:DD:5A:FE:03:98:BB:59:A5:67:EE:D2:B1:DF:B9:E7:84:7C:D0:1D:C2:68:39:EF:60:E6:5B:48:E9:72:CB:5B.</div>
<div>a=rtcp-<span id="cbb4527c-9d45-4f50-a0d0-1e6dd3951574" class="GINGER_SOFTWARE_mark">mux</span>.</div><div>a=rtcp<span id="f60908f6-8b02-47b0-910a-befab8e64fe9" class="GINGER_SOFTWARE_mark">:</span>17482 IN IP4 203.XXX.123.57.</div>
<div>a=ssrc<span id="3c8bdd3e-ecd5-4d04-b77b-7be2a6a86a3f" class="GINGER_SOFTWARE_mark">:</span>2871096156 <span id="b26ff2af-3b89-4b53-b77b-ac31ef3c446e" class="GINGER_SOFTWARE_mark">cname</span><span id="828fe1fa-507d-4511-ba71-2bf0b7008abf" class="GINGER_SOFTWARE_mark">:</span>744rtBqDQQuSAcTt.</div>
<div>a=ssrc<span id="9cd22609-7dac-483f-a1c7-6313d871c795" class="GINGER_SOFTWARE_mark">:</span>2871096156 <span id="ba9d8cc2-2094-4942-9425-a4bbd308ff6d" class="GINGER_SOFTWARE_mark">msid</span><span id="5745416f-89f7-4db1-9b6a-77b2fc1fd199" class="GINGER_SOFTWARE_mark">:</span>lBMrtzG9kpA0bTRb2XqCeNEeEVGsBGsM a0.</div>
<div>a=ssrc<span id="fee01c4d-df9e-4cee-90e8-270e3204d9c6" class="GINGER_SOFTWARE_mark">:</span>2871096156 <span id="b985db90-8a81-46cf-9586-8e1e3d0f67b3" class="GINGER_SOFTWARE_mark">mslabel</span><span id="5bddc3ef-096b-45aa-ae50-cbab02a108a9" class="GINGER_SOFTWARE_mark">:</span>lBMrtzG9kpA0bTRb2XqCeNEeEVGsBGsM.</div>
<div>a=ssrc<span id="a6ee56d1-b70d-41d1-a670-5dfbb44f6dcf" class="GINGER_SOFTWARE_mark">:</span>2871096156 label<span id="5cdc98c1-46d6-4521-878e-9bcad65f7d8f" class="GINGER_SOFTWARE_mark">:</span>lBMrtzG9kpA0bTRb2XqCeNEeEVGsBGsMa0.</div>
<div>a=ice-<span id="499f7d44-be68-41b7-95b3-d1683195796c" class="GINGER_SOFTWARE_mark">ufrag</span><span id="59ed1679-0821-45b2-8254-3096460746f7" class="GINGER_SOFTWARE_mark">:</span>09V4Nq9hcFADbSg9.</div><div>a=ice-<span id="4263c4ec-5b85-4a84-bc94-cd4ccbcf146d" class="GINGER_SOFTWARE_mark">pwd</span><span id="fabddf80-7ed7-4e68-a227-f11c87613d8a" class="GINGER_SOFTWARE_mark">:</span>Maq6BHzioU0OWK7M.</div>
<div>a=candidate<span id="89f5bbbe-ee6b-4361-9a64-4276a359f548" class="GINGER_SOFTWARE_mark">:</span>5046006301 1 <span id="c408e87e-026a-48ff-9fe0-20114fc114c5" class="GINGER_SOFTWARE_mark">udp</span> 659136 203.XXX.123.57 17482 <span id="7bc0e228-3cd7-4cd2-b947-28d316e47ce9" class="GINGER_SOFTWARE_mark">typ</span> host <span id="859ec7be-bd21-400b-a7fe-b646994b1c69" class="GINGER_SOFTWARE_mark">generation</span> 0.</div>
<div>a=candidate<span id="25aecd66-1294-4228-8685-bd9e13560680" class="GINGER_SOFTWARE_mark">:</span>5046006301 2 <span id="b01bae25-deb3-4339-98fb-0f6cfb640a11" class="GINGER_SOFTWARE_mark">udp</span> 659136 203.XXX.123.57 17482 <span id="c38a4fd8-6f08-47fc-87d0-791a0090d1b8" class="GINGER_SOFTWARE_mark">typ</span> host <span id="c65eda04-aa19-4a2b-b068-5d9bcc97b19d" class="GINGER_SOFTWARE_mark">generation</span> 0.</div>
<div>a=crypto<span id="a0b1acad-ba35-4698-afa5-11867b90e46b" class="GINGER_SOFTWARE_mark">:</span>1 AES_CM_128_HMAC_SHA1_80 inline<span id="c40d5dc4-257c-4d55-9549-af1bde87b3ce" class="GINGER_SOFTWARE_mark">:</span>sV6KRgjWRIajcY4QqbNBQeUxxjh90KbdtfAwdmo2.</div>
<div>a=silenceSupp<span id="fe11d531-4e52-4af4-8919-edcaedb17d9c" class="GINGER_SOFTWARE_mark">:</span>off<span id="949fe2f4-d0ec-4d23-a1bf-297d11069607" class="GINGER_SOFTWARE_mark"> - - - -.</span></div><div>a=ptime<span id="dd969e51-07ca-4363-bae1-7cd06f9164c1" class="GINGER_SOFTWARE_mark">:</span>20.</div>
</div><div><br></div><div>Is there anything that I can add or remove to fix this quality problem or any new channel variable related to <span id="ce9beb43-dd61-40ff-ba35-ff74540a5573" class="GINGER_SOFTWARE_mark">webrtc</span> that has been added but not documented anywhere. The sound <span id="c0201339-6bc1-49fd-baa7-16f62743072b" class="GINGER_SOFTWARE_mark">going</span> towards JS-SIP sounds <span id="4640249c-ddff-4fa2-8062-1115f66a23e0" class="GINGER_SOFTWARE_mark">acceptable but</span> the sound going outside JS-SIP is distorted. Any help here will be appreciated as this quality problem doesn&#39;t allow me to move to new versions and stay updated<span id="66771858-9e26-498c-88be-fa94022cd0dd" class="GINGER_SOFTWARE_mark"> !!</span></div>
<div><br></div><div><br></div><div>Thanks,</div><div><br></div><div>--- Jayesh</div>























</div>