How to add a header to an outgoing message

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

 



Thanks for the help, I'll try it.
  ----- Original Message ----- 
  From: Alejandro Orellana 
  To: Agustin Lo Castro ; pjsip list 
  Sent: Friday, May 10, 2013 3:39 PM
  Subject: Re: How to add a header to an outgoing message


  i do this  and seems to work just fine 
  pjsua_msg_data msg_data;


          pjsip_generic_string_hdr my_hdr;
          pj_str_t hname = pj_str("HEADER-NAME");
          pj_str_t hvalue = pj_str("HEADER VAlue ");
      

          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(id, &uri, 0, NULL, &msg_data, &callIdentifier);


  Thanks
  On May 10, 2013, at 2:31 PM, Agustin Lo Castro wrote:


    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!

    _______________________________________________
    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



  ------
  Alejandro Orellana
  Savant Systems, LLC

  45 Perseverance Way
  Hyannis, MA 02601
  +1 (508) 683-2547 (W)
  +1 (508) 683-2647 (F)
  Alejandro.Orellana at savantsystems.com

   







  Statement of Confidentiality
  The contents of this e-mail message and any attachments are confidential and are intended solely for the addressee. The information may also be legally privileged. This transmission is sent in trust, and the sole purpose of delivery to the intended recipient. If you have received this transmission in error, any use, reproduction or dissemination of this transmission is strictly prohibited. If you are not the intended recipient, please immediately notify the sender by reply e-mail or at 508.683-2500 and delete this message and its attachments, if any.















  Statement of Confidentiality

  The contents of this e-mail message and any attachments are confidential and are intended solely for the addressee. The information may also be legally privileged. This transmission is sent in trust, and the sole purpose of delivery to the intended recipient. If you have received this transmission in error, any use, reproduction or dissemination of this transmission is strictly prohibited. If you are not the intended recipient, please immediately notify the sender by reply e-mail or at 508.683.2500 and delete this message and its attachments, if any.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20130513/2b84934a/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