[OpenSIPS-Users] Finding value-less URI parameters
Bogdan-Andrei Iancu
bogdan at opensips.org
Tue Mar 20 10:52:14 CET 2012
Hi Saúl,
Indeed, it seems that the URI transformation returns empty string if the
requested field does not exist (specific param, etc) - I would rather
say the bug is here.
Regards,
Bogdan
On 03/19/2012 08:07 PM, Saúl Ibarra Corretgé wrote:
> 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
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
--
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
More information about the Users
mailing list