Hi,

We have this approach for arrayable PVs (e.g. AVPs, XAVPs):

   $(avp(var)[*]) = $null;

This defines the PV, but sets its value to null. I haven't tested, but I would assume, in the case of an AVP, that this would cause it to fail

   defined $avp(var)
   is_avp_set("$avp(var)")

But, I see there is also in the 'pv' module now a function pv_unset(), i.e.

   pv_unset("$avp(var)");
   pv_unset("$var(foo)");

I assume this actually deletes the variable itself from the namespace, instead of assigning it an undefined value.

Are there pros and cons to using one or the other to mass-reset variables relevant to call processing at the beginning of route script?

Thanks,

--
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States

Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to