[OpenSIPS-Users] string comparison

Liviu Chircu liviu at opensips.org
Thu Apr 23 13:34:38 EST 2020


On 23.04.2020 15:26, volga629 via Users wrote:
>
> $var(usr_check_tls) = "tls_" + $(tU{s.select,0,%});
>
> Second  var
>
> cache_fetch("redis:wss-grp","tls-frompbx", $avp(tls-frompbx))
>
> This return always false
>
> if($avp(tls-frompbx)==$var(usr_check_tls)) {
>
Hi, Volga!

Maybe there is some route being called in the meantime or some other 
logic.  The comparison operators are working well on all latest 2.4+ 
versions, you can test for yourself with a simple opensips.cfg:

     $var(x) = "201%123";
     $var(usr_check_tls) = "tls_" + $(var(x){s.select,0,%});
     $avp(tls-frompbx) = "tls_201";
     $avp(tls-frompbx) = "tls_201";

     assert($avp(tls-frompbx) == $var(usr_check_tls), "avp-var-1");

Regards,

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

OpenSIPS Summit, Amsterdam, Fall 2020
   www.opensips.org/events

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200423/8d790a59/attachment.html>


More information about the Users mailing list