Is it possible to get pjmedia_sdp_session from pjsip_tx_data?

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

 



On Fri, Jun 13, 2008 at 7:25 PM, Pedro Gon?alves <pedro.pandre at gmail.com> wrote:
> Hi all
>
> Is it possible to get pjmedia_sdp_session from pjsip_tx_data?

Normally no. The tx_data->msg->body structure is pretty much
undefined, and just about the only thing we can do with it is to call
clone_data() and print_body() on it.

But.. if you must, normally tx_data->msg->body->data contains the
pjmedia_sdp_session for messages belonging to invite session, as long
as the body->content_type is "application/sdp" (see create_sdp_body()
function in sip_inv.c). But this is not something that is guaranteed
by the API though, so it may change in the future.

> Basically, I need to modify an 200 OK Invite to make it include
> ICE-candidates (btw, is this ok?).
>

Are you creating your own ICE library? We have ICE in pjnath, and
integrated to pjsip in pjsua-lib. The way we do it is to create ICE
media transport, and the new media transport interface allows it to
modify the offer/answer via the media_create() and media_start()
callback (see pjmedia_transport_op in pjmedia/transport.h).

With pjsua, all you need to do to enable ICE is to add --use-ice in
command line argument, and that's it. ;-)

Cheers
 Benny


> Cheers
> Pedro Gon?alves



[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