[OpenSIPS-Users] Value comparison issue
Liviu Chircu
liviu at opensips.org
Wed May 31 10:12:53 UTC 2023
On 31.05.2023 13:00, Michele Pinassi via Users wrote:
> User XXXX has 2 calls (max 10 calls): BUSY
> ...
> User XXXX has 1 calls (max 10 calls): ALLOW
>
> Any hints or suggestion?
>
Hi, Michele!
It looks like there is some string comparison going on in there, which
would explain both samples. For example:
"2" > "10" (true) -------> BUSY
"1" > "10" (false) -------> ALLOW
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})
Best regards,
--
Liviu Chircu
www.twitter.com/liviuchircu |www.opensips-solutions.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20230531/33376dd2/attachment.html>
More information about the Users
mailing list