<DIV>
<DIV>hi,all</DIV>
<DIV>I want to limit the maxmum of register AOR (for example 5), and I modified part of the opensips.cfg as fllow: </DIV>
<DIV> </DIV>
<DIV>if (is_method("REGISTER"))<BR> {<BR> if ((registered("location"))||($var(registered_users)<= 5)) {<BR> # authenticate the REGISTER requests<BR> if (!www_authorize("", "subscriber"))<BR> {<BR> www_challenge("", "0");<BR> exit;<BR> }<BR> <BR> if (!db_check_to()) <BR> {<BR> sl_send_reply("403","Forbidden auth ID");<BR> exit;<BR> }</DIV>
<DIV> if ( proto==TCP || 0 ) setflag(TCP_PERSISTENT);</DIV>
<DIV> if (!save("location"))<BR> sl_reply_error();</DIV>
<DIV> exit;<BR> }else{<BR> xlog("registerednum is $var(accepted_regs)");<BR> sl_send_reply("403","Forbidden auth ID");<BR> exit;<BR> }<BR> }<BR></DIV>
<DIV> </DIV>
<DIV>But it doesn't work . </DIV>
<DIV>The log shows that the value of "$var(registered_users)" is null .</DIV>
<DIV>Is it wrong to use registered_users there? </DIV>
<DIV>How to use the export parameter?</DIV>
<DIV>Or can anyone help to tell me how to implement the limition ?</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Thanks</DIV>
<DIV> jing </DIV></DIV>