Hi Jing,
For sure it is NULL/0 as you never write into it, you just read it. Who
should update that variable ??
Also I'm not sure what you try to achieve - only 5 users (AORs)
registered overall in OpenSIPS ? or only 5 contacts per AOR ?
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 02.07.2014 13:14, jing wrote:
hi,all
I want to limit the maxmum of register AOR (for example 5), and I
modified part of the opensips.cfg as fllow:
if (is_method("REGISTER"))
{
if ((registered("location"))||($var(registered_users)<= 5)) {
# authenticate the REGISTER requests
if (!www_authorize("", "subscriber"))
{
www_challenge("", "0");
exit;
}
if (!db_check_to())
{
sl_send_reply("403","Forbidden auth ID");
exit;
}
if ( proto==TCP || 0 ) setflag(TCP_PERSISTENT);
if (!save("location"))
sl_reply_error();
exit;
}else{
xlog("registerednum is $var(accepted_regs)");
sl_send_reply("403","Forbidden auth ID");
exit;
}
}
But it doesn't work .
The log shows that the value of "$var(registered_users)" is null .
Is it wrong to use registered_users there?
How to use the export parameter?
Or can anyone help to tell me how to implement the limition ?
Thanks
jing
_______________________________________________
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