ICE Clarification

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

 



On Mon, Jun 30, 2008 at 8:19 PM, Pedro Gon?alves <pedro.pandre at gmail.com> wrote:
> Hi!
>
> Congratulations on the new release!
>
> I've updated to the latest version but, however, still need some
> clarifications on the ICE processing.
>
> As far as I can understand, this is the ICE process flow:
> 1) Caller sends Initial Offer by calling *pjmedia_ice_create*,
> *pjmedia_transport_media_create* and *pjmedia_transport_encode_sdp*
> 2) Callee receives the Initial Offer and sends the Initial Answer by
> calling the same functions: *pjmedia_ice_create*,
> *pjmedia_transport_media_create* and *pjmedia_transport_encode_sdp*
> 3) Callee starts ICE connectivity checks when *on_media_update()* is
> called, by calling *pjmedia_transport_media_start*
> 4) Caller's *on_media_update()* is called and he also starts ICE
> connectivity checks by calling *pjmedia_transport_media_start*

So far so good.

> 5) When Caller's *on_ice_complete* is called with ice_strans_op ==
> PJ_ICE_STRANS_OP_NEGOTIATION, he sends the Subsequent Offer, by calling
> *pjmedia_endpt_create_sdp*, *pjmedia_transport_encode_sdp*,
> *pjsip_inv_reinvite* and *pjsip_inv_send_msg*

That's also good. But you don't have to send subsequent offer though.
The purpose of sending the subsequent offer is to update the default
address (c= line) with the result of ICE negotiation, if the selected
address turns out to be different than the default address, just in
case a middlebox in the call path needs to know about it. If you're
not worried about this you don't have to send updated offer.

> 6) Callee receives Subsequent Offer on *on_rx_offer()*  and sends
> Subsequent Response by calling *pjmedia_endpt_create_sdp*,
> *pjmedia_transport_encode_sdp* and *pjsip_inv_set_sdp_answer*
>
> Is this process OK?

Looks good.

> Although the Initial Offer, Initial Answer and Subsequent Offer seem OK
> to me (in Subsequent Offer I can see that a=remote-candidates is being
> sent),
> I think that something must be wrong, since Subsequent Answer is being
> sent just like an Initial Offer
>

What do you mean? The subsequent offer should contain only the
selected candidates rather than all candidates, so it's different than
an initial offer. But if you happen to have only one candidate per
component then yes you probably won't see the difference (except the
presence of a=remote-candidate, which should be sent by the
Controlling agent).

Cheers
 Benny



[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