Re: how add header filed and what are the restrictions to add?

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

 




Hi,

a simple example for "P-Early-Media: inactive" :

{
const pj_str_t P_Early_Media_str = {(char*) "P-Early-Media", 13};
pj_str_t hdr_val;
pjsip_generic_string_hdr * hdr_name;
hdr_val = pj_str((char*) "inactive");
hdr_name = pjsip_generic_string_hdr_create(tdata->pool, &P_Early_Media_str, &hdr_val);
pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*) hdr_name);
}

good luck!

On 13.06.2020 15:27, kumar uppu wrote:
Hi,
I am new to pjsip, I want to send some data with a new header field in pjsip.
Like:

INVITE sip:123@xxxxxxx SIP/2.0

From: <sip:123@xxxxxxx>;tag=02509797-a5fd-4c94-8d66-92eb0df6bff5

To: sip:566@xxxxxxx

Contact: <sip:123@xxxxxxx;ob>

Call-ID: 74ec3d14-7734-46ea-9bf2-0ae92afdb8fc

CSeq: 1036 INVITE

My-own-header: <some data>

please give me example to add custom header in pjsip
what are the instructions to add header filed

Thanks,
Kumar

--
Kumar

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[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