[SR-Users] userblacklist use avp for check_blacklist
Jan Hazenberg
jenus at cyberchaos.nl
Thu Jun 23 12:47:39 CEST 2016
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, rejecting
call - IP=$si PORT=$sp R=$ru ID=$ci FU=$fu M=$rm UA=$ua\n");
sl_send_reply("403", "Forbidden");
exit;
}
This is the GDB output:
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 0x00007fdf4b2be6fb in str2int (_s=0x7fff312b7bd0, _r=0x30) at
../../parser/../parser/../ut.h:643
643 *_r = 0;
I have kamailio 4.4.0 installed, just tested with 4.4.1 and the result
is the same.
Thanks,
Jan
Jan Hazenberg schreef op 2016-06-23 09:47:
> 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 different formats to different
> destinations. Or is this only possible with the check_user_blacklist
> function?
>
> I also have a issue with numbers in E164 format with a leading +. I
> tried to escape this with a \ in the database but it will not load the
> entry's when i use the + in front of the number. Is the + supported by
> this module or should i strip it before the function and add it again
> afterwards?
>
> Thanks,
>
> Jan
>
>
>
> _______________________________________________
> 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