Hello <br><br>better use these function <br><br>acc_db_request("200","acc");<br><br><div><span class="gmail_quote">On 4/11/07, <b class="gmail_sendername">Tanguy Bouzéloc</b> <<a href="mailto:tbouzeloc@init-sys.com">
tbouzeloc@init-sys.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello,<br><br>I've some issues with my mysql accounting, I can only log successful
<br>calls in the acc table and I've no informations about missed calls. In<br>mysql accounting I've only sip 200 ok and no errors. I've not this<br>behavior in my syslog.<br><br>It's very important for us for evaluate the performance of our providers
<br>and we can only do it with a database accouting.<br><br>For example, If I pass a call and I let it ring til operator timeout,<br>I've no trace of this call in the accounting table.<br><br>I've also another question, the lcr and gw tables have very small fixed
<br>limits (256 for lcr and 32 for gw), since we have much more gateways and<br>sdas I've updated theses limits to a value which fit our needs, do you<br>thinks it can be a problem ?<br><br>Thanks in advance,<br><br>Tanguy Bouzéloc
<br>Init-Sys<br><br><br># ----------- global configuration parameters ------------------------<br><br>#debug=9<br>fork=yes<br>check_via=no<br>dns=no<br>rev_dns=no<br>port=5060<br>children=4<br>sip_warning=0<br><br># ------------------ module loading ----------------------------------
<br><br>loadmodule "/usr/lib/openser/modules/mysql.so"<br>loadmodule "/usr/lib/openser/modules/nathelper.so"<br>loadmodule "/usr/lib/openser/modules/sl.so"<br>loadmodule "/usr/lib/openser/modules/tm.so"
<br>loadmodule "/usr/lib/openser/modules/rr.so"<br>loadmodule "/usr/lib/openser/modules/maxfwd.so"<br>loadmodule "/usr/lib/openser/modules/lcr.so"<br>loadmodule "/usr/lib/openser/modules/acc.so"
<br>loadmodule "/usr/lib/openser/modules/xlog.so"<br>loadmodule "/usr/lib/openser/modules/textops.so"<br>loadmodule "/usr/lib/openser/modules/permissions.so"<br><br># ----------------- setting module-specific parameters ---------------
<br><br>modparam("lcr", "db_url", "mysql://???")<br>modparam("lcr", "db_mode", 0)<br><br>modparam("rr","enable_full_lr",1)<br><br>modparam("acc", "db_url", "mysql://???")
<br>modparam("acc", "db_flag", 1)<br>modparam("acc", "db_localtime", 1)<br>modparam("acc", "log_level", 1)<br>modparam("acc", "log_flag", 1 )
<br><br>modparam("permissions", "db_url", "mysql://???")<br><br>route {<br><br> if (!mf_process_maxfwd_header("10")) {<br> sl_send_reply("483","Too Many Hops");
<br> return;<br> };<br><br> if (msg:len >= max_len ) {<br> sl_send_reply("513", "Message too big");<br> return;<br> };<br><br> if (!is_method("REGISTER")) {
<br> record_route();<br> };<br><br><br> if (is_method("BYE") || is_method("CANCEL")) {<br> xlog("L_NOTICE", "End call($ci | $Ri): $fU -> $tU");
<br> if (is_method("BYE"))<br> setflag(1);<br> unforce_rtp_proxy();<br> };<br><br> if (loose_route()) {<br> route(1);<br> return;
<br> };<br><br> if (!allow_trusted()) {<br> xlog("L_WARN", "Host not trusted ($fu/$si/$rP)");<br> sl_send_reply("403", "Forbidden");<br> exit;
<br> };<br><br> if (!load_gws()) {<br> sl_send_reply("500", "Internal server error, unable to load gateways");<br> return;<br> }<br><br> if (!next_gw()) {
<br> xlog("L_ERR", "No gw found ($ru/$fu)");<br> sl_send_reply("503", "Service not available, no gateways found");<br> return;<br> };
<br><br> t_on_failure("2");<br><br> route(1);<br>}<br><br>route[1] {<br> setflag(1);<br><br> if (is_method("INVITE") || is_method("ACK")){<br> if (is_method("INVITE"))
<br> xlog("L_NOTICE", "Incoming call($ci | $Ri): $fU -> $tU");<br> if (!search("^Content-Length:[ ]*0"))<br> force_rtp_proxy("foc");
<br><br># if(src_ip == <a href="http://217.15.85.178">217.15.85.178</a>) {<br># subst('/^From:.*<sip:(.*)@(.*)$/From: "\1" <sip:\1/@\2');<br># }<br>
<br> t_on_reply("1");<br> };<br><br> if (!t_relay()) {<br> sl_reply_error();<br> };<br>}<br><br>onreply_route[1] {<br> setflag(1);<br> if (status=~"[12][0-9][0-9]"){
<br> if (!search("^Content-Length:[ ]*0"))<br> force_rtp_proxy("foc");<br> };<br>}<br><br>failure_route[2] {<br><br> if (t_check_status("400")) {
<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 400 Bad Request");<br> } else if (t_check_status("401")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 401 Unauthorized");
<br> } else if (t_check_status("403")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 403 Forbidden");<br> } else if (t_check_status("404")) {
<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 404 Not Found");<br> } else if (t_check_status("405")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 405 Method Not Allowed");
<br> } else if (t_check_status("406")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 406 Not Acceptable");<br> } else if (t_check_status("407")) {
<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 407 Proxy Authentication Required");<br> } else if (t_check_status("408")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 408 Request Timeout");
<br> } else if (t_check_status("410")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 410 Gone");<br> } else if (t_check_status("413")) {
<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 413 Request Entity Too Large");<br> } else if (t_check_status("414")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 414 Request-URI Too Long");
<br> } else if (t_check_status("415")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 415 Unsupported Media Type");<br> } else if (t_check_status("416")) {
<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 416 Unsupported URI Scheme");<br> } else if (t_check_status("420")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 420 Bad Extension");
<br> } else if (t_check_status("421")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 421 Extension Required");<br> } else if (t_check_status("423")) {
<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 423 Interval Too Brief");<br> } else if (t_check_status("480")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 480 Temporarily Unavailable");
<br> } else if (t_check_status("481")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 481 Call/Transaction Does Not Exist");<br> } else if (t_check_status("482")) {
<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 482 Loop Detected");<br> } else if (t_check_status("483")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 483 Too Many Hops");
<br> } else if (t_check_status("484")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 484 Address Incomplete");<br> } else if (t_check_status("485")) {
<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 485 Ambiguous");<br> } else if (t_check_status("486")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 486 Busy Here");
<br> } else if (t_check_status("487")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 487 Request Terminated");<br> } else if (t_check_status("488")) {
<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 488 Not Acceptable Here");<br> } else if (t_check_status("491")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 491 Request Pending");
<br> } else if (t_check_status("493")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 493 Undecipherable");<br> } else if (t_check_status("500")) {
<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 500 Server Internal Error");<br> } else if (t_check_status("501")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 501 Not Implemented");
<br> } else if (t_check_status("502")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 502 Bad Gateway");<br> } else if (t_check_status("503")) {
<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 503 Service Unavailable");<br> } else if (t_check_status("504")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 504 Server Time-out");
<br> } else if (t_check_status("505")) {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 505 Version Not Supported");<br> } else if (t_check_status("513")) {
<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU 513 Message Too Large");<br> } else {<br> xlog("L_NOTICE", "Failure call($ci | $Ri): $fU -> $tU Unknown code");
<br> }<br><br> setflag(1);<br><br> if (is_method("INVITE") && t_check_status("408|500|503")) {<br> if (!next_gw()) {<br> xlog("L_ERR", "No more gw ($ru/$fu)");
<br> t_reply("486", "Busy");<br># t_reply("503", "Service not available");<br> exit;<br> }<br> t_on_failure("2");
<br> force_rtp_proxy("foc");<br> t_relay();<br> }<br>}<br><br><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@openser.org">
Users@openser.org</a><br><a href="http://openser.org/cgi-bin/mailman/listinfo/users">http://openser.org/cgi-bin/mailman/listinfo/users</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>Thanks and Regards<br>Ravi Prakash Sunkara                
<br><a href="mailto:ravi.sunkara@hyperion-tech.com">ravi.sunkara@hyperion-tech.com</a>         <br>M:+91 9985077535<br><a href="http://www.hyperion-tech.com">www.hyperion-tech.com</a><br>Client and Parent company :- <a href="http://www.august-networks.com">
www.august-networks.com</a>