[OpenSIPS-Users] userblacklist strange behavior

Liviu Chircu liviu at opensips.org
Mon May 4 11:34:09 CEST 2015


Hi Satish,

Whether you use integers or string there, performance should be similar. 
However, integers are limited to 4294967295 before overflowing - hence 
why it's not working for you.

So, proper way of usage:
$avp(user) = "10000001";

Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 30.04.2015 23:34, Satish Patel wrote:
>
> mysql> select * from userblacklist;
> +----+--------------+--------+--------+-----------+
> | id | username     | domain | prefix | whitelist |
> +----+--------------+--------+--------+-----------+
> |  1 | 10000001   |        |        |         0 |
> |  2 | 9198362323 <tel:9198362323> |    |        |         0 |
> +----+--------------+--------+--------+-----------+
>
> If i set $avp(user) = 10000001;   then it works!
>
> but if i set  $avp(user) = 9198362323;   doesn't work what is the 
> problem ?
>
>
> route[user_blacklist] {
>
>         $avp(user) = 9198362323;
>         if (!check_user_blacklist("$avp(user)", "$avp(i:82)")) {
>                 sl_send_reply("403", "User Blocked");
>                 exit;
>         };
> }
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150504/2c031716/attachment.htm>


More information about the Users mailing list