[libnice] example for TURN??

Jack Wang antirazin at gmail.com
Tue Sep 22 05:15:11 PDT 2015


I found someone had a similar experience with me :D

http://markmail.org/message/w7x6bgnnpjc6hmsj#query:+page:1+mid:647krhvnth3eqqgt+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.





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.
>>>
>>> :)
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nice/attachments/20150922/8bdac771/attachment.html>


More information about the nice mailing list