[reSIProcate] Does there have a common way to got RFC headers value and extension headers value ?
Byron Campen
bcampen at estacado.net
Tue Mar 25 08:58:43 CDT 2008
You don't access the headers with built-in support with
ExtensionHeader. You need to use the already-defined header access
tokens. (see http://www.resiprocate.org/Use_Overview#Headers)
Best regards,
Byron Campen
> 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());
>
>
>
> }
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at resiprocate.org
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
More information about the resiprocate-devel
mailing list