Userblacklist Module

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Userblacklist Module

Alexander Perkins
Hi.  I have successfully implemented the User Blacklist module, but I
noticed it checks the number the call is going to, not the CallerID.  Is it
possible to lookup the CallerID instead of the number?  I have tried
creating a dummy variable for $tU and then assiging the CallerID to $tU,
but OpenSIPs failed (I guess $tU is read-only?).  I am using the global
blacklist functionality.  This is the code I tried originally:

$var(TempVariable) = $tU;
$tU = $fU;

        if (!check_blacklist("globalblacklist"))
        {
                sl_send_reply("403", "Forbidden");
                exit;
        }

$tU =  $var(TempVariable);

Any help is appreciated,
Alex

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Userblacklist Module

Jon Abrams
Try the check_user_blacklist function without the number parameter. You'd need to disable domain use and set the user blacklist table module parameters.

Alternatively, you could use something like redis or memcached to hold the lists and query those, but the built-in user blacklist is pretty convenient.

- Jon

On Thu, May 3, 2018 at 9:27 AM, Alexander Perkins <[hidden email]> wrote:
Hi.  I have successfully implemented the User Blacklist module, but I
noticed it checks the number the call is going to, not the CallerID.  Is it
possible to lookup the CallerID instead of the number?  I have tried
creating a dummy variable for $tU and then assiging the CallerID to $tU,
but OpenSIPs failed (I guess $tU is read-only?).  I am using the global
blacklist functionality.  This is the code I tried originally:

$var(TempVariable) = $tU;
$tU = $fU;

        if (!check_blacklist("globalblacklist"))
        {
                sl_send_reply("403", "Forbidden");
                exit;
        }

$tU =  $var(TempVariable);

Any help is appreciated,
Alex

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users