[reSIProcate] How got the customization header value?
Karlsson
boost.regex at gmail.com
Fri Jan 4 23:26:34 CST 2008
Can't compile it :
error C2664: 'resip::SipMessage::empty' : cannot convert parameter 1 from
'resip::ExtensionHeader' to 'const resip::HeaderBase &'
1> Reason: cannot convert from 'resip::ExtensionHeader' to 'const
resip::HeaderBase'
Thanks
2008/1/4, Byron Campen <bcampen at estacado.net>:
>
> 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=3600;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/20080105/faf9ff36/attachment.htm>
More information about the resiprocate-devel
mailing list