It wasn't working because i was using $fn = $avp(user)
My string was double quote like "10000001" because of that it won't comparing true result with blacklist table and result was "false" when i strip out "" from $fn then it works! On Mon, May 4, 2015 at 5:34 AM, Liviu Chircu <li...@opensips.org> wrote: > 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 Developerhttp://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 | | | 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 > listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > _______________________________________________ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > >
_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users