[reSIProcate] Does there have a common way to got RFC headers value and extension headers value ?
Karlsson
boost.regex at gmail.com
Tue Mar 25 00:26:15 CDT 2008
Hi, I want to write a function to got the headers value. it's working fine
with Extension header, but for the
RFC header, likes contact, to, from. I got assert error,.
How to mofify this function then it can be working with
RFC headers and extension headers both?
Thank you in advance.
void GetHeaderValue(Data buff, string headerName)
{
SipMessage * message = SipMessage::make(buff);
if (!message)
{
return ;
}
ExtensionHeader h_Extension(headerName.c_str());
if (message->exists(h_Extension) == false)
{
return ;
}
if (message->header(h_Extension).empty() == true)
{
return ;
}
if (message->header(h_Extension).front().isWellFormed() == false)
{
return ;
}
Data temp(message->header(h_Extension).front().value());
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20080325/666911e4/attachment.htm>
More information about the resiprocate-devel
mailing list