<div dir="ltr"><div><div><div>Hello Philip,<br><br><br></div>I have to print debug logs in syslog,<br></div>can you teach me how to achieve this?<br><br></div><div>In a normal way, the state flow should be gathering -> connecting -> connected -> ready,<br></div><div>sometimes may be gathering -> connecting -> failed -> connected -> ready,<br></div><div>however, it also can be  gathering -> connecting -> failed, <br></div><div>which will never be changed to connected state :(<br><br></div><div>I use the callback like the one in sample code (ex: sdp-example.c),<br></div><div>when the state changed,<br></div><div>libnice will signal the callback so that I can know the state in my application.<br></div><div><br></div><div>I used version of 0.1.13,<br></div><div>and I will try the master later to see what happened . <br><br></div><div>I'm also wondering if the bug is related to network environment.<br></div><div>If the two ICE endpoints were at the same LAN, the connectivity checks never fails. <br>(well.... actually I can't promise this is always right, the reason why I suppose this because I called over 30 times and it's always OK)<br></div><div>But it failed more frequent (below 10 times or less) when two endpoints were at different network areas.<br></div><div><br></div><div>Btw, I use an array , which is always reused in next call , to store ICE agents for several media channels,<br></div><div>so I didn't clear the agent with the g_object_unref in the end like in examples since I will get an assertion in nice_agent_new when I make a new call,<br></div><div>I just set the agent to NULL when call hangs up.<br><br></div><div>Is this a proper method? or may cause some side effects?<br><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-01-05 6:05 GMT+08:00 Philip Withnall <span dir="ltr"><<a href="mailto:philip@tecnocode.co.uk" target="_blank">philip@tecnocode.co.uk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Can you please provide a debug log from libnice for this? It’s hard to<br>
work out what the problem is otherwise.<br>
<br>
Does the component state change to NICE_COMPONENT_STATE_FAILED? If you<br>
wait, does it later change to NICE_COMPONENT_STATE_READY or<br>
*_CONNECTED? What are you waiting for to know when the connection is<br>
ready?<br>
<br>
What version of libnice is this with? 0.1.13, or master? Can you try<br>
with master?<br>
<br>
Philip<br>
<div><div class="h5"><br>
On Thu, 2015-12-24 at 21:40 +0800, Jack Wang wrote:<br>
> I also test by using the random ports , which is used originally in<br>
> libnice,<br>
> and found it also fails sometimes, <br>
> however,  it still can work in some later calls.<br>
><br>
> Keep tracking and testing....:P<br>
><br>
> 2015-12-24 21:20 GMT+08:00 Jack Wang <<a href="mailto:antirazin@gmail.com">antirazin@gmail.com</a>>:<br>
> > Hi, everyone<br>
> ><br>
> > For several media channels (ex: audio,video etc.),<br>
> > I create ICE agents for each of them,<br>
> > and each channel I used a fixed port which is a fixed RTP port.<br>
> ><br>
> > Then after I did a SIP call to exchange the ICE SDP with the<br>
> > callee,<br>
> > I found the one who sent the offer often failed on negotiation on<br>
> > some channels (not the same ones every time), <br>
> > while the answer one is always OK.<br>
> > And if failed on the first time, it will always fail in the<br>
> > following calls.<br>
> ><br>
> > The Offer one is behind a symmetric NAT, and the Answer one is on<br>
> > WAN.<br>
> > I trace the log and found the failed(for negotiation) ones always<br>
> > discover the prflx candidate very late, and cannot be READY state<br>
> > in the end.<br>
> ><br>
> > I cannot figure out why this happens,<br>
> > does it is related to the NAT policy for port forwarding??<br>
> ><br>
> ><br>
> > Thanks in advance :)<br>
> ><br>
> ><br>
> ><br>
</div></div>> _______________________________________________<br>
> nice mailing list<br>
> <a href="mailto:nice@lists.freedesktop.org">nice@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/nice" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nice</a><br>_______________________________________________<br>
nice mailing list<br>
<a href="mailto:nice@lists.freedesktop.org">nice@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/nice" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nice</a><br>
<br></blockquote></div><br></div>