hi I found point where sdp message is creating.. is it in endpoint.c source file and method "pjmedia_endpt_create_sdp" here is code which add "sendrecv" attribute to SDP message: /* Add sendrecv attribute. */ attr = PJ_POOL_ZALLOC_T(pool, pjmedia_sdp_attr); attr->name = STR_SENDRECV; m->attr[m->attr_count++] = attr; as you see attribute "sendrecv" is still added. No condition if add "sendonly", recvonly" or "sendrecv" attribute should be added :( Maybe exist some callback which can overwrite? But i can't found anything... ..maybe call pjsua_call_set_hold() will be only solution :) On Tuesday 27 April 2010 01:32:50 pm Peter Lukac wrote: > hi > > thanks for reply.. this trick is little hack :) and i preffer clean > sollutions...it is posible with struct "pjsua_msg_data"? or some callback? > or some another way? ( use pjsua API is not necessary but welcome :) ) > > I want control rtp stream all directions (sendonly,recvonly and sendrecv). > > thanks > > > Hi Peter, > > > > On pjsua level, this may be easily done using this trick: > > 1. normal make call, pjsua_call_make_call() > > 2. once the call gets confirmed, put the call on-hold, > > pjsua_call_set_hold(), call hold will put 'sendonly' direction > > attribute in the sdp. > > > > BR, > > nanang > > > > On Mon, Apr 26, 2010 at 7:23 PM, Peter Lukac <p.lukac at emtest.sk> wrote: > > > hello again > > > > > > How can i add/modify DPS protocol in SIP message when i creating call? > > > > > > in pjsua_call_make_call method is parameter msg_data.. > > > > > > > > > pj_status_t pjsua_call_make_call (pjsua_acc_id acc_id, > > > const pj_str_t * dst_uri, > > > unsigned options, > > > void * user_data, > > > const pjsua_msg_data * msg_data, > > > pjsua_call_id * p_call_id > > > ) > > > and i suppose this parameter i have to adjust. But how? > > > when i try: > > > > > > pjsua_msg_data msg_data; > > > > > > pjsua_msg_data_init( &msg_data ); > > > > > > pj_str_t hname = pj_str("application/sdp"); > > > pj_str_t hvalue = pj_str("a=sendonly"); > > > > > > msg_data.content_type = hname; > > > msg_data.msg_body = hvalue; > > > > > > pjsua_call_make_call( acc_id, &pj_uri, 0, NULL, &msg_data, &call_id); > > > > > > in SIP message is still: > > > > > > "a=sendrecv" > > > > > > struct "pjsua_msg_data" have another member "hdr_list" of type > > > "pjsip_hdr" Do i have to adjust this member too?..if yes how? > > > > > > > > > thanks > > > > > > > > > > > > > > > _______________________________________________ > > > 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 > > > > _______________________________________________ > > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20100427/06c83dcc/attachment.html>