[Nice] Fwd: compatibility with rfc5766-turn-server

Chunfeng Zhang crazypandar at gmail.com
Fri Aug 2 01:12:40 PDT 2013


Hi :
I have a question.
In agent.c, if we use full-mode, why nice always sends RFC3489 bind request
but not RFC5389 bind request?

static void
priv_add_new_candidate_discovery_stun (NiceAgent *agent,
    NiceSocket *socket, NiceAddress server,
    Stream *stream, guint component_id)
{
  CandidateDiscovery *cdisco;

  /* note: no need to check for redundant candidates, as this is
   *       done later on in the process */

  cdisco = g_slice_new0 (CandidateDiscovery);

  cdisco->type = NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE;
  cdisco->nicesock = socket;
  cdisco->server = server;
  cdisco->stream = stream;
  cdisco->component = stream_find_component_by_id (stream, component_id);
  cdisco->agent = agent;
  *stun_agent_init (&cdisco->stun_agent, STUN_ALL_KNOWN_ATTRIBUTES,*
*      STUN_COMPATIBILITY_RFC3489,*
*      (agent->compatibility == NICE_COMPATIBILITY_OC2007 ||*
*       agent->compatibility == NICE_COMPATIBILITY_OC2007R2) ?*
*        STUN_AGENT_USAGE_NO_ALIGNED_ATTRIBUTES : 0);*

  nice_debug ("Agent %p : Adding new srv-rflx candidate discovery %p\n",
      agent, cdisco);

  agent->discovery_list = g_slist_append (agent->discovery_list, cdisco);
  ++agent->discovery_unsched_items;
}



2013/7/31 Chunfeng Zhang <crazypandar at gmail.com>

> Hi Youness:
>
> Thanks for your help.
>
> The "rfc5766-turn-server" not only supports turn but also supports stun
> protocol(RFC 3489, RFC 5389, RFC 5769, RFC 5780).
>
> I digged into this problem today, and here is the log from simple-example
> in libnice.
>
>
> ./simple-example 0 172.21.15.98
> Using stun server '[172.21.15.98]:3478'
> SIGNAL: state changed 1 1 gathering[1]
> waiting for candidate-gathering-done signal...
> STUN demux error: no cookie!
> STUN transaction retransmitted (timeout 398ms).
> STUN demux error: no cookie!
> STUN transaction retransmitted (timeout 797ms).
> STUN demux error: no cookie!
> STUN transaction retransmitted (timeout 1591ms).
> STUN demux error: no cookie!
> SIGNAL candidate gathering done
> Copy this line to remote client:
>
>  I89H y6VOBDzHRITkZ4rhYRsMSx 1,2013266431,172.21.15.118,57086,host
>
> And I captured all the packets , see the attachment. Looking into the
> packets, server replayed all stun requests, but libnice said timeouts for 3
> times.
>
> I will do more to find out the problem.
>
>
>
>
> 2013/7/31 Youness Alaoui <youness.alaoui at collabora.co.uk>
>
>> Hi,
>>
>> I do not believe I ever tried rfc5766-turn-server. I was testing with
>> turnserver.org but libnice should work if the server follows the RFC.
>> I believe Madaro did a lot more testing with TURN than I did and maybe he
>> can
>> provide some help.
>> Without the code you used to setup libnice or logs, there's not much I
>> can help
>> you with.
>> Unfortunately, I do not have time at the moment for libnice maintenance
>> so I
>> can't test it for now.
>> If you figure out what the issue is and it's a bug in libnice, a patch
>> would be
>> welcome.
>>
>> Thanks,
>> Youness.
>>
>> On 07/30/2013 07:35 AM, Chunfeng Zhang wrote:
>> >
>> >
>> > ---------- Forwarded message ----------
>> > From: *Chunfeng Zhang* <crazypandar at gmail.com <mailto:
>> crazypandar at gmail.com>>
>> > Date: 2013/7/30
>> > Subject: compatibility with rfc5766-turn-server
>> > To: nice-owner at lists.freedesktop.org <mailto:
>> nice-owner at lists.freedesktop.org>
>> >
>> >
>> > We use libnice to test with stund and rfc5766-turn-server.
>> >
>> > It worked with stund, but failed with rfc5766-turn-server.
>> >
>> > When we use rfc5766-turn-server as stun server, libnice can not gather
>> the
>> > public candidates.
>> >
>> > And we tested another ICE client project: pjnath with
>> rfc5766-turn-server, it works.
>> >
>> > here is the project address of rfc5766-turn-server.
>> > https://code.google.com/p/rfc5766-turn-server/
>> >
>> > --
>> > Best Regards
>> > Lincoln Zhang
>> >
>> >
>> >
>> > --
>> > Best Regards
>> > Lincoln Zhang
>> >
>> >
>> > _______________________________________________
>> > nice mailing list
>> > nice at lists.freedesktop.org
>> > http://lists.freedesktop.org/mailman/listinfo/nice
>> >
>>
>>
>>
>> _______________________________________________
>> nice mailing list
>> nice at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/nice
>>
>>
>
>
> --
> Best Regards
> Lincoln Zhang
>



-- 
Best Regards
Lincoln Zhang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nice/attachments/20130802/2dda3933/attachment.html>


More information about the nice mailing list