ICE Question

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

 



On Tue, Jun 24, 2008 at 6:37 PM, Pedro Gon?alves <pedro.pandre at gmail.com> wrote:
> Hi
>
> I think we're making progress:
>
> Benny Prijono wrote:
>> I think the rest is probably explained in the invite session's offer
>> answer framework in the Dev Guide PDF. But okay here it goes.
>>
>> When sending subsequent offer, once you have the local SDP (either
>> getting the active SDP from SDP negotiator in the invite session, or
>> creating a fresh one from pjmedia_endpt), once again you'd need to
>> call pjmedia_transport_encode_sdp() to let it put transport
>> information in the offer. Then you'd send the SDP with
>> pjsip_inv_update() or pjsip_inv_reinvite().
>>
> OK, I was able to do so, getting the active SDP from the negotiator and
> then calling
> pjmedia_transport_encode_sdp(), pjsip_inv_reinvite() and
> pjsip_inv_send_msg()
>> When you receive subsequent incoming offer, the on_rx_offer() callback
>> of the invite session is called. Again you'd create the local SDP and
>> give it to pjmedia_transport_encode_sdp() along with the remote offer.
>> Then give the SDP to pjsip_inv_set_sdp_answer() to be sent to the
>> response (of the re-INVITE or UPDATE).
>>
> Here I am having a small problem: how do I know if the answer contains
> ICE stuff?
>

Well, why do you need to know? You just need to give whatever SDPs you
have to the media transport and it should "take care of everything".


> Another problem is:
> I can get the local SDP from the negotiator to use in
> pjmedia_transport_encode_sdp. I will have to include the remote SDP from
> the negotiator as well, right?

Yep.

> However, calling pjmedia_sdp_neg_set_local_answer throws an assert error:
>  PJ_ASSERT_RETURN(neg->state == PJMEDIA_SDP_NEG_STATE_REMOTE_OFFER,
>             PJMEDIA_SDPNEG_EINSTATE);
>
> because neg->state is PJMEDIA_SDP_NEG_STATE_DONE.
> Did I miss something?
>

Why would you call set_local_answer() to *get* the remote SDP?

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