<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi - <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We are using libNice for our WebRTC Gateway. We just added support for ICE restart and running into issue with WebRTC enabled browsers like Chrome.  In the problem case the remote peer (Chrome) is the one initiating the ICE restart.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">After we call <b>nice_agent_restart()</b>,  and send the answer SDP to Chrome, we start ICE by setting remote credentials and candidates. And before Chrome has received and processed the SDP, the STUN binding requests are sent by libNice
 are received by Chrome and gets rejected, as shown in chrome debug log below (due to ufrag/pwd change):<o:p></o:p></p>
<p class="MsoNormal">[6948:12472:0509/173558:VERBOSE1:port.cc(1010)] Jingle:Conn[audio:HCmebYA2:1:1:local:udp:135.17.178.54:52284->:1:0:local:udp:135.17.178.54:36000|C--W|-]: Received STUN request with bad remote username oIYa<o:p></o:p></p>
<p class="MsoNormal">[6948:12472:0509/173558:VERBOSE3:port.cc(690)] Jingle:Port[audio:1:1::Net[{64B2D6F7-CCC1-4665-AB07-D9F552B5C4B8}:135.17.178.54/32]]: Sending STUN binding error: reason=Unauthorized to 135.17.178.54:36000<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">But this problem goes away after the SDP is processed by Chrome, and there are no more such errors.  However, the STUN binding requests are rejected now by libnice, as reported in Chrome debug log, as shown below.<o:p></o:p></p>
<p class="MsoNormal">[6948:12472:0509/173558:VERBOSE1:port.cc(422)] Jingle:Port[audio:1:1::Net[{64B2D6F7-CCC1-4665-AB07-D9F552B5C4B8}:135.17.178.54/32]]: Received STUN binding error: class=4 number=1 reason='Unauthorized' from 135.17.178.54:36000<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This problem, however, does not recover, and we receive the  NICE_COMPONENT_STATE_FAILED error from libNice within 50ms. We tried starting ICE again by setting remote credentials and candidates again, then the nice agent goes to  NICE_COMPONENT_STATE_CONNECTED
 state, but does not go to ready state.  On the Chrome side, it keeps complaining about receiving STUN binding error. 
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The version of libNice we are using (on Windows) is 0.1.3.  Do you have any idea what is happening?  For instance, is it possible that the nice agent goes into a bad/failed state due to the binding errors received from Chrome (only for
 a short time, and definitely less than 1 second)?  Is there anything that we could do something to avoid this issue?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thx<o:p></o:p></p>
<p class="MsoNormal">RCC<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>