(RADIATOR) Two Accounting tables!!!
Hakim Tass
hakim at kccg.net
Fri Aug 10 02:20:26 CDT 2001
hello Hugh!!
i am attaching the current configuration file!
well the current configuration is running just fine!
except that the flat rate customers accounting information goes into the
ACCOUNTINGTABLE and the AcctSQLStatement get executed!(nothing happens to
database )(but time is lost in the execution of the queries which is not
required)
if some how i could separate the accountiing of the two <AuthBY SQL> it will
be great! in that way i can have two separate accounting tables!
Regards
Hakim
############################################################################
#######################################
Foreground
LogStdout
Trace 4
AuthPort 1812
AcctPort 1813
DictionaryFile .\dictionary.cisco
PidFile .\radius.pid
LogFile e:\radiator-2.18.2\logs\logs.txt
<Client DEFAULT>
Secret mysecret
DupInterval 20
</Client>
<SessionDatabase SQL>
DBSource dbi:ODBC:radius
DBUsername radius
DBAuth radius
#AddQuery insert into radoline ... DEFAULT IS WORKING FINE
</SessionDatabase>
<Realm>
MaxSessions 1
AuthByPolicy ContinueUntilAccept
<AuthBy SQL>
#this authby is for prepaid customers
Identifier SQLAuthentication1
DBSource dbi:ODBC:radius
DBUsername radius
DBAuth radius
AuthSelect select PASSWORD,BALANCETIME from \
AUTHENTICATIONTABLE where \
(USERNAME='%n' and BALANCETIME > 0)
AuthColumnDef 0,Password,check
AuthColumnDef 1,Session-Timeout,reply
AddToReply \
Service-Type = Framed, \
Framed-Protocol = PPP
AccountingStopsOnly
AccountingTable ACCOUNTINGTABLE
#dont need the other accounting information for the time being
AcctColumnDef USERNAME,User-Name
AcctColumnDef CALLDATE,Timestamp,integer-date
AcctColumnDef ACCTSESSIONTIME,Acct-Session-Time,integer
#this will update the balancetime for each session
AcctSQLStatement update AUTHENTICATIONTABLE set \
BALANCETIME = BALANCETIME-%{Acct-Session-Time} \
where USERNAME = '%n'
#this sql statement set the startdate and expirydate of the prepaid
customer first time he logs in
AcctSQLStatement update AUTHENTICATIONTABLE set startdate =
GetDate(),expiryDate = GetDate()+30 where (username='%n' and startdate is
null and expirydate is null)
</AuthBy>
<AuthBy SQL>
# for FLAT RATE CUSTOMERS
Identifier SQLAuthentication2
DBSource dbi:ODBC:radius
DBUsername radius
DBAuth radius
AuthSelect select password from CUSTOMERS where username='%n'
AuthColumnDef 0,Password,check
AddToReply \
Service-Type = Framed, \
Framed-Protocol = PPP
</AuthBy>
</Realm>
===
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