[OpenSIPS-Users] Finding value-less URI parameters

Saúl Ibarra Corretgé saul at ag-projects.com
Mon Mar 19 19:07:08 CET 2012


Hi,

I'm trying to find a way to check if a URI has a given parameter, which may or may not have a value. The use case at hand is GRUU: a public GRUU looks like this sip:saul at ag-projects.com;gr=jhf34fhio34f0934jf and a temporary GRUU looks as follows: sip:jhfr9843h09fh3f at 1.2.3.4:5060;gr

I want to check if a Contact header has the 'gr' parameter (not interested in the value), but I'm having some trouble. So far I tested this:

$avp(gruu_parameter) := $(ct.fields(uri){uri.param,gr});

But apparently the AVP is set to the empty string both if the parameter has no value or the parameter doesn't exist. I thought that in case it didn't exist it would return null, but I may not be remembering correctly :-S

Any ideas?


Regards,

--
Saúl Ibarra Corretgé
AG Projects






More information about the Users mailing list