[SR-Users] Logging All Transactions

Ryan Brindley ryan at straticsnetworks.com
Mon Jan 26 19:50:21 CET 2015


Yea, confirmed that added t_newtran(); above my setflag(FLT_ACC); line (and
t_release() after the send_reply() line) did not produce a log entry.

Ryan Brindley
Software Development Officer
Stratics Networks, Inc.
1.866.635.6918 x108

On Mon, Jan 26, 2015 at 11:33 AM, Ryan Brindley <ryan at straticsnetworks.com>
wrote:

> Thanks Daniel.
>
> Ive tried with t_newtran (just before the setflag calls) and i don't
> remember it working.
>
> I will try again as well as explicitly calling the requests.
>
> Is there any (major) performance hit by calling the requests explicitly?
> On Jan 26, 2015 11:25 AM, "Daniel-Constantin Mierla" <miconda at gmail.com>
> wrote:
>
>>  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 listsr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> --
>> Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>>
>>
>> _______________________________________________
>> 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
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150126/1caa90f0/attachment.html>


More information about the sr-users mailing list