Daniel,
Sorry was still some testing code, but without the ! it rejects
everything.
Code:
xlog("L_NOTICE", "NOTICE: Chekking blacklist for number
$(avp(ruri_number){s.substr,1,0}) with domain $avp(from_domain) - R=$ru
ID=$ci FU=$fu M=$rm UA=$ua\n");
if (check_user_blackl
You have a negation of the function int the if expression, respectively:
!check_user_blacklist(...)
If the function returns true on record match and you want to reject in
that case, then just remove the ! in the expression.
Cheers,
Daniel
On 27/06/16 14:11, Jan Hazenberg wrote:
> Daniel,
>
> Se
Daniel,
Seems like it is not working anymore, i now have configured:
if (!check_user_blacklist("blacklist", "oranjelaan.net",
"318001234")) {
xlog("L_ALERT", "ALERT: $rU is blacklisted, rejecting
call - IP=$si PORT=$sp R=$ru ID=$ci FU=$fu M=$rm UA=$ua\n");
Have you done any tests to see if runtime works fine as well? Just to be
sure nothing was broken.
Cheers,
Daniel
On 27/06/16 13:46, Jan Hazenberg wrote:
> Daniel,
>
> Yes that seems to fix the problem. Kamailio now starts without crashing.
>
> Thanks,
>
> Jan
>
>
> Daniel-Constantin Mierla schre
Daniel,
Yes that seems to fix the problem. Kamailio now starts without crashing.
Thanks,
Jan
Daniel-Constantin Mierla schreef op 2016-06-27 13:08:
Can you try with the master branch or backport the next commit?
-
https://github.com/kamailio/kamailio/commit/5fd2c91f512b7311f11c76023da45758
Can you try with the master branch or backport the next commit?
-
https://github.com/kamailio/kamailio/commit/5fd2c91f512b7311f11c76023da45758fb8c4365
If all ok, then I push the backported patch to stable branches.
Cheers,
Daniel
On 27/06/16 11:57, Daniel-Constantin Mierla wrote:
> The spec i
The spec is null, so the crash is obvious. I have to look at the code to
see why it expect to be a spec there, while it can be a static string.
Cheers,
Daniel
On 27/06/16 10:57, Jan Hazenberg wrote:
> Daniel,
>
> Here the requested gdb output:
>
> (gdb) frame 1
> #1 0x7f22fd252ece in check_
Daniel,
Here the requested gdb output:
(gdb) frame 1
#1 0x7f22fd252ece in check_user_blacklist_fixup
(param=0x7f23061cdd88, param_no=1) at userblacklist.c:213
213 if(str2int(&s, (unsigned
int*)&model->spec->pvp.pvn.u.isname.name.n) != 0) {
(gdb) info l
Can you get the output of following commands in gdb:
frame 1
info locals
p *model
p *model->spec
Cheers,
Daniel
On 23/06/16 14:45, Jan Hazenberg wrote:
> Daniel,
>
> Here the output of the bt command. This was generated with kamailio 4.4.1
>
> Core was generated by `/usr/local/sbin/kamailio
Daniel,
Here the output of the bt command. This was generated with kamailio
4.4.1
Core was generated by `/usr/local/sbin/kamailio -P /var/run/kamailio.pid
-m 768 -M 16 -u kamailio -g k'.
Program terminated with signal 11, Segmentation fault.
#0 0x7f22fd2526fb in str2int (_s=0x7ffc529b73
Hello,
send the all the output of 'bt' command inside gdb. It will give the
full execution stack, likely the problem is not in frame 0, but in a
previous one.
Cheers,
Daniel
On 23/06/16 12:47, Jan Hazenberg wrote:
> I just tried to use the check_user_blacklist function but then
> kamailio crash
I just tried to use the check_user_blacklist function but then kamailio
crashed when i start it. I'm using the following code:
if (!check_user_blacklist("blacklist", "$avp(from_domain)",
"$(avp(ruri_number){s.substr,1,0})")) {
xlog("L_ALERT", "ALERT: $rU is blacklisted,
Hello,
I'm trying to use the userblacklist module to implement a global
blacklist. I have a few questions about the module.
Is it possible to use a avp for the check_blacklist function? If i'm
correct it will only parse the request URI, but i'm rewriting the URI in
a branch route to allow di
13 matches
Mail list logo