problem with sdp negociator

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

 



Hello all,

I'm currently working with pjsip, in order to exchange information with
m=application SDP header.

Actually, what I need is to do the following :

receive SDP offer with :

 *m=application \r\n a=crypto:values *(easily done with pjsua.)

Generate a new sdp media, with updated value (media2):

 something like that : *m=application \r\n a=crypto:updated_values *(done)

I add this new media in my current sdp, and try to respond to my INVITE (I'm
starting from simpleua.c,).

*    status = pjmedia_endpt_create_sdp( g_med_endpt, rdata->tp_info.pool, 1,
            &g_med_tpinfo.sock_info,
            &local_sdp);
    PJ_ASSERT_RETURN(status == PJ_SUCCESS, PJ_TRUE);
    /* removing all sdp value */
    local_sdp->media_count = 0;
    /* updating local_sdp */
    local_sdp->media_count ++; /* increment media count */
    local_sdp->media[local_sdp->media_count - 1] = media2; /* store media in
sdp's array of media */*


I'm only interested in exchanging media2, so all other medias has been
deleted.
Then, I'm using simple_ua to send my 200 OK :
*
    /*
     * Create invite session, and pass the UAS dialog
     */
    status = pjsip_inv_create_uas( dlg, rdata, local_sdp, 0, &g_inv);
    PJ_ASSERT_RETURN(status == PJ_SUCCESS, PJ_TRUE);

    /*
     * Now create 180 response.
     */
   status = pjsip_inv_initial_answer(g_inv, rdata,
            180,
            NULL, NULL, &tdata);
    PJ_ASSERT_RETURN(status == PJ_SUCCESS, PJ_TRUE);

    /* Send the 180 response. */
    status = pjsip_inv_send_msg(g_inv, tdata);
    PJ_ASSERT_RETURN(status == PJ_SUCCESS, PJ_TRUE);

    /*
     * Now create 200 response.
     */
    status = pjsip_inv_answer( g_inv,
            200, NULL,    /* st_code and st_text */
            NULL,        /* SDP specified now, in order to solve
local/remote confusion */
            &tdata);
    PJ_ASSERT_RETURN(status == PJ_SUCCESS, PJ_TRUE);

    /*
     * Send the 200 response.
     */
    status = pjsip_inv_send_msg(g_inv, tdata);
    PJ_ASSERT_RETURN(status == PJ_SUCCESS, PJ_TRUE);


    return PJ_TRUE;*

But, now, I have a problem :

the body of my 200 OK contain the following media :

 *m=application \r\n a=crypto:values

*instead of* * *m=application \r\n a=crypto:updated_values*

After several search in PJLIB documentation, I found * pj_bool_t
prefer_remote_codec_order;*
Initialized at true, it first seem to be the origin of my problem. But after
some trials, it doesn't have any effect on my response.

I don't want to modify PJLIB, for future upgrade. Can someone help me, and
show me some documentation on how to create our sdp ?

Thanks for your help.
-- 
Pierrick Grasland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20081117/94d39b7f/attachment.html>


[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