<html>
<body>
<br>
Hi Kofi!<br><br>
got it.. thanks for immediate feedback .. however my accounting is not
working.<br>
any parameters to be added to make it work..<br><br>
I have the following info already on my ser.cfg<br><br>
modparam("acc", "log_level", 1)<br>
modparam("acc", "log_flag", 1)<br>
modparam("acc", "log_missed_flag", 3)<br><br>
<br>
record_route(); -> its this a parameter for accounting<br><br>
thanks,<br>
ed<br><br>
<br>
At 08:32 AM 4/26/2005, Kofi Obiri-Yeboah wrote:<br>
<blockquote type=cite class=cite cite="">
<font face="arial" size=2 color="#0000FF">I think the correct modparam
statement should read as follows:<br>
</font><font face="arial" size=2><b>modparam("acc",
"db_url", "mysql://ser:heslo@localhost/ser")<br>
</b></font> <br>
<font face="arial" size=2><b>please note that "my" is required
in front of sql<br>
</b></font> <br>
<font face="arial" size=2><b>and not:<br>
modparam("acc", "db_url",
"sql://ser:heslo@localhost/ser")</b></font>
<font face="arial" size=2 color="#0000FF"><br><br>
</font>
<dl>
<dd><font face="tahoma" size=2>-----Original Message-----<br>
<dd>From:</b> serusers-bounces@lists.iptel.org
[<a href="mailto:serusers-bounces@lists.iptel.org" eudora="autourl">
mailto:serusers-bounces@lists.iptel.org</a>]On Behalf Of </b>Edgardo O.
Gonzales II<br>
<dd>Sent:</b> Monday, April 25, 2005 5:20 PM<br>
<dd>To:</b> serusers@lists.iptel.org<br>
<dd>Subject:</b> Re: [Serusers] ACC into mysql<br><br>
</font><br>
<dd>Hi all!<br><br>
<dd>Im also receiving this error message.<br><br>
<dd>Can somebody help us on how to make accounting work using
mysql.<br><br>
<dd>thanks,<br>
<dd>ed<br><br>
<dd>At 06:01 AM 4/26/2005, Leon Sun wrote:<br>
<blockquote type=cite class=cite cite="">
<dd><font face="arial" size=2>Hi, <br>
<dd>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>
<dd> <br>
<dd>If I disabled it, SER worked fine but I couldnt see any record in acc
table. <br>
<dd> <br>
<dd>Would anyone suggest how to put call records into Mysql? <br>
</b>
<dd> <br>
<dd>Thank you.<br>
<dd> <br>
<dd> <br>
<dd> <br>
<dd># ----------- global configuration parameters
------------------------<br>
<dd> <br>
<dd>#debug=3 # debug
level (cmd line: -dddddddddd)<br>
<dd>#fork=yes<br>
<dd>#log_stderror=no # (cmd
line: -E)<br>
<dd> <br>
<dd>/* Uncomment these lines to enter debugging mode<br>
<dd>debug=7<br>
<dd>fork=no<br>
<dd>log_stderror=yes<br>
<dd>*/<br>
<dd> <br>
<dd>check_via=no # (cmd. line: -v)<br>
<dd>dns=no #
(cmd. line: -r)<br>
<dd>rev_dns=no # (cmd. line: -R)<br>
<dd>#port=5060<br>
<dd>#children=4<br>
<dd>fifo="/tmp/ser_fifo"<br>
<dd> <br>
<dd># ------------------ module loading
----------------------------------<br>
<dd> <br>
<dd># Uncomment this if you want to use SQL database<br>
<dd>loadmodule "/usr/lib/ser/modules/mysql.so"<br>
<dd> <br>
<dd>loadmodule "/usr/lib/ser/modules/acc.so"<br>
<dd>loadmodule "/usr/lib/ser/modules/sl.so"<br>
<dd>loadmodule "/usr/lib/ser/modules/tm.so"<br>
<dd>loadmodule "/usr/lib/ser/modules/rr.so"<br>
<dd>loadmodule "/usr/lib/ser/modules/maxfwd.so"<br>
<dd>loadmodule "/usr/lib/ser/modules/usrloc.so"<br>
<dd>loadmodule "/usr/lib/ser/modules/registrar.so"<br>
<dd> <br>
<dd># Uncomment this if you want digest authentication<br>
<dd># mysql.so must be loaded !<br>
<dd>loadmodule "/usr/lib/ser/modules/auth.so"<br>
<dd>loadmodule "/usr/lib/ser/modules/auth_db.so"<br>
<dd> <br>
<dd># ----------------- setting module-specific parameters
---------------<br>
<dd> <br>
<dd>#modparam("acc", "db_url",
"sql://ser:heslo@localhost/ser")<br>
</b>
<dd> <br>
<dd># -- usrloc params --<br>
<dd> <br>
<dd>#modparam("usrloc", "db_mode",
0)<br>
<dd> <br>
<dd># Uncomment this if you want to use SQL database<br>
<dd># for persistent storage and comment the previous line<br>
<dd>modparam("usrloc", "db_mode", 2)<br>
<dd> <br>
<dd># -- auth params --<br>
<dd># Uncomment if you are using auth module<br>
<dd>#<br>
<dd>modparam("auth_db", "calculate_ha1", yes)<br>
<dd>#<br>
<dd># If you set "calculate_ha1" parameter to yes (which true
in this config),<br>
<dd># uncomment also the following parameter)<br>
<dd>#<br>
<dd>modparam("auth_db", "password_column",
"password")<br>
<dd> <br>
<dd># -- rr params --<br>
<dd># add value to ;lr param to make some broken UAs happy<br>
<dd>modparam("rr", "enable_full_lr", 1)<br>
<dd> <br>
<dd> <br>
<dd>modparam("acc","log_level",1)<br>
<dd>modparam("acc","log_flag",1)<br>
<dd># ------------------------- request routing logic
-------------------<br>
<dd> <br>
<dd># main routing logic<br>
<dd> <br>
<dd>route{<br>
<dd> <br>
<dd> # initial sanity checks --
messages with<br>
<dd> # max_forwards==0, or
excessively long requests<br>
<dd> if
(!mf_process_maxfwd_header("10")) {<br>
<dd>
sl_send_reply("483","Too Many Hops");<br>
<dd>
break;<br>
<dd> };<br>
<dd> if ( msg:len > max_len
) {<br>
<dd>
sl_send_reply("513", "Message too big");<br>
<dd>
break;<br>
<dd> };<br>
<dd> <br>
<dd> # we record-route all
messages -- to make sure that<br>
<dd> # subsequent messages will
go through our proxy; that's<br>
<dd> # particularly good if
upstream and downstream entities<br>
<dd> # use different transport
protocol<br>
<dd> record_route();<br>
<dd> # loose-route
processing<br>
<dd> if (loose_route()) {<br>
<dd>
if (method=="BYE") {<br>
<dd>
setflag(1);<br>
<dd>
setflag(2);<br>
<dd>
}<br>
<dd> <br>
<dd>
t_relay();<br>
<dd> <br>
<dd>
break;<br>
<dd> };<br>
<dd> <br>
<dd> #labeled all transaction
for accounting<br>
<dd> setflag(1);<br>
<dd> setflag(2);<br>
<dd> <br>
<dd> if
(method=="CANCEL"){<br>
<dd>
t_relay();<br>
<dd>
};<br>
<dd> <br>
<dd> # (in case, it does not
work, use the following command<br>
<dd> # with proper names and
addresses in it)<br>
<dd> <br>
<dd> <br>
<dd> if (uri==myself) {<br>
<dd> <br>
<dd>
# This for PSTN destination<br>
<dd> <br>
<dd>
if (uri=~"^sip:1")<br>
<dd> <br>
<dd>
{
rewritehost("10.10.10.10");<br>
<dd>
forward(10.10.10.10,5060);<br>
<dd>
break;<br>
<dd>
}<br>
<dd>
if (method=="REGISTER") {<br>
<dd> <br>
<dd>
# Uncomment this if you want to use digest authentication<br>
<dd>
if (!www_authorize("sip.mycommunications.com",
"subscriber")) {<br>
<dd>
www_challenge("sip.mycommunications.com", "0");<br>
<dd>
break;<br>
<dd>
};<br>
<dd> <br>
<dd>
save("location");<br>
<dd>
break;<br>
<dd>
};<br>
<dd> <br>
<dd>
# native SIP destinations are handled using our USRLOC DB<br>
<dd>
if (!lookup("location")) {<br>
<dd>
sl_send_reply("404", "Not Found");<br>
<dd>
break;<br>
<dd>
};<br>
<dd> };<br>
<dd> # forward to current uri
now; use stateful forwarding; that<br>
<dd> # works reliably even if
we forward from TCP to UDP<br>
<dd> if (!t_relay()) {<br>
<dd>
sl_reply_error();<br>
<dd> };<br>
<dd> <br>
<dd>}<br>
</font>
<dd>_______________________________________________<br>
<dd>Serusers mailing list<br>
<dd>serusers@lists.iptel.org<br>
<dd>
<a href="http://lists.iptel.org/mailman/listinfo/serusers" eudora="autourl">
http://lists.iptel.org/mailman/listinfo/serusers</a></blockquote>
</dl></blockquote></body>
</html>