<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
I'm trying to enable accounting and missed calls to be written to MySQL
tables.<br>
I edited my ser.cfg file as suggested in the URL:
<a class="moz-txt-link-freetext" href="http://www.iptel.org/ser/doc/seruser/seruser.html#AEN892">http://www.iptel.org/ser/doc/seruser/seruser.html#AEN892</a>, but It still
doesn't write anything in the DB.<br>
What else do I need to do? any clues?<br>
Next I'll show my ser.cfg file where in bold is shown the changes I
made to try to enable accounting.<br>
<br>
Regards,<br>
<br>
Ricardo Carvalho.<br>
<br>
---------------------------------------------------------------------------------------------------------------------------------------<br>
<br>
# my ser.cfg script:<br>
debug=4<br>
fork=no<br>
log_stderror=yes<br>
<br>
listen=192.168.10.91 # put your server IP address here<br>
port=5060<br>
children=4<br>
alias=my.site.com<br>
dns=yes<br>
rev_dns=no<br>
fifo="/tmp/ser_fifo"<br>
fifo_db_url="mysql://ser:heslo@localhost/ser"<br>
<br>
loadmodule "/usr/local/lib/ser/modules/mysql.so"<br>
loadmodule "/usr/local/lib/ser/modules/sl.so"<br>
loadmodule "/usr/local/lib/ser/modules/tm.so"<br>
loadmodule "/usr/local/lib/ser/modules/rr.so"<br>
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"<br>
loadmodule "/usr/local/lib/ser/modules/usrloc.so"<br>
loadmodule "/usr/local/lib/ser/modules/registrar.so"<br>
loadmodule "/usr/local/lib/ser/modules/uri_db.so"<br>
loadmodule "/usr/local/lib/ser/modules/auth.so"<br>
loadmodule "/usr/local/lib/ser/modules/auth_db.so"<br>
<b>loadmodule "/usr/local/lib/ser/modules/acc.so"</b><br>
<br>
modparam("auth_db|uri_db|usrloc", "db_url",
"mysql://ser:heslo@localhost/ser")<br>
modparam("auth_db", "calculate_ha1", 1)<br>
modparam("auth_db", "password_column", "password")<br>
modparam("usrloc", "db_mode", 3)<br>
modparam("rr", "enable_full_lr", 1)<br>
<br>
<br>
# set the reporting log level<br>
<b>modparam("acc", "log_level", 1)</b><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>
<b>modparam("acc", "log_flag", 1 )</b><br>
<br>
<br>
route {<br>
<br>
# -----------------------------------------------------------------<br>
# Sanity Check Section<br>
# -----------------------------------------------------------------<br>
if (!mf_process_maxfwd_header("10")) {<br>
sl_send_reply("483", "Too Many Hops");<br>
break;<br>
};<br>
<br>
if (msg:len > max_len) {<br>
sl_send_reply("513", "Message Overflow");<br>
break;<br>
};<br>
<br>
# -----------------------------------------------------------------<br>
# Record Route Section<br>
# -----------------------------------------------------------------<br>
if (method!="REGISTER") {<br>
record_route();<br>
};<br>
<br>
# -----------------------------------------------------------------<br>
# Loose Route Section<br>
# -----------------------------------------------------------------<br>
if (loose_route()) {<br>
route(1);<br>
break;<br>
};<br>
<br>
<br>
# labeled all transaction for accounting:<br>
<b> setflag(1);</b><br>
<br>
<br>
# -----------------------------------------------------------------<br>
# Call Type Processing Section<br>
# -----------------------------------------------------------------<br>
if (uri!=myself) {<br>
route(1);<br>
break;<br>
};<br>
<br>
if (method=="ACK") {<br>
route(1);<br>
break;<br>
} else if (method=="INVITE") {<br>
route(3);<br>
break;<br>
} else if (method=="REGISTER") {<br>
route(2);<br>
break;<br>
};<br>
<br>
lookup("aliases");<br>
if (uri!=myself) {<br>
route(1);<br>
break;<br>
};<br>
<br>
if (!lookup("location")) {<br>
sl_send_reply("404", "User Not Found");<br>
break;<br>
};<br>
<br>
route(1);<br>
}<br>
<br>
route[1] {<br>
<br>
# -----------------------------------------------------------------<br>
# Default Message Handler<br>
# -----------------------------------------------------------------<br>
if (!t_relay()) {<br>
sl_reply_error();<br>
};<br>
}<br>
<br>
route[2] {<br>
<br>
# -----------------------------------------------------------------<br>
# REGISTER Message Handler<br>
# ----------------------------------------------------------------<br>
sl_send_reply("100", "Trying");<br>
<br>
if (!www_authorize("","subscriber")) {<br>
www_challenge("","0");<br>
break;<br>
};<br>
<br>
if (!check_to()) {<br>
sl_send_reply("401", "Unauthorized");<br>
break;<br>
};<br>
<br>
consume_credentials();<br>
<br>
if (!save("location")) {<br>
sl_reply_error();<br>
};<br>
}<br>
<br>
route[3] {<br>
# -----------------------------------------------------------------<br>
# INVITE Message Handler<br>
# -----------------------------------------------------------------<br>
if (!proxy_authorize("","subscriber")) {<br>
proxy_challenge("","0");<br>
break;<br>
} else if (!check_from()) {<br>
sl_send_reply("403", "Use From=ID");<br>
break;<br>
};<br>
<br>
consume_credentials();<br>
<br>
lookup("aliases");<br>
if (uri!=myself) {<br>
route(1);<br>
break;<br>
};<br>
<br>
if (!lookup("location")) {<br>
sl_send_reply("404", "User Not Found");<br>
break;<br>
};<br>
<br>
route(1);<br>
}<br>
<br>
<br>
</body>
</html>