[libnice] setup P2P connection for IP phones

Philip Withnall philip at tecnocode.co.uk
Thu Sep 10 08:37:53 PDT 2015


Hi,

On Thu, 2015-09-10 at 07:33 -0700, Tom Chen wrote:
> So I just need to modify simple_example.c, ie, instead of manually
> copy and paste remote side candidates and credentials, the SIP driver
> saves this information to a global buffer after it received from
> client side SIP response  and let libnice know so libnice can
> continue to do the candidates prioritizing, encoding, offering and
> answering, checking?

Yes, although it’s not a case of ‘just’ — ICE is not entirely trivial
and since you’re building a distributed system, nothing else will be
trivial either.

> Once a working pair for media traffic is finalized and our voip phone
> starts using it, shoud I free/delete all libnice related agents,
> message loops , threads and resources? Do i still need libnice to
> keep port, credentials alive?

You still need libnice to be instantiated, with your NiceAgent alive
and connected to a GMainContext, as all of your traffic will be going
through it, potentially as normal TCP or potentially as TURN, for
example.

Philip

> From: philip at tecnocode.co.uk
> To: chentom60 at hotmail.com; nice at lists.freedesktop.org
> Date: Thu, 10 Sep 2015 14:23:42 +0100
> Subject: Re: [libnice] setup P2P connection for IP phones
> 
> libnice does it itself, since any connection across a candidate pair
> may require a wrapper protocol like TURN.
>  
> I suggest you read up on what ICE does: libnice does exactly what ICE
> is specified to do; little more, little less.
>  
> https://en.wikipedia.org/wiki/Interactive_Connectivity_Establishment
> https://tools.ietf.org/html/rfc5245
>  
> Philip
>  
> On Thu, 2015-09-10 at 05:32 -0700, tom chen wrote:
> > Philip,
> > 
> > Thank you! How about checking of each candidate? does libnice do
> all
> > by it 
> > itself or require someone else (like SIP driver) to test each
> > prioritized 
> > candidate can connect or not?
> > 
> > Tom
> > --------------------------------------------------
> > From: "Philip Withnall" <philip at tecnocode.co.uk>
> > Sent: Thursday, September 10, 2015 5:22 AM
> > To: "tom chen" <chentom60 at hotmail.com>; <nice at lists.freedesktop.org
> >
> > Subject: Re: [libnice] setup P2P connection for IP phones
> > 
> > > _______________________________________________
> > > 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
-------------- 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/20150910/498be006/attachment-0001.sig>


More information about the nice mailing list