How to add a header to an outgoing message

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

 



Hi,

I need to add the following header to my outgoing messages:  "P-Asserted-Identity: <sip:4833750>"

I tried adding these lines to the function pjsip_call_make_call (located in the pjsip_call.c)

I declared these variables:
  pjsip_generic_string_hdr assert_id_hdr;
  pj_str_t hdr_name = pj_str ("P-Asserted-Identity");
  pj_str_t hdr_value = pj_str ("<sip:4833750>");

and, before pjsua_process_msg_data(TData, MSG_DATA),  I added these other lines:

  pjsip_generic_string_hdr_init2 (assert_id_hdr &, & hdr_name, & hdr_value);
  pj_list_push_back ((pj_list_type *) & (MSG_DATA-> hdr_list) & assert_id_hdr);

Also, in the program that calls the pjsip_call_make_call, I created a variable of type pjsua_msg_data MSG_DATA and initialize it with pjsua_msg_data_init (& MSG_DATA);

But I can't see the header in any of the captured packets.

Any help is welcome,

Thank you very much! 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20130510/16722d1d/attachment-0001.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