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,