This is the part where the ACC module is setup:<br><br>...<br># ----- acc params -----<br>/* what sepcial events should be accounted ? */<br>modparam("acc", "early_media", 1)<br>modparam("acc", "report_ack", 1)<br>
modparam("acc", "report_cancels", 1)<br>/* by default ww do not adjust the direct of the sequential requests.<br> if you enable this parameter, be sure the enable "append_fromtag"<br> in "rr" module */<br>
modparam("acc", "detect_direction", 0)<br>/* account triggers (flags) */<br>modparam("acc", "failed_transaction_flag", 3)<br>modparam("acc", "log_flag", 1)<br>modparam("acc", "log_missed_flag", 2)<br>
/* uncomment the following lines to enable DB accounting also */<br>modparam("acc", "db_flag", 1)<br>modparam("acc", "db_missed_flag", 2)<br>modparam("acc", "db_url", "mysql://opensips:opensipsrw@localhost/opensips") #Pointer to the DB<br>
modparam("acc", "db_extra", "caller_id=$fu; callee_id=$tu")<br>...<br><br><br>and this is the part where the INVITE for an initial request is handled...<br><br>...<br> # record routing<br>
if (!is_method("REGISTER|MESSAGE"))<br> record_route();<br><b><br> # account only INVITEs<br> xlog("mozaa - about to check if it's an INVITE...");<br> if (is_method("INVITE")) {<br>
xlog("mozaa - yes, it is. Setting flag");<br> setflag(1); # do accounting<br> }<br> xlog("mozaa - INVITE check done");</b><br><br> if (!uri==myself)<br>
## replace with following line if multi-domain support is used<br> ##if (!is_uri_host_local())<br> {<br> append_hf("P-hint: outbound\r\n"); <br>...<br><br>...and these are the traces being written to the log:<br>
<br>...<br>Nov 10 16:18:04 s18 /opt/opensipsnotls/sbin/opensips[8997]: mozaa - about to check if it's an INVITE...<br>Nov 10 16:18:04 s18 /opt/opensipsnotls/sbin/opensips[8997]: DBG:core:pv_printf: final buffer length 32<br>
Nov 10 16:18:04 s18 /opt/opensipsnotls/sbin/opensips[8997]: mozaa - yes, it is. Setting flag<br>Nov 10 16:18:04 s18 /opt/opensipsnotls/sbin/opensips[8997]: DBG:core:pv_printf: final buffer length 25<br>Nov 10 16:18:04 s18 /opt/opensipsnotls/sbin/opensips[8997]: mozaa - INVITE check done<br>
...<br><br><div class="gmail_quote">On Wed, Nov 10, 2010 at 4:02 PM, Brett Nemeroff <span dir="ltr"><<a href="mailto:brett@nemeroff.com">brett@nemeroff.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><div>On Wed, Nov 10, 2010 at 5:16 AM, David Santiago <span dir="ltr"><<a href="mailto:david.santiago@almiralabs.com" target="_blank">david.santiago@almiralabs.com</a>></span> wrote:</div></div><div>
<div class="gmail_quote">
<div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Modified... and still no records in the ACC table nor errors in the syslog (although I have set the debug level to 9).<div><div></div><div><br></div></div></blockquote><div><br></div></div>Are you sure you are looking at the right logs? Put some xlogs into your code and be sure they show up as well. <div>
<br></div><div>If you have acc loaded up, the db params set **and the db flag set during the INVITE**, you should either get an acc record or an error while debug is up.</div><div><br></div><div>I've seen cases where depending on configuration and linux distro that it's tricky to tell which logfile is being written to. Or rather, perhaps it's not being written to the log you're expecting.</div>
<div><br></div><div>-Brett</div><div> </div></div></div>
</blockquote></div><br>