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