<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 31.05.2023 13:00, Michele Pinassi
via Users wrote:<br>
</div>
<blockquote type="cite"
cite="mid:33f1bb16-5db1-a08e-9c1b-8f53f26bf758@unisi.it">
<pre>User XXXX has 2 calls (max 10 calls): BUSY
...
User XXXX has 1 calls (max 10 calls): ALLOW
</pre>
<p>Any hints or suggestion?</p>
</blockquote>
<p><font face="monospace">Hi, Michele!</font></p>
<p><font face="monospace">It looks like there is some string
comparison going on in there, which would explain both samples.
For example:</font></p>
<p><font face="monospace">"2" > "10" (true) -------> BUSY<br>
"1" > "10" (false) -------> ALLOW</font></p>
<p><font face="monospace">Just make sure both variables contain
integer values and you should be good. I'm suspecting
avp_db_load() produces string outputs, so you must perform
integer conversion using the {s.int} transformation:
$(avp(maxcalls){s.int})</font></p>
<p><font face="monospace">Best regards,</font><br>
</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></pre>
</body>
</html>