<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 23.04.2020 15:26, volga629 via Users
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:5e6e5656-a785-5b86-a6e9-c591f4442249@skillsearch.ca">
<p><font face="Cantarell">$var(usr_check_tls) = "tls_" +
$(tU{s.select,0,%});</font></p>
<p><font face="Cantarell">Second var</font></p>
<p><font face="Cantarell">cache_fetch("redis:wss-grp","tls-frompbx",
$avp(tls-frompbx))</font></p>
<p><font face="Cantarell">This return always false<br>
</font></p>
<p><font face="Cantarell">if($avp(tls-frompbx)==$var(usr_check_tls))
{</font></p>
</blockquote>
<p><tt>Hi, Volga!</tt></p>
<p><tt>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:</tt></p>
<p><tt> $var(x) = "201%123";<br>
$var(usr_check_tls) = "tls_" + $(var(x){s.select,0,%});<br>
$avp(tls-frompbx) = "tls_201";<br>
$avp(tls-frompbx) = "tls_201";<br>
<br>
assert($avp(tls-frompbx) == $var(usr_check_tls),
"avp-var-1");</tt></p>
<p><tt>Regards,<br>
</tt></p>
<pre class="moz-signature" cols="72">--
Liviu Chircu
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/liviuchircu">www.twitter.com/liviuchircu</a> | <a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a>
OpenSIPS Summit, Amsterdam, Fall 2020
<a class="moz-txt-link-abbreviated" href="http://www.opensips.org/events">www.opensips.org/events</a></pre>
</body>
</html>