< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate-users] question about ExtensionHeader and ExtensionParameter


That is correct.  :)

You can use the ParseBuffer class to do customized parsing.

Scott


On Fri, May 23, 2014 at 11:38 AM, John Gregg <jgregg@xxxxxxxxx> wrote:
Am I correct in thinking that if I have a proprietary header that I define with ExtensionHeader, I can't use ExtensionParameter to grab its parameters? It looks like if I have a SIP message containing:

P-Foo: someData;faz=3;bat=987;bar=cheddar

And in my code I have

ExtensionHeader fooHdr("P-Foo");
ExtensionParameter batParam("bat");

then

sipMsg->header(FooHdr).front().exists(batParam)

always returns FALSE. It looks like sipMsg->header(FooHdr).front().value().c_str() is just the raw string "someData;faz=3;bat=987;bar=cheddar", and then I have to pull out my proprietary parameters by hand using good old C/C++ string manipulation primitives. The ExtensionParameter, then, is only useful for proprietary parameters on headers that are already known to resiprocate, like

Call-ID: 1-3730@10.0.23.14;bat=987

Or am I missing something? It sure would be nice to be able to use proprietary headers and parameters with the same ease as the predefined ones.

Thanks,

-John Gregg

_______________________________________________
resiprocate-users mailing list
resiprocate-users@resiprocate.org
List Archive: http://list.resiprocate.org/archive/resiprocate-users/