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

[reSIProcate-users] Parsing extension header parameters


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