(RADIATOR) acct-start-time and acct-stop-time variables
Greg 'Rafiq' Clarkson
gregc at netc.net.au
Thu Oct 10 22:16:25 CDT 2002
Hi all,
I am currently working with a contractor to integrate radiator 3.3.1 with
freeside 1.4
My freeside expert want me to insert 'Acct-Start-Time' and 'Acct-Stop-Time'
values into an sql database.
The only values I know are 'start' and 'stop' records along with
acct-session-time.
I have grepped the dictionaries for these values without success.
Do they exist as RADIUS attributes?
BTW I know about the example in the manual:
AcctColumnDef START_TIME,%b-0%{Acct-Session-Time},literal
So just to test it I actually created 'Acct-Start-Time' and 'Acct-Stop-Time'
(see below) and they do insert timestamps into the database. However, they
insert the SAME timestamp into each field.
My freeside contractor wants it to only write into the acctstarttime field
when it is a start record and into the acctstoptime field when it is a stop
record.
Anyhow for what it is worth I have included a reduced version of my config
file below.
#
# this is called by /usr/local/etc/rc.d/radius.sh
#####################################################################
##
## Variable Definitions
##
DefineGlobalVar dbSpec dbi:Pg:dbname=radtest;host=localhost
DefineGlobalVar dbUser XXXXXXX
DefineGlobalVar dbPass XXXXXX
######################################################################
##
## Global parameters
##
Trace 4
PidFile /var/run/radiator.pid
User radiator
Group radiator
"radius-radacct.cfg" 133 lines, 3448 characters written
greg at wiz-fiz:~: % cat radius-radacct.cfg
# Configuration file for the Radiator RADIUS server.
#
# this is called by /usr/local/etc/rc.d/radius.sh
#####################################################################
##
## Variable Definitions
##
DefineGlobalVar dbSpec dbi:Pg:dbname=radtest;host=localhost
DefineGlobalVar dbUser XXXXXXX
DefineGlobalVar dbPass XXXXXX
######################################################################
##
## Global parameters
##
Trace 4
PidFile /var/run/radiator.pid
User radiator
Group radiator
BindAddress 0.0.0.0
AuthPort 1812
AcctPort 1813
DbDir /usr/local/etc/radiator
DictionaryFile %D/dictionary
LogDir /var/log/radius
# change logfile to null GC 120902
LogFile
#LogFile %L/logfile.%Y-%m-%d
UsernameCharset a-zA-Z0-9\.\-_/%#@
# rewrite usernames to lowercase
RewriteUsername tr/A-Z/a-z/
######################################################################
##
## Client Definitions
##
######################################################################
##
## AuthBy Definitions
##
<AuthBy SQL>
Identifier freeradius
NoDefault
IgnoreAccounting
DBSource %{GlobalVar:dbSpec}
DBUsername %{GlobalVar:dbUser}
DBAuth %{GlobalVar:dbPass}
# AuthSelect
</AuthBy>
<AuthBy RADIUS>
Identifier RadiusProxyAuth
IgnoreAccounting
Host XXXXXXXXX
Secret XXXXXXXXX
AuthPort 1812
AcctPort 1813
</AuthBy>
<AuthBy SQL>
Identifier freeradius
IgnoreAuthentication
DBSource %{GlobalVar:dbSpec}
DBUsername %{GlobalVar:dbUser}
DBAuth %{GlobalVar:dbPass}
HandleAcctStatusTypes Start,Stop
DateFormat %Y-%m-%d %H:%M:%S
AccountingTable radacct
AcctColumnDef acctsessionid,Acct-Session-Id
AcctColumnDef acctuniqueid,Acct-Unique-Id
AcctColumnDef username,User-Name
AcctColumnDef acctstatustype,Acct-Status-Type
AcctColumnDef nasipaddress,NAS-IP-Address
AcctColumnDef nasportid,NAS-Port,integer
AcctColumnDef nasporttype,NAS-Port-Type
AcctColumnDef acctstarttime,Acct-Start-Time,integer
AcctColumnDef acctstoptime,Acct-Stop-Time,integer
#AcctColumnDef acctstoptime,Timestamp,integer-date
AcctColumnDef acctsessiontime,Acct-Session-Time,integer
AcctColumnDef acctauthentic,Acct-Authentic,
AcctColumnDef connectinfo_start,Connect-Info
AcctColumnDef acctinputoctets,Acct-Input-Octets,integer
AcctColumnDef acctoutputoctets,Acct-Output-Octets,integer
AcctColumnDef calledstationid,Called-Station-Id
AcctColumnDef callingstationid,Calling-Station-Id
AcctColumnDef acctterminatecause,Ascend-Disconnect-Cause
AcctColumnDef servicetype,Service-Type
AcctColumnDef framedprotocol,Framed-Protocol
AcctColumnDef framedipaddress,Framed-IP-Address
#AcctColumnDef acctstartdelay,Acct-Delay-Time,integer
AcctColumnDef acctstopdelay,Acct-Delay-Time,integer
AcctFailedLogFileName %L/detail.freeradius
</AuthBy>
######################################################################
##
## SessionDatabase
##
######################################################################
##
## Logging
##
######################################################################
##
## Handler Definitions
##
<Handler Request-Type=Accounting-Request>
AcctLogFileName %L/detail_acc.%Y-%m
AuthByPolicy ContinueAlways
AuthBy freeradius
</Handler>
<Handler>
AcctLogFileName %L/detail
AuthByPolicy ContinueUntilAccept
AuthBy freeradius
AuthBy RadiusProxyAuth
</Handler>
greg at wiz-fiz:~: %
===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.
More information about the radiator
mailing list