[SR-Users] KEMI basic logging
Eugene Prokopiev
enp at itx.ru
Thu Mar 29 21:23:49 CEST 2018
Hi,
Tried just to reject any request with some log message:
$ cat kamailio/Dockerfile
FROM centos:centos7
RUN yum update -y
RUN yum install -y wget
RUN wget -O /etc/yum.repos.d/kamailio.repo
http://download.opensuse.org/repositories/home:/kamailio:/v5.1.x-rpms/CentOS_7/home:kamailio:v5.1.x-rpms.repo
RUN yum install -y kamailio kamailio-lua
VOLUME /etc/kamailio
ENTRYPOINT ["kamailio", "-DD", "-E"]
$ cat kamailio/config/kamailio.cfg
listen=udp:0.0.0.0:5060
loadmodule "tm.so"
loadmodule "sl.so"
loadmodule "xlog.so"
loadmodule "app_lua.so"
modparam("app_lua", "load", "/etc/kamailio/kamailio.lua")
cfgengine "lua"
$ cat kamailio/config/kamailio.lua
function ksr_request_route()
KSR.log("===== request - from kamailio lua script\n")
KSR.sl.send_reply(503, "Server not configured")
end
Result is:
kamailio_1 | 12(18) CRITICAL: <core> [core/pass_fd.c:277]:
receive_fd(): EOF on 5
kamailio_1 | 0(1) ALERT: <core> [main.c:746]: handle_sigs(): child
process 7 exited by a signal 11
kamailio_1 | 0(1) ALERT: <core> [main.c:749]: handle_sigs(): core
was generated
vms_kamailio_1 exited with code 1
But valid response '503 Server not configured' with commented KSR.log.
So, how to log propertly?
--
WBR,
Eugene Prokopiev
More information about the sr-users
mailing list