<div dir="ltr">Any help on trying to figure out what's wrong here would be greatly appreciated. </div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div style="font-family:arial;font-size:small">Ryan Brindley</div><div style="font-family:arial;font-size:small">Software Development Officer</div><div style="font-family:arial;font-size:small">Stratics Networks, Inc.</div><div style="font-family:arial;font-size:small">1.866.635.6918 x108</div></div></div></div>
<br><div class="gmail_quote">On Mon, Jan 26, 2015 at 1:40 PM, Ryan Brindley <span dir="ltr"><<a href="mailto:ryan@straticsnetworks.com" target="_blank">ryan@straticsnetworks.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">acc_db_request did log to the log file, but it didn't provide the resp code and message (first line is a properly working log, 2nd line is the result of acc_db_request):<div><br></div><div><div>INVITE|16||<a href="mailto:16-15065@173.192.77.66" target="_blank">16-15065@173.192.77.66</a>|420|Request Failure|1422031914|||||||||||||||||||||</div><div>INVITE|2||<a href="mailto:2-9800@173.192.77.66" target="_blank">2-9800@173.192.77.66</a>||Some comment|1422300028</div></div></div><div class="gmail_extra"><span class=""><br clear="all"><div><div><div dir="ltr"><div style="font-family:arial;font-size:small">Ryan Brindley</div><div style="font-family:arial;font-size:small">Software Development Officer</div><div style="font-family:arial;font-size:small">Stratics Networks, Inc.</div><div style="font-family:arial;font-size:small"><a href="tel:1.866.635.6918%20x108" value="+18666356918" target="_blank">1.866.635.6918 x108</a></div></div></div></div>
<br></span><div><div class="h5"><div class="gmail_quote">On Mon, Jan 26, 2015 at 12:50 PM, Ryan Brindley <span dir="ltr"><<a href="mailto:ryan@straticsnetworks.com" target="_blank">ryan@straticsnetworks.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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.</div><div class="gmail_extra"><span><font color="#888888"><br clear="all"><div><div><div dir="ltr"><div style="font-family:arial;font-size:small">Ryan Brindley</div><div style="font-family:arial;font-size:small">Software Development Officer</div><div style="font-family:arial;font-size:small">Stratics Networks, Inc.</div><div style="font-family:arial;font-size:small"><a href="tel:1.866.635.6918%20x108" value="+18666356918" target="_blank">1.866.635.6918 x108</a></div></div></div></div></font></span><div><div>
<br><div class="gmail_quote">On Mon, Jan 26, 2015 at 11:33 AM, Ryan Brindley <span dir="ltr"><<a href="mailto:ryan@straticsnetworks.com" target="_blank">ryan@straticsnetworks.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Thanks Daniel. </p>
<p dir="ltr">Ive tried with t_newtran (just before the setflag calls) and i don't remember it working. </p>
<p dir="ltr">I will try again as well as explicitly calling the requests.</p>
<p dir="ltr">Is there any (major) performance hit by calling the requests explicitly?</p><div><div>
<div class="gmail_quote">On Jan 26, 2015 11:25 AM, "Daniel-Constantin Mierla" <<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div 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>On 26/01/15 18:08, Ryan Brindley wrote:<br>
    </div>
    <blockquote 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></fieldset>
      <br>
      <pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a></pre>
  </div>

<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>