<div dir="ltr"><div>Hi,</div><div><br></div><div>I'm trying to understand the ACC module, using this minimal configuration below.</div><div>My question is: why is there no cdr created?</div><div>I would have assumed that `do_accounting("log", "cdr|missed|failed");` always saves cdrs, but it doesn't when the call is rejected from inside the configuration script.</div><div>Hope my question is clear. Thanks</div><div><br></div><div><br></div><div>debug_mode=no<br><br>log_level=3<br>xlog_level=3<br>log_stdout=yes<br>log_stderror=yes<br>log_facility=LOG_LOCAL0<br><br>auto_aliases=no<br><br>server_signature=yes<br><br>socket=udp:<a href="http://0.0.0.0:5060">0.0.0.0:5060</a><br>socket=tcp:<a href="http://0.0.0.0:5060">0.0.0.0:5060</a><br><br>tcp_connect_timeout=300<br><br>mpath="/usr/lib64/opensips/modules/"<br><br>loadmodule "signaling.so"<br><br>loadmodule "sl.so"<br><br>loadmodule "tm.so"<br>modparam("tm", "fr_inv_timeout", 120)<br>modparam("tm", "fr_timeout", 30)<br>modparam("tm", "onreply_avp_mode", 1)<br>modparam("tm", "restart_fr_on_each_reply", 0)<br><br>loadmodule "rr.so"<br>modparam("rr", "append_fromtag", 1)<br><br>loadmodule "acc.so"<br>modparam("acc", "early_media", 1)<br>modparam("acc", "report_cancels", 1)<br>modparam("acc", "detect_direction", 1)<br><br>loadmodule "dialog.so"<br>modparam("dialog", "default_timeout", 14400) # 4 hours<br>modparam("dialog", "dlg_match_mode", 1)<br>modparam("dialog", "enable_stats", 0)<br>modparam("dialog", "profiles_with_value", "caller")<br><br>loadmodule "sipmsgops.so"<br><br>loadmodule "proto_udp.so"<br>loadmodule "proto_tcp.so"<br><br>route {<br>Â if (has_totag()) {<br>Â Â if (loose_route()) {<br>Â Â Â if ($DLG_status != NULL && !validate_dialog()) {<br>Â Â Â Â exit;<br>Â Â Â }<br>Â Â } else {<br>Â Â Â if (is_method("ACK")) {<br>Â Â Â Â if (t_check_trans()) {<br>Â Â Â Â Â t_relay();<br>Â Â Â Â }<br>Â Â Â Â exit;<br>Â Â Â }<br>Â Â Â sl_send_reply(404, "Not Found");<br>Â Â Â exit;<br>Â Â }<br>Â Â t_relay();<br>Â Â exit;<br>Â }<br>Â t_check_trans();<br>Â if (is_myself($si)) {<br>Â Â send_reply(406, "Not Acceptable");<br>Â Â exit;<br>Â }<br>Â if (is_method("INVITE")) {<br>Â Â if (!create_dialog("B")) {<br>Â Â Â send_reply(500, "Internal Server Error");<br>Â Â Â exit;<br>Â Â }<br>Â }<br>Â if (loose_route()) {<br>Â Â if (!is_method("ACK")) {<br>Â Â Â sl_send_reply(403, "Preload Route denied");<br>Â Â }<br>Â Â exit;<br>Â }<br>Â if ($rU == NULL) {<br>Â Â send_reply(484, "Address Incomplete");<br>Â Â exit;<br>Â }<br>Â route(relay);<br>}<br><br>route[relay] {<br>Â if (is_method("INVITE")) {<br>Â Â do_accounting("log", "cdr|missed|failed");<br>Â Â sl_send_reply(488, "Not Acceptable Here");<br>Â Â exit;<br>Â }<br>Â if (!t_relay()) {<br>Â Â send_reply(500, "Internal Error");<br>Â }<br>Â exit;<br></div><div>}<br></div></div>