[OpenSER-Users] userblacklist

Helmut Kuper helmut.kuper at ewetel.de
Wed Apr 23 15:04:19 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Errrrrrmmmm, well a bit sleepy today here ... I forgot the attachment;D

...


Hi Henning,

ok param 3 (number) is now mandatory.

Param 3 was optional because I thought it would be better to keep old
syntax instead of forcing existing openser-configurations to be
reconfigured...

Param 4 is still optional.

I  attached a svn diff as requested.

regards
helmut


Henning Westerholt schrieb:
| 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
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgPM9MACgkQ4tZeNddg3dxoWwCdG/aVG6bJoU7VxN8hsywZvvNE
iz8An2qyDhIjUN/8pXJzOw8dq1c+4SEA
=VNgE
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.c
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20080423/b61659b3/attachment.asc>


More information about the sr-users mailing list