[SR-Users] Kamailio 1.5.4 - IP addresses WhiteList

Daniel-Constantin Mierla miconda at gmail.com
Wed Nov 17 11:44:14 CET 2010


Hello,

On 11/16/10 4:41 PM, Miguel Baptista wrote:
> Hi all,
>
> I want to enable pike module based on IP addresses. I mean ... I don't
> want to check if requests from some specific IP addresses trigged the
> Pike's threshold. but for all other IP addresses I want to check it.
> I was thinking about using some kind of IP addresses' whitelist. The
> userblacklist module has some whitelist but it's based on
> username/domain not IP addresses.
>
> Can someone please give me some advice how to implement it properly. Is
> there any module that will allow me to do it properly?
>
you can use permissions module.

if(!allow_source_address("grouptoskip")) {
    # do the pike logic here
}

If you have 1-2 addresses that do not change, you can use 
if(src_ip==ipaddress...). Default config file for 3.1.0 comes with such 
logic.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com




More information about the sr-users mailing list