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);
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-92eb0df6bff5To: 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 pjsipwhat 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