[OpenSIPS-Users] Help with transformation.
Jesus Rodriguez
jesusr at voztele.com
Sat Sep 13 01:58:14 CEST 2008
Hola Sergio,
> Hello everybody.
>
> I have a routing block with the following commands:
>
> avp_db_query("select uuid from usr_preferences where value =
> '$rU'", "$avp(s:test)");
>
> if($(avp(s:test){s.len}) != 0)
> {
> xlog("L_INFO", "found\n");
> setflag(4);
> }
> else
> {
> xlog("L_INFO", "not found\n");
> };
>
> avp_delete("$avp(s:test)/g");
>
> When query returns 0 rows, this error appears in log:
>
> Sep 12 17:24:11 [663] CRITICAL:core:comp_scriptvar: cannot get left
> var value.
>
> Is there a way to avoid it?
Instead of:
if($(avp(s:test){s.len}) != 0)
You can do:
if (is_avp_set("$avp(test)"))
Saludos
JesusR.
------------------------------------
Jesus Rodriguez
VozTelecom Sistemas, S.L.
jesusr at voztele.com
http://www.voztele.com
Tel. 902360305
-------------------------------------
More information about the Users
mailing list