Hi Olivier:
You could use something like:
sip_unknown_t* head = NULL;
sip_unknown_t* prev = NULL;
std::map<std::string, std::string>::const_iterator it =
custom_headers.begin();
for(; it != custom_headers.end(); ++it)
{
sip_unknown_t* current = sip_unknown_format(home, "%s: %s",
it->first.c_str(), it->second.c_str());
if (head == NULL)
head = current;
current->un_next = NULL;
if (prev != NULL)
prev->un_next = current;
prev = current;
}
nua_invite(m_pSessionHandle,
//...
SIPTAG_UNKNOWN(head),
TAG_END());
Kun-Yao
From: Olivier Deme [mailto:od...@druidsoftware.com]
Sent: Friday, February 01, 2013 4:56 AM
To: sofia-sip-devel@lists.sourceforge.net
Subject: [Sofia-sip-devel] Sending Invite with SIP privateheader
Hi,
Would anybody have an example of how to add a SIP private header with
nua_invite?
I understand that I should use SIPTAG_HEADER but I'm not sure about how to
initialise it.
For example, if I wanted to add the following SIP line:
P-My-Private-Header: my_private_header_info
Thanks for your help.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel