The accounting with flags is relying on transaction states, so you have
to create it.
Either use acc_db_request() and acc_log_request() in the config (they
work without creating the transaction in your example) or t_newtran()
before send_reply().
Cheers,
Daniel
On 26/01/15 18:08, Ryan Brindley wrote:
I've been working to try to get kamailio (4.1) to log every
transaction to file, but can't seem to do it -- or even get it to
reliably log. What the heck am i missing?
It seems Kamailio logs the first time i try it on a day, but then
won't do it again no matter what variation of configs I try.
Is it something wrongly configured with flatstore? Permission issues?
Any help/leads/hunches are greatly appreciated.
The following is my truncated test config
#!KAMAILIO
#!define DBURL "flatstore:/var/log/kamailio-acc"
#!define FLT_ACC 1
#!define FLT_ACCMISSED 2
#!define FLT_ACCFAILED 3
(the config and load mod stuff)
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", FLT_ACC)
modparam("acc", "log_missed_flag", FLT_ACCMISSED)
modparam("acc", "log_facility", "LOG_LOCAL2") #confirmed in
Ubuntu
rsyslog LOG_LOCAL2 is configured
modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
modparam("acc", "db_url", DBURL)
modparam("acc", "db_flag", FLT_ACC)
modparam("acc", "db_missed_flag", FLT_ACCMISSED)
request_route {
(non-invite request stuff)
setflag(FLT_ACC);
setflag(FLT_ACCMISSED);
setflag(FLT_ACCFAILED);
send_reply("420", "Test");
exit;
}
Ryan Brindley
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users