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

Re: [reSIProcate-users] Parsing extension header parameters


ExtensionHeader will encompass the entire contents of the header, semi-colons and following characters included (header (h_PChargingVector).front().value()=="icid-value="VALUE";orig- ioi=ORIGIN..."). You would need to parse the contents yourself. The reason this is done is because semi-colon does not always signify that a parameter follows (for most defined header field values, it does; see the definition of extension-header in RFC 3261 page 231).

Best regards,
Byron Campen

Hi all,

I have problems extending resiprocate stack, the problem is that I don't find parsing ExtensionHeaders really easy, I receive a message (composed
by me) with this headers:

To: <sip:recibidor@destino;transport=udp>;icid-value=VALUE
P-Charging-Vector: icid-value="VALUE";orig-ioi=ORIGIN
... (and others, of course)

P-Charging-Vector header, icid-value and orig-ioi params are declared
like that:

/static const resip::ExtensionHeader h_PChargingVector("P-Charging- Vector");
static const resip::ExtensionParameter p_icid_value("icid-value");
static const resip::ExtensionParameter p_orig_ioi("orig-ioi");/


I am able to parse the icid-value from To header like any other
parameter, but i can't do it with any parameter in P-Charging-Vector
header. I coded the following:
/
    DEBUG("Num: known: %d unknown:%d",
received.header(h_PChargingVector).front ().numKnownParams(), received.header(h_PChargingVector).front ().numUnknownParams());/


And I take: 0 0, no parameters in the header, but i can print the whole
header correctly.

I read in the documentation
[http://www.resiprocate.org/Use_Overview#Extension_parameters] that was
possible to add parameters to ExtensionHeaders, can anybody help me?

Thanks in advance,

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