<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
The accounting with flags is relying on transaction states, so you
have to create it.<br>
<br>
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().<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<br>
<div class="moz-cite-prefix">On 26/01/15 18:08, Ryan Brindley wrote:<br>
</div>
<blockquote
cite="mid:CAPW0Xzp13UOwXm7cJWrpCL=xPARqmj2THRpW5aGMKK87XQ9ahw@mail.gmail.com"
type="cite">
<p dir="ltr">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?</p>
<p dir="ltr">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. </p>
<p dir="ltr">Is it something wrongly configured with flatstore?
Permission issues? Any help/leads/hunches are greatly
appreciated. </p>
<p dir="ltr">The following is my truncated test config</p>
<p dir="ltr">#!KAMAILIO</p>
<p dir="ltr">#!define DBURL "flatstore:/var/log/kamailio-acc"<br>
#!define FLT_ACC 1<br>
#!define FLT_ACCMISSED 2<br>
#!define FLT_ACCFAILED 3</p>
<p dir="ltr">(the config and load mod stuff)</p>
<p dir="ltr">modparam("acc", "log_level", 1)<br>
modparam("acc", "log_flag", FLT_ACC)<br>
modparam("acc", "log_missed_flag", FLT_ACCMISSED)<br>
modparam("acc", "log_facility", "LOG_LOCAL2") #confirmed in
Ubuntu rsyslog LOG_LOCAL2 is configured<br>
modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)<br>
modparam("acc", "db_url", DBURL)<br>
modparam("acc", "db_flag", FLT_ACC)<br>
modparam("acc", "db_missed_flag", FLT_ACCMISSED)</p>
<p dir="ltr">request_route {</p>
<p dir="ltr"> (non-invite request stuff)</p>
<p dir="ltr"> setflag(FLT_ACC);<br>
setflag(FLT_ACCMISSED);<br>
setflag(FLT_ACCFAILED);</p>
<p dir="ltr"> send_reply("420", "Test");<br>
exit;</p>
<p dir="ltr">}</p>
<p dir="ltr">Ryan Brindley<br>
</p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
</body>
</html>