[OpenSER-Users] userblacklist

Henning Westerholt henning.westerholt at 1und1.de
Wed Apr 23 11:37:19 CEST 2008


On Tuesday 22 April 2008, Helmut Kuper wrote:
> I enhanced userblacklist module in that way, that check_user_blacklist
> function has now 2 additional, but optional, parameters:
>
> check_user_blacklist(string user, string domain [, string
> number_to_check][, string table])
>
> Purpose of all this is to have serveral user individual blacklists for
> e.g. incoming and outgoing calls. You have to create one table for each
> userblacklist in your database. Table layout is same as default
> "userblacklist" table. Whitelist is the same for all userblacklists
> supported. Global blacklist behaviour was not touched by this work.

Hi Helmut,

thank you for the patch!

> [..]
> b) check_user_blacklist(string user, string domain, string
> number_to_check) or check_user_blacklist(string user, string domain,
> string number_to_check, "")
>
> 	checks number_to_check against user's prefix using table given in
> mod_param dt_table.

Looks good. Perhaps it makes sense to make the 'number' parameter mandatory, 
as the "old" behaviour could be easily achieved with '$ru'. This is perhaps 
easier to understand.

> Additionally I fixed a potential seg fault caused by strncpy without
> using MAXNUMBERLEN to protect target buffer in function
> "check_user_blacklist".
>
> Further e164 numbers (leading '+' sign) as number_to_check or in R-URI
> are now allowed. "+" is stripped off in function "check_user_blacklist"
> befor calling dt_longest_match().

Good catch.

> Is there a chance to get this into trunk?

Can you perhaps send me the patch in unified format (either svn diff or 
patch -u)? I've tried to apply this patch, but without luck.

Cheers,

Henning




More information about the sr-users mailing list