[Serusers] Single Registration Restriction
Darren Nay
dnay at ionosphere.net
Fri Jun 10 17:58:44 CEST 2005
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
More information about the sr-users
mailing list