[Serusers] Single Registration Restriction

Bogdan-Andrei Iancu bogdan at voice-system.ro
Fri Jun 10 18:43:29 CEST 2005


Darren,

mostly depends of what version you are using. In 0.9.0 you can limit the 
number of uploaded contacts via "max_contacts" registrar parameter.

bogdan

Darren Nay wrote:

>Hey all,
>
>Can anyone tell me a good and reliable way to restrict registrations to 1
>per username?
>
>I was thinking that I could do something like this:
>
>           if (method=="REGISTER") {
>               if (!www_authorize("proxy.mydomain.net", "subscriber")) {
>                 www_challenge("proxy.mydomain.net", "0");
>                 break;
>               };
>             };
>
>             if (!lookup("location")) {
>               save("location");
>             } else {
>               ## instead of saving with a 200 OK - send error
>               ## Not sure the best error to return here
>               sl_send_reply("403","Forbidden");
>             }
>
>             break;
>         };
>
>The problem is that we use static routes for voicemail, and so there will
>always be at least one static route in the locations table for each of our
>customers and thus the method above won't work.
>
>Is there a way that I can not only check whether a location exists, but also
>do a Search() against the URI's of the returned destination set?
>
>Or is there another (possibly better) way to do this?
>
>Thanks for your help!!
>
>Darren Nay
>Ionosphere, Inc.
>VoIP Network Development
>dnay at ionosphere.net
>
>
>_______________________________________________
>Serusers mailing list
>serusers at lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
>
>  
>




More information about the sr-users mailing list