<div>Hello all,</div>
<div> </div>
<div> I've configured Openser 1.2 with accounting + mysql. at the momento i'm only loggin:</div>
<div> </div>
<div>BYE<br>CANCEL<br>INVITE<br>REGISTER</div>
<div> </div>
<div>* How do i identify missed calls? </div>
<div>* Furthermore, Openser doesn't see all INVITES+BYE, so i can't make cdrs!! I've read somewhere that to log all transaction messages i should have "strict route" as oppossed to "loose route". Is that enabled by:
</div>
<div> </div>
<div>modparam("rr", "enable_full_lr", 0)</div>
<div> </div>
<div>??</div>
<div> </div>
<div>Thanks a lot!</div>
<div> </div>
<div>this is my config:</div>
<div> </div>
<div>#<br># sample config file to be used with nathelper/rtpproxy<br>#<br># start RTPProxy with: rtpproxy -l your_public_ip -s udp:localhost:8899<br>#</div>
<div># ----------- global configuration parameters ------------------------</div>
<div>debug=2 # debug level (cmd line: -dddddddddd)<br>fork=yes<br>log_stderror=yes # (cmd line: -E)</div>
<div># Uncomment these lines to enter debugging mode<br>#fork=no<br>#log_stderror=yes</div>
<div><br>check_via=no # (cmd. line: -v)<br>dns=no # (cmd. line: -r)<br>rev_dns=no # (cmd. line: -R)<br>port=5060<br>children=20<br>disable_dns_blacklist=true</div>
<div><br>#</div>
<div># --- module loading</div>
<div>mpath="/usr/lib/openser/modules/"</div>
<div>loadmodule "mysql.so"<br>loadmodule "sl.so"<br>loadmodule "tm.so"<br>loadmodule "rr.so"<br>loadmodule "maxfwd.so"<br>loadmodule "usrloc.so"<br>loadmodule "
registrar.so"<br>loadmodule "textops.so"<br>loadmodule "nathelper.so"<br>loadmodule "auth.so"<br>loadmodule "auth_db.so"<br>loadmodule "mi_fifo.so"<br>loadmodule "
dispatcher.so"<br>#loadmodule "domain.so"<br>loadmodule "xlog.so"<br>loadmodule "/usr/lib/openser/modules/acc.so"</div>
<div>modparam("acc", "early_media", 1)<br>modparam("acc", "report_cancels", 1)</div>
<div>modparam("acc", "db_flag", 2)<br>modparam("acc", "db_url", "mysql://user:password@localhost/openser")<br>modparam("acc", "report_ack", 0)<br>modparam("acc", "db_missed_flag", 3)
<br>modparam("acc", "failed_transaction_flag", 4)<br>modparam("acc", "db_extra", "from_uri=$fu ; to_uri=$tu ; from_user=$fU; source_ip=$si")</div>
<div><br>#<br># CONSTANTS<br>#</div>
<div># --- setting module parameters<br>#modparam("domain","db_url","mysql://user:password@localhost/openser")<br>#modparam("domain", "db_mode", 1)<br>#modparam("domain", "domain_table", "domain")
<br>#modparam("domain", "domain_col", "domain")</div>
<div>modparam("xlog", "buf_size", 8192)</div>
<div># --- setting module parameters<br>modparam("dispatcher", "list_file", "/etc/openser/dispatcher.list")</div>
<div># -- mi_fifo params --<br>modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")</div>
<div>modparam("usrloc|auth_db","db_url","mysql://user:password@localhost/openser")</div>
<div># -- usrloc params --<br>modparam("usrloc", "db_mode", 1)<br>modparam("usrloc", "nat_bflag", 6)<br>#modparam("usrloc", "use_domain", 0)</div>
<div># -- registrar params --<br>modparam("registrar|nathelper", "received_avp", "$avp(i:42)")</div>
<div># -- auth params --<br>modparam("auth_db", "calculate_ha1", yes)<br>modparam("auth_db", "password_column", "password")<br>#modparam("auth_db", "use_domain", 0)
</div>
<div># -- rr params --<br>#modparam("rr", "enable_full_lr", 1)</div>
<div> </div>
<div># -- nathelper<br>modparam("nathelper", "rtpproxy_sock", "udp:<a href="http://1.2.3.5:8899">1.2.3.5:8899</a>")<br>modparam("nathelper", "natping_interval", 30)<br>modparam("nathelper", "ping_nated_only", 1)
<br>modparam("nathelper", "sipping_bflag", 7)<br>modparam("nathelper", "sipping_from", "<a href="mailto:sip:pinger@sip2.telmaxi.com.br">sip:pinger@sip2.telmaxi.com.br</a>")
</div>
<div>#modparam("registrar", "max_contacts", 1)</div>
<div># --- main routing logic<br>route{<br> if (method=="INVITE") {<br> xlog("L_NOTICE", "INVITE MESSAGE RECEIVED - START ACC\n");<br> setflag(2);<br> setflag(3);
<br> setflag(4);<br> };</div>
<div> if (method=="BYE") {<br> xlog ("L_NOTICE", "BYE - STOP ACCOUNTING\n");<br> setflag(2);<br> setflag(3);<br> setflag(4);
<br> };</div>
<div> if (method=="CANCEL") {<br> xlog ("L_NOTICE", "CANCEL - STOP ACCOUNTING\n");<br> setflag(2);<br> setflag(3);<br> setflag(4);
<br> };</div>
<div> if (method=="REGISTER") {<br> setflag(2);<br> setflag(3);<br> setflag(4);<br> };</div>
<div><br> if (!mf_process_maxfwd_header("100")) {<br> sl_send_reply("483","Too Many Hops");<br> exit;<br> };</div>
<div> #if (msg:len >= 2048 ) {<br> # sl_send_reply("513", "Message too big");<br> # exit;<br> #};</div>
<div> # NAT detection<br> route(2);</div>
<div> if (!method=="REGISTER")<br> record_route();</div>
<div> if (loose_route()) {<br> append_hf("P-hint: rr-enforced\r\n");<br> route(1);<br> };</div>
<div> if (!uri==myself) {<br># if (!is_uri_host_local() ) {<br> append_hf("P-hint: outbound\r\n");<br> route(1);<br> };</div>
<div> if (uri==myself) {<br> if (method=="REGISTER") {<br> xlog("L_NOTICE", "\nNew Registration\n");</div>
<div> if (!www_authorize("<a href="http://1.2.3.4">1.2.3.4</a>", "subscriber")) {<br> xlog("L_NOTICE", "\nRegistration FAILED! CLIENT: $au\n");
<br> www_challenge("<a href="http://1.2.3.4">1.2.3.4</a>", "0");<br> exit;<br> };</div>
<div> if (isflagset(5)) {<br> xlog("L_NOTICE", "\nRegistration OK\n");<br> setbflag(6);<br> # if you want OPTIONS natpings uncomment next
<br> # setbflag(7);<br> };<br> save("location");<br> exit;<br> };</div>
<div> if (uri=~"^sip:0"){<br> xlog("L_NOTICE", "\n************** GOT OUTSIDE CALL ************\n");<br> ds_select_dst("1","2");
<br> sl_send_reply("100","Trying");<br> forward();<br> exit();<br> }</div>
<div><br> if (uri=~"^sip:7"){<br> ds_select_dst("1","2");<br> sl_send_reply("100","Trying");<br> forward();
<br> exit();<br> }</div>
<div> if (uri=~"^sip:1"){<br> ds_select_dst("1","2");<br> sl_send_reply("100","Trying");<br> forward();
<br> exit();<br> }</div>
<div> if (!lookup("location")) {<br> sl_send_reply("404", "Not Found");<br> exit;<br> };<br> append_hf("P-hint: usrloc applied\r\n");
<br>#};<br> };</div>
<div> route(1);<br>}</div>
<div><br>route[1] {<br> xlog("L_NOTICE", "\n**************IN ROUTE 1************\n");<br> if (subst_uri('/(sip:.*);nat=yes/\1/')){<br> setbflag(6);<br> };</div>
<div> if (isflagset(5)||isbflagset(6)) {<br> route(3);<br> }</div>
<div> if (!t_relay()) {<br> sl_reply_error();<br> };<br> exit;<br>}</div>
<div>route[2]{<br> force_rport();<br> if (nat_uac_test("19")) {<br> if (method=="REGISTER") {<br> fix_nated_register();<br> } else {<br>
fix_nated_contact();<br> };<br> setflag(5);<br> };<br>}</div>
<div>route[3] {<br> if (is_method("BYE|CANCEL")) {<br> unforce_rtp_proxy();<br> } else if (is_method("INVITE")){<br> force_rtp_proxy();<br> t_on_failure("1");
<br> };<br> if (isflagset(5))<br> search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');<br> t_on_reply("1");<br>}</div>
<div>failure_route[1] {<br> if (isbflagset(6) || isflagset(5)) {<br> unforce_rtp_proxy();<br> }<br>}</div>
<div>onreply_route[1] {<br> if ((isflagset(5) || isbflagset(6)) && status=~"(183)|(2[0-9][0-9])") {<br> force_rtp_proxy();<br> }<br> search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');
</div>
<div> if (isbflagset(6)) {<br> fix_nated_contact();<br> }<br> exit;<br>}</div>
<div> </div>