Hey guys, I am trying to setup a cdr storehouse off of my main routing server. <br>I send invites and byes to the server but the accounting module just refuses to record anything. <br><br>I am wondering if I need to satisfy some requirement other then setting flags for acc to record messages.<br>
<br>Here is the config on my cdr server:<br>#set module path<br>mpath="/usr/lib/opensips/<div id=":1ve" class="ii gt">modules/"<br><br>/* uncomment next line for MySQL DB support */<br>loadmodule "db_mysql.so"<br>
loadmodule "tm.so"<br>
loadmodule "acc.so"<br>loadmodule "sl.so"<br>loadmodule "maxfwd.so"<br>loadmodule "rr.so"<br>loadmodule "xlog.so"<br>loadmodule "textops.so"<br><br><br># ----------------- setting module-specific parameters ---------------<br>
<br><br><br># ----- acc params -----<br># -- acc params --<br># set the reporting log level<br>modparam("acc", "log_level", 1)<br># number of flag, which will be used for accounting; if a message is<br>
# labeled with this flag, its completion status will be reported<br>modparam("acc", "log_flag", 1 )<br><br><br>/* what sepcial events should be accounted ? */<br>/*<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>modparam("acc", "db_flag", 1)<br>modparam("acc", "db_missed_flag", 2)<br><br>modparam("acc", "db_extra", "from_uri=$fu; to_uri=$tu")<br>
modparam("acc", "db_url", "mysql://opensips:opensipsrw@localhost/opensips" )<br>*/<br><br>####### Routing Logic ########<br><br><br># main request routing logic<br><br>route{<br> xlog( "Received a message" );<br>
<br> /* ********* ROUTINE CHECKS ********************************** */<br><br> # filter too old messages<br> if (!mf_process_maxfwd_header("10")) {<br> log("LOG: Too many hops\n");<br>
sl_send_reply("483","Too Many Hops");<br> exit;<br> };<br> if (msg:len >= 2048 ) {<br> sl_send_reply("513", "Message too big");<br> exit;<br>
};<br>
<br> if (is_method("BYE")) {<br> xlog( "bye message" );<br> setflag(1); # do accounting ...<br> setflag(3); # ... even if the transaction fails<br> } <br><br> # account only INVITEs<br>
if (is_method("INVITE")) {<br> xlog( "invite message" );<br> setflag(1); # do accounting<br> }<br> <br> <br> setflag(2);<br> <br> xlog( "done" );<br><br> exit;<br>
}<br><br>I
have tried sending messages by append_branch and send, and from packet
captures and xlog I know the flags are being set, but the acc module
does not record the message in syslog or the database<br><br>Thanks for any pointers</div>