[OpenSIPS-Users] Blacklisting registered users at runtime (and have it be persistent).

Bobby Smith bobby.smith at gmail.com
Thu Apr 16 22:18:09 CEST 2009


Currently, we're facing an issue where we would like to blacklist a
particular request-user from registering.  We have approximately 10,000
registered users, so it seems like using the blacklist module to maintain a
list of whitelist/blacklist users would be complicated (and perhaps slow on
lookups).

What we would like to do, essentially, is blacklist a particular sip user id
(user only, not concerned about blacklisting ip's) by using the opensipsctl
script, or something to that effect.  I kind of have a general gist of
something I could do (install the user_blacklist module, do an INSERT at
runtime into that table with the sip user and the blacklist flag),  but
reading all the documentation, it seems to require more than just a user and
blacklist = true.

I thought that there was an easy way from the opensipsctl script to
blacklist or ban particular users, but it looks like for ul anyways, you can
just remove a register.

Any suggestions?  We would also need a way to remove that user from the
blacklist.  I'm also slightly hesitant of doing this at runtime because of
database locks or whatnot, and I don't want to cause the application to
crash.

And, in the routing script, it would be something similar to (pseudocode):

if(! a_blacklisted_user)
{
    if(!lookup("location")
    {
        sl_send_reply("401", "Unauthorized");
        exit;
    }
}


Thanks again for all the help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20090416/b275720d/attachment-0001.htm 


More information about the Users mailing list