Hi,
I am writing only to finish this thread. I managed to make the cdr logging work. As I thought it was all about flags. The missing piece of information for me was that there is a need to set dialog flag for incoming invites:
#!define FLD_DLG 4 modparam("dialog", "dlg_flag", FLD_DLG) if (is_method("INVITE")) { setflag(FLT_ACC); # do accounting setflag(FLD_DLG); # <---- this one was missing
If I may suggest, adding this information to acc module documentation would be great.
Thanks everyone for support.
Regards, Jan
Hello,
database would be perfect, but the file is ok as well.
Right now, I have accounting in syslog only and I think this is because they are just transaction logs, ie.
acc_log_request(): ACC: transaction answered: timestamp=1601877602;method=BYE
I got also some missed calls, but no answered ones.
Thank you, Regards, Jan
On 05. 10. 20 11:09, Daniel-Constantin Mierla wrote:
Hello,
do you want dialog-based cdrs to both database and syslog? Or just to database, but you get them in syslog only?
Cheers,
Daniel
On 04.10.20 11:08, Jan Rozhon wrote:
Guys thank you, by trial and error, I got the solution to logging to syslog. On this one particular machine, I also have to add the following line BEFORE the actual definition of local7 output:
/etc/rsyslog.conf
local7.none /var/log/syslogSo I guess, this is not related to kamailio, rather it has something to do with particular rsyslog/systemd version.
Where I am stuck, however, is the CDR logging. I went through the acc module documentation and see no reason why it is not logging to database or ignores cdr_facility.
My tip is, I am missing something with the flags, but cant find out what it is. That would explain acc messages in syslog (only transaction-based) and empty cdr.log/acc_cdrs table for dialog-based cdrs. In case of default kamailio.cfg (with the dialog module loaded and acc module settings as previously mentioned), do I need to set any special flags to get dialog-based cdrs?
Thank you, once again. Regards, Jan
Dne 03.10.2020 v 22:31 Joel Serrano napsal(a):
Make sure it’s not systemd who is logging there and not kamailio...
On Sat, Oct 3, 2020 at 10:19 Henning Westerholt <hw@skalatan.de> wrote:
Hello,
Strange problem. If you tried the obvious stuff already (like rebooting etc..) I would try with "logger" to reproduce the problem, to see if its something related to kamailio or the logging system/machine.
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com
-----Original Message-----
From: sr-users <sr-users-bounces@lists.kamailio.org> On Behalf Of Jan Rozhon
Sent: Wednesday, September 30, 2020 9:35 AM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] Logging problem
Hi,
sorry for quite stupid and newbie questions, but I am out of ideas.
1. On one of my Debian 10 servers I am unable to stop logging kamailio messages to /var/log/syslog. It is funny, because I have 3 more servers where it works but on this one, it doesnt and no matter what I try it still keeps sending logs to syslog (and to the file configured).
My related configs:
/etc/kamailio/kamailio.cfg
log_stderror=no
log_facility=LOG_LOCAL7
/etc/rsyslog.conf
local6.* /var/log/kamailio/cdr.log
local7.* /var/log/kamailio/kamailio.log
/etc/rsyslog.d/kamailio.conf
if $programname contains 'kamailio' then /var/log/kamailio/kamailio.log & stop
/etc/systemd/system/multi-user.target.wants/kamailio.service
SyslogIdentifier=kamailio
2. It is probably related to 1. I am unable to get the CDRs logged to anything else but /var/log/syslog. I tried database (nothing) and setting cdr_facility and again nothing. It just keeps sending everything to /var/log/syslog.
Related configs:
modparam("acc", "cdr_enable", 1)
modparam("acc", "cdrs_table", "acc_cdrs") modparam("acc", "cdr_facility", "LOG_LOCAL6")
Example output in syslog file:
Sep 30 09:21:41 sip2 /usr/sbin/kamailio[1151]: NOTICE: {2 21 INVITE ZPZI7Hqytw} acc [acc.c:279]: acc_log_request(): ACC: call missed:
timestamp=1601450501;method=INVITE;from_tag=1GH5hGQxN;to_tag=QwcYFet;call_id=ZPZI7Hqytw;code=486;reason=Busy
here;src_user=XXXXXXXXX;
Is there something trivial I am missing?
Thank you. Regards, Jan
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users-- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda Funding: https://www.paypal.me/dcmierla