<html>
<body>
<br>
Hi all!<br><br>
Im also receiving this error message.<br><br>
Can somebody help us on how to make accounting work using mysql.<br><br>
thanks,<br>
ed<br><br>
At 06:01 AM 4/26/2005, Leon Sun wrote:<br>
<blockquote type=cite class=cite cite=""><font face="arial" size=2>Hi,
<br>
I am using 0.8.12 in Fedora 3. I tried to log account info into Mysql
followed instruction from manual. I found, first,
“modparam("acc", "db_url",
"sql://ser:heslo@localhost/ser")” coudnlt work at all in
ser.cfg. If I enabled in cfg file, it showed “Starting ser: ERROR:
bad config file (1 errors)”<br>
<br>
If I disabled it, SER worked fine but I couldn’t see any record in ‘acc’
table. <br>
<br>
<b>Would anyone suggest how to put call records into Mysql? <br>
</b> <br>
Thank you.<br>
<br>
<br>
<br>
# ----------- global configuration parameters
------------------------<br>
<br>
#debug=3 # debug level
(cmd line: -dddddddddd)<br>
#fork=yes<br>
#log_stderror=no # (cmd line:
-E)<br>
<br>
/* Uncomment these lines to enter debugging mode<br>
debug=7<br>
fork=no<br>
log_stderror=yes<br>
*/<br>
<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=4<br>
fifo="/tmp/ser_fifo"<br>
<br>
# ------------------ module loading
----------------------------------<br>
<br>
# Uncomment this if you want to use SQL database<br>
loadmodule "/usr/lib/ser/modules/mysql.so"<br>
<br>
loadmodule "/usr/lib/ser/modules/acc.so"<br>
loadmodule "/usr/lib/ser/modules/sl.so"<br>
loadmodule "/usr/lib/ser/modules/tm.so"<br>
loadmodule "/usr/lib/ser/modules/rr.so"<br>
loadmodule "/usr/lib/ser/modules/maxfwd.so"<br>
loadmodule "/usr/lib/ser/modules/usrloc.so"<br>
loadmodule "/usr/lib/ser/modules/registrar.so"<br>
<br>
# Uncomment this if you want digest authentication<br>
# mysql.so must be loaded !<br>
loadmodule "/usr/lib/ser/modules/auth.so"<br>
loadmodule "/usr/lib/ser/modules/auth_db.so"<br>
<br>
# ----------------- setting module-specific parameters
---------------<br>
<br>
#<b>modparam("acc", "db_url",
"sql://ser:heslo@localhost/ser")<br>
</b> <br>
# -- usrloc params --<br>
<br>
#modparam("usrloc", "db_mode", 0)<br>
<br>
# Uncomment this if you want to use SQL database<br>
# for persistent storage and comment the previous line<br>
modparam("usrloc", "db_mode", 2)<br>
<br>
# -- auth params --<br>
# Uncomment if you are using auth module<br>
#<br>
modparam("auth_db", "calculate_ha1", yes)<br>
#<br>
# If you set "calculate_ha1" parameter to yes (which true in
this config),<br>
# uncomment also the following parameter)<br>
#<br>
modparam("auth_db", "password_column",
"password")<br>
<br>
# -- rr params --<br>
# add value to ;lr param to make some broken UAs happy<br>
modparam("rr", "enable_full_lr", 1)<br>
<br>
<br>
modparam("acc","log_level",1)<br>
modparam("acc","log_flag",1)<br>
# ------------------------- request routing logic
-------------------<br>
<br>
# main routing logic<br>
<br>
route{<br>
<br>
# initial sanity checks --
messages with<br>
# max_forwards==0, or
excessively long requests<br>
if
(!mf_process_maxfwd_header("10")) {<br>
sl_send_reply("483","Too Many Hops");<br>
break;<br>
};<br>
if ( msg:len > max_len )
{<br>
sl_send_reply("513", "Message too big");<br>
break;<br>
};<br>
<br>
# we record-route all messages
-- to make sure that<br>
# subsequent messages will go
through our proxy; that's<br>
# particularly good if
upstream and downstream entities<br>
# use different transport
protocol<br>
record_route();<br>
# loose-route processing<br>
if (loose_route()) {<br>
if (method=="BYE") {<br>
setflag(1);<br>
setflag(2);<br>
}<br>
<br>
t_relay();<br>
<br>
break;<br>
};<br>
<br>
#labeled all transaction for
accounting<br>
setflag(1);<br>
setflag(2);<br>
<br>
if
(method=="CANCEL"){<br>
t_relay();<br>
};<br>
<br>
# (in case, it does not work,
use the following command<br>
# with proper names and
addresses in it)<br>
<br>
<br>
if (uri==myself) {<br>
<br>
# This for PSTN destination<br>
<br>
if (uri=~"^sip:1")<br>
<br>
{
rewritehost("10.10.10.10");<br>
forward(10.10.10.10,5060);<br>
break;<br>
}<br>
if (method=="REGISTER") {<br>
<br>
# Uncomment this if you want to use digest authentication<br>
if (!www_authorize("sip.mycommunications.com",
"subscriber")) {<br>
www_challenge("sip.mycommunications.com", "0");<br>
break;<br>
};<br>
<br>
save("location");<br>
break;<br>
};<br>
<br>
# native SIP destinations are handled using our USRLOC DB<br>
if (!lookup("location")) {<br>
sl_send_reply("404", "Not Found");<br>
break;<br>
};<br>
};<br>
# forward to current uri now;
use stateful forwarding; that<br>
# works reliably even if we
forward from TCP to UDP<br>
if (!t_relay()) {<br>
sl_reply_error();<br>
};<br>
<br>
}<br>
</font>_______________________________________________<br>
Serusers mailing list<br>
serusers@lists.iptel.org<br>
<a href="http://lists.iptel.org/mailman/listinfo/serusers" eudora="autourl">
http://lists.iptel.org/mailman/listinfo/serusers</a></blockquote></body>
</html>