<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-9">
<META content="MSHTML 6.00.2900.2627" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>I'm not sure what the question really is? You compile the acc module
with radius (edit the Makefile). See the README in modules/acc and the
radius guide on iptel.org.</DIV>
<DIV>Basically, you define the accounting flag (ex. 1) and define how to log and
every time in ser.cfg you want a message to be accounted, you do
setflag(1). SER will send RADIUS accounting messages to port 1813 of your
RADIUS server.</DIV>
<DIV>g-)</DIV>
<DIV> </DIV>
<DIV>---- Original Message ----<BR>From: Ozan Blotter<BR>To:
serusers@lists.iptel.org<BR>Sent: Wednesday, May 11, 2005 12:31 PM<BR>Subject:
[Serusers] SER 0.9.0 on Mandrake 10.0 with 3rd Party Radius AAA<BR><BR>> Hi
List,<BR>> <BR>> Is there anyone using "Advanced VoIP Billing Software", i
have a few<BR>> questions regarding to it : <BR>> <BR>> Both Billing
Software and SER installed on same machine and LAN IP is<BR>> 192.168.1.11
(test system) <BR>> <BR>> Linux Dist : Mandrake 10.0 (OS)<BR>> Apache :
Installed (base web server)<BR>> Java : Installed (important for
tomcat)<BR>> Tomcat : Installed (important for web interface)<BR>> Perl
& PHP : Installed (and a few perl modules for various<BR>> applications)
<BR>> MySql : Installed (advanced voip needs it and creates to
database<BR>> like "raddb" and "voipbilling") <BR>> PostgreSql : Installed
(no need for it at this time)<BR>> Radiusclient-ng : Installed (it's needed
for SER itself)<BR>> <BR>> I followed steps on<BR>>
http://www.iptel.org/ser/doc/ser_radius/ser_radius.html except<BR>>
freeradius server as normal. <BR>> <BR>> I've installed SER from
RPM's for Mandrake:<BR>> <BR>> ser-0.9.0-1mdk.i586.rpm<BR>>
ser-jabber-0.9.0-1mdk.i586.rpm<BR>> ser-mysql-0.9.0-1mdk.i586.rpm<BR>>
ser-radius-0.9.0-1mdk.i586.rpm<BR>> <BR>> <<<<< SER.CFG
>>>>><BR>> <BR>> [root@localhost ser]# cat ser.cfg<BR>>
#<BR>> # $Id: ser.cfg,v 1.27 2005/03/10 14:16:25 andrei Exp $<BR>>
#<BR>> # simple quick-start config script<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>> #memlog=5 # memory debug log level<BR>> #log_facility=LOG_LOCAL0
# sets the facility used for logging (see<BR>> syslog(3)) <BR>> <BR>>
/* Uncomment these lines to enter debugging mode<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>>
#user=ser<BR>> #group=ser<BR>> #fifo_user=ser # owner of the ser
fifo<BR>> #fifo_group=ser<BR>> #fifo_mode=0660 # fifo's
permissions<BR>> #disable_core=yes #disables core dumping<BR>>
#open_fd_limit=1024 # sets the open file descriptors limit<BR>>
#mhomed=yes # usefull for multihomed hosts, small performance
penalty<BR>> #disable_tcp=yes<BR>> #tcp_accept_aliases=yes # accepts the
tcp alias via option (see NEWS)<BR>> <BR>> # ------------------ module
loading ----------------------------------<BR>> <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>> loadmodule
"/usr/lib/ser/modules/textops.so"<BR>> loadmodule
"/usr/lib/ser/modules/auth.so"<BR>> loadmodule
"/usr/lib/ser/modules/acc.so"<BR>> loadmodule
"/usr/lib/ser/modules/auth_radius.so"<BR>> loadmodule
"/usr/lib/ser/modules/xlog.so"<BR>> <BR>> # ----------------- setting
module-specific parameters ---------------<BR>> <BR>>
modparam("auth_radius", "radius_config",<BR>>
"/usr/local/etc/radiusclient-ng/radiusclient.conf") <BR>>
modparam("auth_radius", "service_type", 15)<BR>> modparam("rr",
"enable_full_lr", 1)<BR>> <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>> if
(!method=="REGISTER") record_route();<BR>>
<BR>> # subsequent messages
withing a dialog should take
the<BR>> # path determined by
record-routing<BR>> if
(loose_route())
{<BR>>
# mark routing logic in
request<BR>>
append_hf("P-hint:
rr-enforced\r\n");<BR>>
route(1);<BR>>
break;<BR>> };<BR>>
<BR>> if (!uri==myself)
{<BR>>
# mark routing logic in
request<BR>>
append_hf("P-hint:
outbound\r\n");<BR>>
route(1);<BR>>
break;<BR>> };<BR>>
<BR>> # if the request is for
other domain use UsrLoc<BR>>
# (in case, it does not work, use the following
command<BR>> # with proper
names and addresses in
it)<BR>> if (uri==myself)
{<BR>>
<BR>>
if (method=="REGISTER") {<BR>> <BR>> # Uncomment this if you want to use
digest
authentication<BR>>
if (!radius_www_authorize(""))
{<BR>>
www_challenge("","0");<BR>>
break;<BR>>
};<BR>>
<BR>>
save("location");<BR>>
break;<BR>>
};<BR>>
<BR>>
lookup("aliases");<BR>>
if (!uri==myself)
{<BR>>
append_hf("P-hint: outbound
alias\r\n");<BR>>
route(1);<BR>>
break;<BR>>
};<BR>>
<BR>>
# native SIP destinations are handled using our<BR>> USRLOC DB
<BR>>
if (!lookup("location"))
{<BR>>
sl_send_reply("404", "Not
Found");<BR>>
break;<BR>>
};<BR>>
};<BR>> append_hf("P-hint:
usrloc applied\r\n");<BR>>
route(1);<BR>> }<BR>> <BR>> route[1]<BR>>
{<BR>> # send it out now; use
stateful forwarding as it works<BR>> reliably
<BR>> # even for
UDP2TCP<BR>> if (!t_relay())
{<BR>>
sl_reply_error();<BR>>
};<BR>> }<BR>> <BR>> <BR>> <<<<< SER --- When I run
it >>>>><BR>> <BR>> [root@localhost root]# ser
-c<BR>> 0(2178) WARNING: fix_socket_list: could not rev. resolve
192.168.1.11<BR>> 0(2178) WARNING: fix_socket_list: could not rev.
resolve 192.168.1.11<BR>> Listening
on<BR>>
udp: 127.0.0.1
[127.0.0.1]:5060<BR>>
udp: 192.168.1.11
[192.168.1.11]:5060<BR>>
tcp: 127.0.0.1
[127.0.0.1]:5060<BR>>
tcp: 192.168.1.11 [192.168.1.11]:5060<BR>>
Aliases:<BR>>
tcp:
localhost:5060<BR>>
udp: localhost:5060<BR>> <BR>> config file ok, exiting...<BR>>
[root@localhost root]<BR>> <BR>> <BR>> <<<<< RADIUS ---
When I run it >>>>><BR>> <BR>> [root@localhost advradius]#
./runserver.sh<BR>> <BR>> Wed, 11 May 2005 13:05:58 095: FINE:<BR>>
<GlobalConf><BR>>
AuthenticationPort =
1812<BR>> AccountingPort =
1813<BR>> BindAddress =
null<BR>> DictionaryFile =
/billing/advradius/conf/dictionary<BR>>
LogDirectory =
/billing/advradius/log<BR>>
LogLevel = FINE<BR>>
ConsoleWrite = true<BR>>
FileWrite = true<BR>>
ConsiderSrcIPAsNASIP = false<BR>> </GlobalConf><BR>> <BR>>
<BR>> Wed, 11 May 2005 13:05:58 739: FINE:<BR>>
<ThreadPoolManager><BR>>
NumThreads = 10<BR>>
MaximumWorkTime = 5000<BR>>
KeepAliveTime = -1<BR>>
ExpiryThreadSleepInterval = 5000<BR>> </ThreadPoolManager><BR>>
<BR>> <BR>> Wed, 11 May 2005 13:05:58 882: FINE:<BR>> <Client
DEFAULT><BR>>
NASIdentifier = default<BR>>
Secret = mysecret<BR>> Realm
= db<BR>> </Client><BR>> <BR>> <BR>> Wed, 11 May 2005 13:05:58
917: FINE:<BR>> <Realm db><BR>> 18AuthBy =
[db]<BR>> AcctPolicy =
BACK-UP<BR>> Accounting =
[db, file_acct]<BR>> Session
= db<BR>> </Realm><BR>> <BR>> <BR>> Wed, 11 May 2005 13:05:59
708: FINE:<BR>> <DBParams
DEFAULT><BR>> DriverName =
org.gjt.mm.mysql.Driver<BR>>
DBURL =
jdbc:mysql://127.0.0.1:3306/voipbilling<BR>>
UserName = root<BR>>
UserPassword =<BR>> </DBParams><BR>> <BR>> <BR>> Wed, 11 May
2005 13:05:59 967: FINE:<BR>> <AuthBy
db><BR>> CheckList = [(5,
(260, 0)) , (6, (0, 0))
]<BR>> ReplyList = [(1, (101,
9)) , (2, (102, 9)) , (3, (103, 9)) ,<BR>> (4, (6, 0)) , (7, (0, 0)) ]
<BR>> BackStore =
DB<BR>> PwdEncType =
0<BR>> SimultaneousLogin =
0<BR>> BackStore =
DB<BR>> DBParams =
null<BR>> AuthQuery =
Select CallAmnt, CallTime, ReturnCode,<BR>>
AuthServiceType, Password, OtherCheckItems, OtherReplyItems from<BR>>
TblActiveSessions where AuthConfID = $cisco-h323-conf-id and AuthType<BR>> =
@GetRequestNumber@
<BR>> AttribMapping =
ColMapped<BR>> </AuthBy><BR>> <BR>> <BR>> Wed, 11 May 2005
13:05:59 990: FINE:<BR>> <Session
db><BR>> BackStore =
DB<BR>> InsertSession =
Insert INTO TblActiveSessions ( UserName,<BR>> TimeStart, AuthType,
CalledNumber, AuthCallingNumber,<BR>> AuthNASIPAddress, AuthNASPort,
AuthNASPortType, AuthConfID,<BR>> CallOrigin, CallType, AcctSessionID )
values ($User-Name,<BR>> $Event-Time, 3, $Called-Station-Id,
$Calling-Station-Id,<BR>> $NAS-IP-Address, $NAS-Port, $NAS-Port-Type,
$cisco-h323-conf-id,<BR>> $cisco-h323-call-origin, $cisco-h323-call-type,
$Acct-Session-Id)
<BR>> DeleteSession = Delete
from TblActiveSessions where<BR>> AuthConfID = $cisco-h323-conf-id
<BR>> CountSession = Select
count(*) from TblActiveSessions where<BR>> LoginName = $User-Name and
AuthConfId=$cisco-h323-conf-id
<BR>> BackStore = DB<BR>>
</Session><BR>> <BR>> <BR>> Wed, 11 May 2005 13:06:00 039:
FINE:<BR>> <Accounting
db><BR>> BackStore =
DB<BR>> InsertAcct = Insert
INTO TblCallsRad ( TimeClose, UserName,<BR>> ActualDuration, CallingNumber,
CalledNumber, ConfID, CallOrigin,<BR>> CallType, AcctSessionID, NASIPAddress,
BytesIn, BytesOut, DelayTime,<BR>> AcctStatusType, RemoteAddress,
RemoteGatewayID, TerminationCause, )<BR>> values ( $Event-Time, $User-Name,
$Acct-Session-Time:NUMBER,<BR>> $Calling-Station-Id, $Called-Station-Id,
$cisco-h323-conf-id,<BR>> $cisco-h323-call-origin, $cisco-h323-call-type,
$Acct-Session-Id,<BR>> $NAS-IP-Address, $Acct-Input-Octets:NUMBER,<BR>>
$Acct-Output-Octets:NUMBER, $Acct-Delay-Time:NUMBER,<BR>> $Acct-Status-Type,
$cisco-h323-remote-address, $cisco-h323-gw-id,<BR>>
$cisco-h323-disconnect-cause,
)
<BR>> QueueLength =
5000<BR>> RecordAcctStart =
FALSE<BR>> DBParams =
null<BR>>
InsertCheckpointAcct = null<BR>> </Accounting><BR>> <BR>>
<BR>> Wed, 11 May 2005 13:06:00 070: FINE:<BR>> <Accounting
file_acct><BR>> BackStore
= FILE<BR>> InsertAcct =
null<BR>> QueueLength =
5000<BR>> RecordAcctStart =
TRUE<BR>> <BR>>
FileNameFormat =
yyyy-MM-dd-HH.csv<BR>>
AcctDirectory = AcctLog<BR>> </Accounting><BR>> <BR>> Your
evaluation license will expire in 25 day(s).<BR>> <BR>> Wed, 11 May 2005
13:06:00 137: INFO: Listener started at: 1812<BR>> <BR>> Wed, 11 May 2005
13:06:00 143: INFO: Listener started at: 1813<BR>> Started Successfully
<<<<BR>> <BR>> Anyone have any idea how to implement this
valuable software in SER<BR>> because we're gonna pay for it. <BR>>
<BR>> <BR>> <BR>>
_______________________________________________<BR>> Serusers mailing
list<BR>> serusers@lists.iptel.org<BR>>
http://lists.iptel.org/mailman/listinfo/serusers</DIV></BODY></HTML>