Re: [OpenSIPS-Users] userblacklist strange behavior

2015-05-04 Thread Liviu Chircu

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) = 1001;

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 | 1001   ||| 0 |
|  2 | 9198362323 tel:9198362323 ||| 0 |
++--+++---+

If i set $avp(user) = 1001;   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@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


Re: [OpenSIPS-Users] userblacklist strange behavior

2015-05-04 Thread Satish Patel
It wasn't working because i was using

$fn = $avp(user)

My string was double quote like 1001  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) = 1001;

 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 | 1001   ||| 0 |
 |  2 | 9198362323 ||| 0 |
 ++--+++---+

  If i set $avp(user) = 1001;   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


Re: [OpenSIPS-Users] OpenSIPS Releases Status

2015-05-04 Thread Răzvan Crainea

Hi, all!

Hope you have not forgot that this week we'll be releasing the 
Production version of OpenSIPS 2.1. This release is scheduled for 
Thursday, 7th of May 2015.


During the same day, we'll be releasing the last version of OpenSIPS 1.8 
and 1.10, as well as a new minor version for 1.11.


Talk to you on Thursday!

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 04/20/2015 07:43 PM, Răzvan Crainea wrote:

Hi, All!

For the next weeks we have planned the following releases for OpenSIPS 
2.1:


* 22-23 April 2015: OpenSIPS 2.1 RC2 release
* 4-8 May 2015: OpenSIPS 2.1 Production Release

Along with the Production Release of OpenSIPS 2.1, on 4-8 May 2015 
we'll also release three more minor versions for OpenSIPS 1.8, 1.10 
and 1.11.


Note that for OpenSIPS 1.8 and 1.10 these will be the final/last 
releases. Starting from 8th of May 2015, we won't be supporting these 
versions.


OpenSIPS 1.11 is LTS and will be supported for at least one more year.

Looking forward to see all these new versions released :D

Best regards,




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [OpenSIPS-Devel] Contest and prizes - OpenSIPS 2.1 testing

2015-05-04 Thread Răzvan Crainea

Hello again!

The winner of the sixth Bug Hunt edition[1] is Jock 
McKechnie(@jockmckechnie)[2] for reporting the dbtext bug, where the 
rows were reverted and thus the dispatcher order was not preserved. 
Thank you for reporting it!


The last Bug Hunt edition has started now and lasts only until 6th of 
May, 2015, just before the production release of OpenSIPS! This is your 
last chance to win an OpenSIPS t-shirt, so you'd better not miss it :D!


[1] http://www.opensips.org/Community/BugHuntContest
[2] https://github.com/jockmckechnie

Thanks,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users