[libnice] example for TURN??

Philip Withnall philip at tecnocode.co.uk
Thu Sep 24 15:58:08 PDT 2015


On Tue, 2015-09-22 at 20:15 +0800, Jack Wang wrote:
> I found someone had a similar experience with me :D
> 
> http://markmail.org/message/w7x6bgnnpjc6hmsj#query:+page:1+mid:647krh
> vnth3eqqgt+state:results
> 
> 
> As he did - I comment the line which returns 
> STUN_VALIDATION_UNAUTHORIZED, 
> finally, I got the relay candidate now!
> 
> But I'm stiil confused with this,
> I'll keep tracking and figuring out it.

I believe this is an issue with the configuration of your TURN server
and how its authentication is set up, although it’s been a long time
since I’ve touched any of that code.

Later in that mailing list thread, Klaus points out a configuration
which worked for him:

http://markmail.org/message/w7x6bgnnpjc6hmsj#query:+page:1+mid:7sgk3vrh
vy6eagrv+state:results

Philip

> 2015-09-22 19:39 GMT+08:00 Jack Wang <antirazin at gmail.com>:
> > Well, I think I step forward a little bit more... :P
> > 
> > `conn_check_handle_inbound_stun` only be called whenever agent
> > receives messages,
> > and it will process a response - trying to match the response by
> > checking from various possible objectives one by one.
> > The `trans_found` is marked since it already has been confirmed
> > that  it's a STUN Binding Response.
> > 
> > Then, why TURN reponse is not processed successfully here??
> > 
> > I found the function `stun_agent_validate` returns
> > STUN_VALIDATION_UNAUTHORIZED when receiving Allocate Response.
> > And in the function it showed "stun_debug ("STUN auth error: No
> > message integrity attribute!");"
> > 
> > 
> > Continue getting more information..
> > 
> > 
> > 
> > 2015-09-22 16:34 GMT+08:00 Jack Wang <antirazin at gmail.com>:
> > > I found if the server reflexive candidate is found and the
> > > `trans_found` will be marked.
> > > 
> > > And from the lines below:
> > > 
> > > @ agent/conncheck.c:
> > > 
> > > ---
> > >       if (trans_found != TRUE)
> > >         trans_found = priv_map_reply_to_discovery_request (agent,
> > > &req);
> > > 
> > > /* if `trans_found` is true here, 
> > >  * function `priv_map_reply_to_relay_request` won't  be called so
> > > that the relay candidate can't be add to sdp   */
> > > 
> > >       /* step: let's try to match the response to an existing
> > > turn allocate */
> > >       if (trans_found != TRUE)
> > >         trans_found = priv_map_reply_to_relay_request (agent,
> > > &req);
> > > 
> > > ---
> > > 
> > > I don't understand here,
> > > maybe someone can give me a hand?
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 2015-09-22 10:13 GMT+08:00 Jack Wang <antirazin at gmail.com>:
> > > > There are three example codes , I know.
> > > > However, it seems like there's no implementation of TURN in
> > > > that.
> > > > 
> > > > It seems like the function nice_agent_set_relay_info() must be
> > > > called for setting the TURN server.
> > > > I add this action to sdp-example and the allocation works after
> > > > running the example,
> > > > but the relay candidate still doesn't appear in the sdp ...
> > > > 
> > > > Any tips or quick tutorial about this? 
> > > > Thanks. 
> > > > 
> > > > :)
> > > > 
> > > 
> > 
> _______________________________________________
> nice mailing list
> nice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nice
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/nice/attachments/20150924/db9d512e/attachment.sig>


More information about the nice mailing list