[reSIProcate] How got the customization header value?
Byron Campen
bcampen at estacado.net
Fri Jan 4 09:17:41 CST 2008
ExtensionHeader h_Balance("Balance");
if(!sip.empty(h_Balance))
{
Data balance(sip.header(h_Balance).begin().value());
}
Best regards,
Byron Campen
> For example:
>
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP 192.168.1.188:49892;branch=z9hG4bK-
> d87543-7956131ab8501846-1--
> d87543-;rport=49892;received=222.247.100.137
> To: "user1"<sip:user1 at sip.test.net:
> 5060>;tag=87625ddffbb24ccca3705354d9b0edc4.8c6c
> From: "user1"< sip:user1 at sip.test.net:5060>;tag=32493031
> Call-ID: OWM3ZTNkNGRjMzI4YTdmZTVlY2RhNDQ5OGQ0YTA4OWY.
> CSeq: 2 REGISTER
> Contact:
> <sip:user1 at 192.168.1.188:49892;rinstance=bdd2255bddaf9c63>;expires=360
> 0;received="sip: 222.10.100.137:49892"
> Server: OpenSer (1.1.1-notls (i386/linux))
> Balance: 123.00
> Content-Length: 0
>
>
> How to get the 123:00 of "Balance: 123.00" header?
>
>
> I have checked with Wiki, just saw this:
>
> Extension Header
>
> SIP is an open specification. Elements may add headers that are not
> generally known. Extension headers are always of type
> StringCategory and are multiple valued but not comma separated.
> Extension headers may have parameters, however, not all stacks will
> consider semi-colons in extension headers significant, so extension
> header parameters may cause interop problems.
>
> Extension headers are declared, for example:
>
> static const resip::ExtensionHeader h_XFoos("X-Foo");
> They are used similarly to built-in headers; the h_XFoos declared
> above is a header access token.
>
> msg->header(h_XFoos).push_back(StringCategory("value"));
>
>
> Thanks
>
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at resiprocate.org
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20080104/d0e8f1b4/attachment.htm>
More information about the resiprocate-devel
mailing list