yeah its weird !! do you have any clue how to change the from message currently From: <sip:6002@xxxxxxxxxxxxxxx>;tag=EdxrfdLxQcyw.2EQNguOZpyyZNmnonAZ i want it to look like this From: <sip:6002@xxxxxxxxxxxxxxx>;tag=EdxrfdLxQcyw.2EQNguOZpyyZNmnonAZ ?;textid=1;textto=4; ? ... i dunno why its hard with pjsip in Java its easy to do that thank you alot for assistance ,really apreciate that :) ----------------------- Eng. Moath Othman Computer Engineer DDAD For Information Technology Amman-Jordan +962-788279184 ------------------------ ________________________________ From: Sandeep Karanth <sandeepk.kdp@xxxxxxxxx> To: moath othman <m_o_3_1989 at yahoo.com> Sent: Thursday, December 27, 2012 10:27 AM Subject: Re: Setting Custom Registration Header Umm...Not sure then why isn't it working! On Thu, Dec 27, 2012 at 1:23 PM, moath othman <m_o_3_1989 at yahoo.com> wrote: thank you > >i wrote this code > >?pjsua_acc_config tempAcc_cfg=acc_cfg; >???? tempAcc_cfg.id=pj_str("lola"); >?? pjsua_acc_modify(acc_id, &tempAcc_cfg); > >??? status = pjsua_call_make_call(acc_id, &pj_uri, 0, NULL, NULL, call_id); > >nothing have changed :( > > > > >? >----------------------- >Eng. Moath Othman >Computer Engineer >DDAD For Information Technology >Amman-Jordan >+962-788279184 >------------------------ > > >________________________________ > From: Sandeep Karanth <sandeepk.kdp@xxxxxxxxx> >To: moath othman <m_o_3_1989 at yahoo.com> >Sent: Thursday, December 13, 2012 12:01 PM > >Subject: Re: Setting Custom Registration Header > > > >Okay.If you go through the definition of ?pjsua_call_make_call() in pjsua_call.c,?by default pjsip will create a "Contact:" header for INVITE automatically based on the Contact header set for the account. Now to change the contact header on per call basis one way I can think of is 1)Copy the account config into temporary vaiable >2) Create a new config with the ID that you want and then use pjsua_acc_modify >3) Call pjsua_make_call().It will now use the new contact header while making call >4)After the above API returns call the pjsua_acc_modify again,this time with the old value stored in temporary variable > > > > >This is one of the hacks I can think of now. Also your requirement is basically to modify a header added by the stack,not really to add another custom header.If it was adding a new custom header the method said in one of the earlier mails should help I guess. When you tried that method did't you see 2 Contact headers in the msg? Because I suppose you were adding a new Contact header yourself in addition to what the stack automatically added for you > > >On Thu, Dec 13, 2012 at 2:36 PM, moath othman <m_o_3_1989 at yahoo.com> wrote: > >exactly ,, >> >>? >>----------------------- >>Eng. Moath Othman >>? >>------------------------ >> >> >>________________________________ >> From: Sandeep Karanth <sandeepk.kdp@xxxxxxxxx> >>To: moath othman <m_o_3_1989 at yahoo.com> >>Sent: Thursday, December 13, 2012 10:16 AM >> >>Subject: Re: Setting Custom Registration Header >> >> >> >>Actually I still don't have a clear understanding of your problem requirement. So you want to change the "Contact:" header on per call basis rather than for the account on the whole? >> >> >>On Thu, Dec 13, 2012 at 1:33 PM, moath othman <m_o_3_1989 at yahoo.com> wrote: >> >>thank you ,, but I want that on each call from the same actual contact ,, >>>i asked a question here before .. >>>am not using it for a phone application !!.. >>>I want to send some parameters to the server within the header , that may or not change on each call(user choose that) .. >>>i tried the adding header method as i posted before (which worked but not always) >>>i noticed the contactname(Contact: "contactname" <sip:6260 at xxx.xxx.xxx.xx:5060;ob>) always reach so if there is a way to change it I would be appreciate .. >>> >>>I tried your suggestion >>> >>>?acc_cfg.id=pj_str("lola"); >>> >>>?? ? ? status = pjsua_acc_add(&acc_cfg, PJ_TRUE, NULL); >>> >>>??? ??? status = pjsua_call_make_call(acc_id, &pj_uri, 0, NULL, &msg_data, call_id); >>>but looks that this code is not supposed to be here ...and just used before making the connection rather than the dial !! >>> >>> >>>thank you alot >>> >>> >>> >>> >>> >>>? >>>----------------------- >>>Eng. Moath Othman >>>Computer Engineer >>>DDAD For Information Technology >>>Amman-Jordan >>>+962-788279184 >>>------------------------ >>> >>> >>>________________________________ >>> From: Sandeep Karanth <sandeepk.kdp@xxxxxxxxx> >>>To: moath othman <m_o_3_1989 at yahoo.com> >>>Cc: pjsip list <pjsip at lists.pjsip.org> >>>Sent: Wednesday, December 12, 2012 4:09 PM >>> >>>Subject: Re: Setting Custom Registration Header >>> >>> >>> >>>If the goal is to change the display name for the account(as I understand it!) why don't you do the same while adding the account itself in?acc_cfg.id field before calling? >>>status = pjsua_acc_add(&acc_cfg, PJ_TRUE, NULL); >>> >>> >>> >>>On Wed, Dec 12, 2012 at 6:59 PM, moath othman <m_o_3_1989 at yahoo.com> wrote: >>> >>>do you have any other methods to do that ,,, >>>>if i could change the contact name in header , it will be solved for me ,, >>>>can you guide me to the way to change the contact Field !! >>>> >>>> >>>>it looks like that? >>>> >>>> >>>>Contact: "myName" <sip:6260 at xxx.xxx.xxx.xx:5060;ob> >>>> >>>>I could set the Contact name (my Name) >>>> >>>>in the registration phase >>>> >>>> >>>>i want to be able to change every time I make a call ... >>>>? >>>>thank you alot >>>> >>>>----------------------- >>>>Eng. Moath Othman >>>>Computer Engineer >>>>DDAD For Information Technology >>>>Amman-Jordan >>>>+962-788279184 >>>>------------------------ >>>> >>>> >>>>________________________________ >>>> From: Sandeep Karanth <sandeepk.kdp@xxxxxxxxx> >>>>To: moath othman <m_o_3_1989 at yahoo.com>; pjsip list <pjsip at lists.pjsip.org> >>>>Sent: Wednesday, December 12, 2012 12:50 PM >>>> >>>>Subject: Re: Setting Custom Registration Header >>>> >>>> >>>> >>>>Looks alright to me! Not sure why are you facing issues? >>>> >>>> >>>>On Wed, Dec 12, 2012 at 3:50 PM, moath othman <m_o_3_1989 at yahoo.com> wrote: >>>> >>>>Hi spencer and sandeep >>>>> >>>>>am also trying to add custom headers >>>>> >>>>>i am using this method >>>>> >>>>>???? pj_str_t hname = pj_str(headerx); >>>>>? ?? pj_str_t hvalue = pj_str(header); >>>>>??? pjsua_msg_data_init(&msg_data); >>>>>??? pjsip_generic_string_hdr_init2(&my_hdr, &hname, &hvalue); >>>>>??? pj_list_push_back(&msg_data.hdr_list, &my_hdr); >>>>>??? >>>>>??? status = pjsua_call_make_call(acc_id, &pj_uri, 0, NULL, &msg_data, call_id); >>>>> >>>>>it works but not always !! Its strange !! >>>>>the server is not always catch the custom header 20% of trials not work !! >>>>> >>>>>is there a better way to do add the custom header ?!! >>>>> >>>>> >>>>> >>>>> >>>>>? >>>>>----------------------- >>>>>Eng. Moath Othman >>>>> >>>>>+962-796988538 >>>>>------------------------ >>>>> >>>>> >>>>>________________________________ >>>>> From: Spencer MacDonald <spencer.macdonald.other@xxxxxxxxx> >>>>>To: pjsip list <pjsip at lists.pjsip.org> >>>>>Sent: Tuesday, December 11, 2012 4:49 PM >>>>>Subject: Re: Setting Custom Registration Header >>>>> >>>>> >>>>> >>>>>Hi Sandeep, >>>>> >>>>> >>>>>That works great, thanks a lot for your help!!! >>>>> >>>>> >>>>>Regards >>>>> >>>>> >>>>>Spencer >>>>> >>>>> >>>>>On Tue, Dec 11, 2012 at 11:45 AM, Sandeep Karanth <sandeepk.kdp at gmail.com> wrote: >>>>> >>>>>You could try something like this and hopefully should help you. >>>>>>pjsip_hdr *hdr; >>>>>>pj_str_t hname = pj_str("HEADER_NAME"); >>>>>>pj_str_t hvalue = pj_str("HEADER_VALUE"); >>>>>> >>>>>> >>>>>>hdr = (pjsip_hdr*)pjsip_generic_string_hdr_create(pool,?&hname?,&hvalue); >>>>>>?pj_list_push_back(&accountConfig.reg_hdr_list,hdr?); >>>>>>pj_status_t status = pjsua_acc_add(&accountConfig, PJ_FALSE,&accountIdentifier); >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>On Tue, Dec 11, 2012 at 4:47 PM, Spencer MacDonald <spencer.macdonald.other at gmail.com> wrote: >>>>>> >>>>>>I just create an account and add it to pjsua like so: >>>>>>> >>>>>>> >>>>>>>pjsua_acc_config accountConfig; >>>>>>>pjsua_acc_config_default(&accountConfig); >>>>>>>?? >>>>>>>//Other Config is here >>>>>>>accountConfig.reg_timeout = 600; >>>>>>>? >>>>>>>pjsua_acc_id accountIdentifier; >>>>>>>pj_status_t status = pjsua_acc_add(&accountConfig, PJ_FALSE,&accountIdentifier); >>>>>>> >>>>>>> >>>>>>>Regards >>>>>>> >>>>>>>Spencer >>>>>>> >>>>>>> >>>>>>>On Tue, Dec 11, 2012 at 11:08 AM, Sandeep Karanth <sandeepk.kdp at gmail.com> wrote: >>>>>>> >>>>>>>So are you using the pjsua app? How do you do the registration?If you could mention that it would give a more clear view of your problem to me. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>On Tue, Dec 11, 2012 at 4:26 PM, Spencer MacDonald <spencer.macdonald.other at gmail.com> wrote: >>>>>>>> >>>>>>>>The issue is that PJSIP is handling the registration for me, I just set the?reg_timeout for an account. >>>>>>>>> >>>>>>>>> >>>>>>>>>Regards >>>>>>>>> >>>>>>>>>Spencer >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>>On Tue, Dec 11, 2012 at 10:51 AM, Sandeep Karanth <sandeepk.kdp at gmail.com> wrote: >>>>>>>>> >>>>>>>>>You can use the method? >>>>>>>>>>pjsip_msg_add_hdr(pjsip_msg *msg, pjsip_hdr *hdr ) to add your custom header.? >>>>>>>>>> >>>>>>>>>> >>>>>>>>>>Regards, >>>>>>>>>>Sandeep >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>>On Tue, Dec 11, 2012 at 4:12 PM, Spencer MacDonald <spencer.macdonald.other at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>Hi, >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>Im trying to send a custom header in a SIP?Registration, but I can't find a way to do so. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>It looks like you should be able to call >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>pjsip_regc_get_module() >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>to get the sip?registration?module, but this gives me a linker error. Looking in footprint.c this method appears to be commented out.? >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>Should this be working or is there an alternative solution? >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>Regards >>>>>>>>>>> >>>>>>>>>>>Spencer >>>>>>>>>>>_______________________________________________ >>>>>>>>>>>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 >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>>_______________________________________________ >>>>>>>>>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 >>>>>>>> >>>>>>>> >>>>>>> >>>>>>>_______________________________________________ >>>>>>>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 >>>>>> >>>>>> >>>>> >>>>>_______________________________________________ >>>>>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/20121227/db465be5/attachment-0001.html>