[SR-Users] userblacklist error using characters
marius zbihlei
marius.zbihlei at 1and1.ro
Thu Oct 14 10:57:19 CEST 2010
On 10/14/2010 11:36 AM, "Nicolas Rüger" wrote:
> Hello Marius,
>
> thanks for the advice. I forgot about the modparam. It seems working now as I don't get the error any more :)
>
> BUT blacklisting does not work for me....see:
>
> In kamailio.cfg I added the following in routing logic:
>
> if (is_method("INVITE")) {
>
> if (!check_user_blacklist("$rU", "$rd","$fU")){
> sl_send_reply("403", "Forbidden");
> exit;
> }
>
> }
>
> Im my case $rU is "user04" , $rd is "mykamailio.de" and $fU is "user03".
>
> ...means "user03 at mykamailio.de" is calling "user04 at mykamailio.de"
>
> Table userblacklist looks like this:
>
>
Hello
You are right, I have never tested with $fU given so I was a bug in the
code. It should be fixed by commit
d128ac966beeb2ddfd3332a20fdd93ae292d81b1. The bug affected alphanum
match mode only if the $fU had trailing non-digit chars.
Can you check if it works...
Thank you.
Marius
> id | username |domain | prefix | whitelist
> ----------------------------------------------------
> 15 | user04 | mykamailio.de | user03 | 0
>
>
> In this scenario "user03" should be blacklisted by user04, right!? But it's not...
>
> Any ideas why???
>
>
> Thank you.
>
> Regards,
>
> Nicolas
>
>
>
>
>
>
>
>
> -------- Original-Nachricht --------
>
>> Datum: Thu, 14 Oct 2010 11:12:33 +0300
>> Von: marius zbihlei<marius.zbihlei at 1and1.ro>
>> An: "Nicolas Rüger"<NicolasRueger at gmx.de>
>> CC: "sr-users at lists.sip-router.org"<sr-users at lists.sip-router.org>
>> Betreff: Re: [SR-Users] userblacklist error using characters
>>
>
>> On 10/13/2010 09:57 PM, "Nicolas Rüger" wrote:
>>
>>> Hey Marius,
>>>
>>> thnaks again. I now did the following:
>>>
>>> git clone git://git.sip-router.org/sip-router kamailio
>>> cd kamailio
>>> git checkout -b 3.1 origin/3.1
>>>
>>> git cherry-pick 2f8f8e58
>>>
>>> make FLAVOUR=kamailio include_modules="db_mysql perl" cfg
>>> make all
>>> make install
>>>
>>> Picking the "cherry" worked without the "-depth 1". :)
>>>
>>>
>>> BUT I still get an error when using userblacklistmodule:
>>>
>>>
>>> ERROR:<core> [dtrie.c:132]: cannot insert non-numerical character
>>> ERROR: userblacklist [db.c:91]: could not insert values into trie.
>>>
>>>
>>>
>>>
>> Hello,
>>
>> Are you sure that you rebuilt userblacklist module after the patch (you
>> can go to modules_k/userblacklist and run make from there)? Did the
>> patch applied without error? Also, have you explicitly enabled the alpha
>> numerical match mode
>>
>> modparam("userblacklist", "match_mode", 128)
>>
>> in you cfg file?
>>
>> Cheers
>> Marius
>>
>>
>>> The username I use in userblacklist-table is "user04" and the prefix is
>>>
>> "user03". Domain column is empty.
>>
>>> Any ideas why it's not working???
>>>
>>>
>>> Thank you!!
>>>
>>> Regards,
>>>
>>> Nicolas
>>>
>>>
>>>
>>>
>>>
>>>
>>> -------- Original-Nachricht --------
>>>
>>>
>>>> Datum: Wed, 13 Oct 2010 19:16:21 +0200
>>>> Von: Marius Zbihlei<Marius.Zbihlei at 1and1.ro>
>>>> An: "Nicolas Rüger"<NicolasRueger at gmx.de>
>>>> CC: "sr-users at lists.sip-router.org"<sr-users at lists.sip-router.org>
>>>> Betreff: Re: [SR-Users] userblacklist error using characters
>>>>
>>>>
>>>
>>>
>>>> Hello,
>>>> Sorry for the advice, -depth 1 means no commit history which is fine
>>>>
>> :D
>>
>>>> The patch I was referring is here
>>>>
>>>>
>> http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=commitdiff;h=2f8f8e58a922adec440d47592d1ca24dbf05f29c
>>
>>>> You can save it into a file (starting with the line diff --git
>>>> a/modules_k/userblacklist/README b/modules_k/userblacklist/README) and
>>>>
>> use the "patch"
>>
>>>> utility to patch the module.
>>>> Then compile.
>>>> Marius
>>>>
>>>> ________________________________________
>>>> From: "Nicolas Rüger" [NicolasRueger at gmx.de]
>>>> Sent: Wednesday, October 13, 2010 5:46 PM
>>>> To: Marius Zbihlei
>>>> Cc: sr-users at lists.sip-router.org
>>>> Subject: Re: [SR-Users] userblacklist error using characters
>>>>
>>>> Hey Marius,
>>>>
>>>> thanks for the detailed answer but after
>>>>
>>>> git cherry-pick 2f8f8e58
>>>>
>>>> I get the error:
>>>>
>>>> fatal: Cannot find '2f8f8e58'
>>>>
>>>> Any ideas???
>>>>
>>>> Thank you.
>>>>
>>>> Regards,
>>>>
>>>> Nicolas
>>>>
>>>>
>>>>
>>>>
>>>>> patch from the master branch to 3.1 (local so don't worry) using
>>>>>
>>>>> cd /usr/local/src/kamailio-3.1.0
>>>>> rm -rf kamailio #start with a new fresh clone
>>>>> git clone --depth 1 git://git.sip-router.org/sip-router kamailio
>>>>> cd kamailio
>>>>> git checkout -b 3.1 origin/3.1
>>>>> #this is the new step
>>>>> git cherry-pick 2f8f8e58
>>>>>
>>>>>
>>>>> You should then see something like
>>>>>
>>>>> Finished one cherry-pick.
>>>>> [3.1 e4f7cd8] modules_k/userblacklist : extended userblacklist module
>>>>>
>> so
>>
>>>>> also alphanumerical matches are possible
>>>>> 5 files changed, 86 insertions(+), 27 deletions(-)
>>>>>
>>>>>
>>>>>
>>>>>
>>>> --
>>>> GRATIS! Movie-FLAT mit über 300 Videos.
>>>> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome
>>>>
>>>> _______________________________________________
>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>>> sr-users at lists.sip-router.org
>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>>>
>>>
>>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>
More information about the sr-users
mailing list