<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="country-region"
downloadurl="http://www.5iantlavalamp.com/"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place" downloadurl="http://www.5iantlavalamp.com/"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PersonName" downloadurl="http://www.microsoft.com"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>For me, 0.8.12 was same.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Edgardo O.
Gonzales II [mailto:edgardo.g@pacific.net.ph] <br>
<b><span style='font-weight:bold'>Sent:</span></b> April 27, 2005 12:12 PM<br>
<b><span style='font-weight:bold'>To:</span></b> Leon Sun; 'Barry Murphy';
'Kofi Obiri-Yeboah'<br>
<b><span style='font-weight:bold'>Cc:</span></b> <st1:PersonName w:st="on">serusers@lists.iptel.org</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [Serusers] ACC into
mysql</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
Im also using 0.8.14 version of ser .. any other good suggestion .. have you
tried using other ver of ser ..<br>
<br>
<br>
<br>
At 03:10 AM 4/28/2005, <st1:country-region w:st="on"><st1:place w:st="on">Leon</st1:place></st1:country-region>
Sun wrote:<br>
<br>
<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Edgardo,<br>
<br>
Whats your SER version?<br>
<br>
Me either.<br>
<br>
I even couldnt put </span></font>modparam("acc",
"db_url", "mysql://ser:heslo@localhost/ser") into ser.cfg.
It showed error in file. <br>
<br>
It seemed 0.8.14 doesnt like it. <br>
<font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> <br>
<br>
<o:p></o:p></span></font></p>
<div class=MsoNormal align=center style='text-align:center'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>
<hr size=2 width="100%" align=center>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
serusers-bounces@lists.iptel.org [<a href="mailto:serusers-bounces@lists.iptel.org"
eudora=autourl> mailto:serusers-bounces@lists.iptel.org</a>] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Edgardo O. Gonzales II<br>
<b><span style='font-weight:bold'>Sent:</span></b> April 27, 2005 11:17 AM<br>
<b><span style='font-weight:bold'>To:</span></b> Barry Murphy; Kofi
Obiri-Yeboah<br>
<b><span style='font-weight:bold'>Cc:</span></b> <st1:PersonName w:st="on">serusers@lists.iptel.org</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Serusers] ACC into
mysql<br>
</span></font> <br>
<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>
<br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Mine
works, just I dont get the BYE into mysql, even though I see it in ngrep.<br>
</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>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>
</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Stupid
stupid thing :(</span></font><br>
<br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Barry<br>
</span></font> <br>
----- Original Message ----- <br>
From: <a href="mailto:edgardo.g@pacific.net.ph">Edgardo O. Gonzales II</a> <br>
To: <a href="mailto:kofi@radiocomplex.com">Kofi Obiri-Yeboah</a> <br>
Cc: <a href="mailto:serusers@lists.iptel.org">serusers@lists.iptel.org</a> <br>
Sent: Tuesday, April 26, 2005 6:29 PM<br>
Subject: RE: [Serusers] ACC into mysql<br>
<br>
Thanks again for your help .. Here's my running ser.cfg<br>
Hope you can help me make my accounting work.. <br>
thanks,<br>
ed<br>
================================================================<br>
# ----------- global configuration parameters ------------------------<br>
#debug=3<br>
#fork=yes<br>
#log_stderror=no<br>
#debug=7<br>
#fork=no<br>
#log_stderror=yes<br>
check_via=no<br>
dns=no<br>
rev_dns=no<br>
#port=5060<br>
#children=4<br>
fifo="/tmp/ser_fifo"<br>
# ------------------ module loading ----------------------------------<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>
# ----------------- setting module-specific parameters ---------------<br>
# -- usrloc params --<br>
modparam("usrloc", "db_mode", 1)<br>
modparam("usrloc",
"db_url","mysql://ser:heslo@localhost/ser")<br>
# -- auth params --<br>
modparam("auth_db", "calculate_ha1", yes)<br>
modparam("auth_db", "password_column",
"password")<br>
# -- rr params --<br>
modparam("rr", "enable_full_lr", 1)<br>
# -- acc params --<br>
modparam("acc", "log_level", 1)<br>
modparam("acc", "log_flag", 1)<br>
modparam("acc", "log_missed_flag", 3)<br>
# ------------------------- request routing logic -------------------<br>
alias=abc.com.ph<br>
# main routing logic<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>
record_route();<br>
if (loose_route()) {<br>
t_relay();<br>
break;<br>
};<br>
if (uri=~"abc.com.ph") {<br>
if (method=="REGISTER") {<br>
if (!www_authorize("abc.com.ph", "subscriber")) {<br>
www_challenge("abc.com.ph", "0");<br>
break;<br>
};<br>
save("location");<br>
break;<br>
};<br>
lookup("aliases");<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>
At 10:55 AM 4/26/2005, Kofi Obiri-Yeboah wrote:<br>
<br>
<font size=2 color=blue face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:blue'>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)</span></font> <br>
<font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>-----Original
Message----- <br>
From: Edgardo O. Gonzales II [ <a href="mailto:edgardo.g@pacific.net.ph"
eudora=autourl>mailto:edgardo.g@pacific.net.ph</a>] <br>
Sent: Monday, April 25, 2005 6:22 PM <br>
To: Kofi Obiri-Yeboah <br>
Cc: <st1:PersonName w:st="on">serusers@lists.iptel.org</st1:PersonName> <br>
Subject: RE: [Serusers] ACC into mysql<br>
</span></font>Hi Kofi!<br>
got it.. thanks for immediate feedback .. however my accounting is not working.
<br>
any parameters to be added to make it work..<br>
I have the following info already on my ser.cfg<br>
modparam("acc", "log_level", 1) <br>
modparam("acc", "log_flag", 1) <br>
modparam("acc", "log_missed_flag", 3)<br>
record_route(); -> its this a parameter for accounting<br>
thanks, <br>
ed<br>
At 08:32 AM 4/26/2005, Kofi Obiri-Yeboah wrote:<br>
<font size=2 color=blue face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:blue'>I think the correct modparam statement should read as
follows:</span></font> <br>
modparam("acc", "db_url",
"mysql://ser:heslo@localhost/ser")<br>
<br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>please
note that "my" is required in front of sql</span></font> <br>
<br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>and
not: <br>
modparam("acc", "db_url",
"sql://ser:heslo@localhost/ser")</span></font> <br>
<font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>-----Original
Message----- <br>
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 <br>
Sent: Monday, April 25, 2005 5:20 PM <br>
To: <st1:PersonName w:st="on">serusers@lists.iptel.org</st1:PersonName> <br>
Subject: Re: [Serusers] ACC into mysql<br>
</span></font>Hi all! <br>
Im also receiving this error message. <br>
Can somebody help us on how to make accounting work using mysql. <br>
thanks, <br>
ed <br>
At 06:01 AM 4/26/2005, <st1:country-region w:st="on"><st1:place w:st="on">Leon</st1:place></st1:country-region>
Sun wrote: <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>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>
If I disabled it, SER worked fine but I couldnt see any record in acc table. <br>
Would anyone suggest how to put call records into Mysql? <br>
Thank you.<br>
# ----------- global configuration parameters ------------------------ <br>
#debug=3 # debug level (cmd
line: -dddddddddd) <br>
#fork=yes <br>
#log_stderror=no # (cmd line: -E) <br>
/* Uncomment these lines to enter debugging mode <br>
debug=7 <br>
fork=no <br>
log_stderror=yes <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>
# ------------------ module loading ---------------------------------- <br>
# Uncomment this if you want to use SQL database <br>
loadmodule "/usr/lib/ser/modules/mysql.so" <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>
# 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>
# ----------------- setting module-specific parameters --------------- <br>
#modparam("acc", "db_url",
"sql://ser:heslo@localhost/ser") <br>
# -- usrloc params -- <br>
#modparam("usrloc", "db_mode", 0) <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>
# -- 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>
# -- rr params -- <br>
# add value to ;lr param to make some broken UAs happy <br>
modparam("rr", "enable_full_lr", 1)<br>
modparam("acc","log_level",1) <br>
modparam("acc","log_flag",1) <br>
# ------------------------- request routing logic ------------------- <br>
# main routing logic <br>
route{ <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>
# 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>
t_relay(); <br>
break; <br>
}; <br>
#labeled all transaction for
accounting <br>
setflag(1); <br>
setflag(2); <br>
if (method=="CANCEL"){ <br>
t_relay(); <br>
}; <br>
# (in case, it does not work, use
the following command <br>
# with proper names and addresses in
it)<br>
if (uri==myself) { <br>
# This for PSTN destination <br>
if (uri=~"^sip:1") <br>
{ rewritehost("10.10.10.10"); <br>
forward(10.10.10.10,5060); <br>
break; <br>
} <br>
if (method=="REGISTER") { <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>
save("location"); <br>
break; <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>
}</span></font> <br>
_______________________________________________ <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><br>
<o:p></o:p></p>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center>
</span></font></div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>_______________________________________________<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><o:p></o:p></span></font></p>
</div>
</body>
</html>