On 02.09.2020 13:35, johan wrote:

I seem to get strange and incomprehensible results :

Hi, johan!

This behavior is clearly stated in the $var() documentation [1].  The idea is that the $var() variables are *super*-optimized, to the point where the OpenSIPS workers perform *no cleanup *of the previous state of their $var() variables when beginning to process a new SIP request.  This immediately explains why your $var(fU) contains the random value of "+3246020570", despite the dp_translate(33757935187) produces "false" (it does not match against any dp rule).

TL;DR: this is a feature, not a bug.  If you really need $var(fU) to be initialized, then do "$var(fU) = NULL;" before you use it.

Best regards,

[1]: https://www.opensips.org/Documentation/Script-CoreVar-3-2#toc1

--
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com

OpenSIPS Summit 2020 Distributed
  www.opensips.org/events/Summit-2020Distributed

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to