ICE Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pedro,


On Thu, Jun 19, 2008 at 3:54 PM, Pedro Gon?alves <pedro.pandre at gmail.com> wrote:
> Hi all
>
> According to Benny, these are the procedures needed to uce ICE in a call:
>
> - Initially call pjmedia_ice_create() with the appropriate
> pj_ice_strans_cfg. The initialization will complete asynchronously and
> the ICE media transport callback will be called when initialization
> completes (STUN mapping is found, TURN allocation is done, etc.).
>
> - When creating an offer, call pjmedia_transport_media_create() with
> local SDP (and NULL as rem_sdp). The ICE media transport will add the
> relevant ICE attributes in the local SDP. Then give the local SDP to
> the invite session.
>
> - When creating an answer, also call pjmedia_transport_media_create(),
> but this time give both local and remote SDP to it. The ICE media
> transport will once again modify the local SDP and add ICE attributes
> to local SDP, if ICE attributes are indeed found in remote offer. If
> not, then it won't add ICE attributes, and ICE will not get activated.
>

The part to create offer/answer has changed now, and one should use
pjmedia_transport_encode_sdp() instead. Please see this for more
information: http://www.pjsip.org/pjmedia/docs/html/group__PJMEDIA__TRANSPORT.htm#creat_oa

> - When you have both local and remote SDP, and when media is okay to
> be created, call pjmedia_transport_media_start(), once again giving it
> both local and remote SDP. ICE negotiation will start now and ICE
> media transport callback will be called when ICE negotiation
> completes.
>
>
> So far, I've been able to perform the following actions:
> -When a call is to be started (in caller), I use *pjmedia_ice_create()*
> and *pjmedia_transport_media_create()*. [INVITE is sent to callee with
> caller's candidates]
> -When answering the call, in callee I also use *pjmedia_ice_create()*
> and *pjmedia_transport_media_create()* [INVITE 200 OK is is sent to
> caller with callee's candidates]

These have now been changed, please see above.

> -The callee then uses *pjmedia_transport_media_start()* [STUN
> connectivity checks start]
>
> I understand that now I must receive the 200 OK in the caller and also
> call *pjmedia_transport_media_start()*, in order for the ICE connectivy
> checks be made in both directions.
>

Yes.

> However, how will the subsequent offer and answer be exchanged?

It's the same, use pjmedia_transport_encode_sdp() to encode subsequent
SDP offer or answer.

> I realize that I must do something, because at the moment, when the
> caller receives the INVITE 200 OK it sends an ACK, making the call to
> start with the default IP addresses/Ports (the ones in lines c= and m=).
> What do I have to do in order for the subsequent offer / answer be
> exchanged?
>

The doc above should provide some info on how this can be done. You
can also look at PJSUA-LIB source, the relevant files will be
pjsua_call.c and pjsua_media.c.

Cheers
 Benny


> Cheers
> Pedro Gon?alves
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux