(RADIATOR) Two Accounting tables!!!
Hugh Irvine
hugh at open.com.au
Thu Aug 9 19:23:32 CDT 2001
Hello Hakim -
You can certainly have two different accounting tables, but I will need to
see a copy of your configuration file (no secrets) to be able to suggest the
best way to implement it.
It is usually simplest to use Handlers and deal with accounting and
authorisation seperately, and use the Class attribute to identify the
accounting packets correctly.
regards
Hugh
On Friday 10 August 2001 03:50, Hakim Tass wrote:
> hello !!!
>
> can i have two different accounting tables?
> Here is what i am doing:-
>
> i have two types of customers, Prepaid and the other is flat rate.
>
> when the Prepaid users when they connect for the first time their start
> date and expiry date are set and also the balance time gets deducted for
> every session and the session information is stored in accountingtable.
>
> when the flat rate customer connects only session information is to be
> stored.
>
> but since right now the AcctSQLStatement are one after the other, all of
> them gets executed!
> I want to separate this, any way to do it!
>
>
>
> i have giving the sample configuration that i would ideally like to have!
> (this one is not working though!)
> here the accounting information of even FLAT RATE customers is going in
> ACCOUNTINGTABLE instead OPTIGOLDACCOUNTING
> so eventually when flat rate customers disconnects there are about 4
> queries which get executed unnecessarily (want to avoid this too)!
>
> regards
> Hakim
>
> ########SAMPLE CONFIGURATOIN
> ###########################################################################
># ############
> <AuthBy SQL>
> Identifier SQLAuthentication1
> DBSource dbi:ODBC:radius
> DBUsername radius
> DBAuth radius
> # this is for the prepaid users
> 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
> AcctColumnDef USERNAME,User-Name
> AcctColumnDef CALLDATE,Timestamp,integer-date
> AcctColumnDef ACCTSTATUSTYPE,Acct-Status-Type,integer
> AcctColumnDef ACCTDELAYTIME,Acct-Delay-Time,integer
> AcctColumnDef ACCTINPUTOCTETS,Acct-Input-Octets,integer
> AcctColumnDef \
> ACCTOUTPUTOCTETS,Acct-Output-Octets,integer
> AcctColumnDef ACCTSESSIONID,Acct-Session-Id
> AcctColumnDef ACCTSESSIONTIME,Acct-Session-Time,integer
> AcctColumnDef ACCTTERMINATECAUSE,Acct_Terminate-Cause
> AcctColumnDef NASIDENTIFIER,NAS-Identifier
> AcctColumnDef NASIDENTIFIER,NAS-IP-Address
> AcctColumnDef NASPORT,NAS-Port,integer
> AcctColumnDef CLIENTIPADDRESS,Framed-IP-Address
> #this is for the prepaid users
> AcctSQLStatement update AUTHENTICATIONTABLE set BALANCETIME =
> BALANCETIME-%{Acct-Session-Time} where USERNAME = '%n'
> #couple of more sql statements here to set the startdate and expiry date
> on first user
> #AcctSQLStatement update authenticationtable set expriydate = GetDate() +
> 30 .....
>
>
> </AuthBy>
>
>
> <AuthBy SQL>
> Identifier SQLAuthentication2
> DBSource dbi:ODBC:radius
> DBUsername radius
> DBAuth radius
> #this is for the flat rate customers
> AuthSelect select password from CUSTOMERS where username='%n'
> AuthColumnDef 0,Password,check
> AccountingStopsOnly
> AccountingTable OPTIGOLDACCOUNTING
> AcctColumnDef USERNAME,User-Name
> AcctColumnDef CALLDATE,Timestamp,integer-date
> AcctColumnDef ACCTSTATUSTYPE,Acct-Status-Type,integer
> AcctColumnDef ACCTDELAYTIME,Acct-Delay-Time,integer
> AcctColumnDef ACCTINPUTOCTETS,Acct-Input-Octets,integer
> AcctColumnDef \
> ACCTOUTPUTOCTETS,Acct-Output-Octets,integer
> AcctColumnDef ACCTSESSIONID,Acct-Session-Id
> AcctColumnDef ACCTSESSIONTIME,Acct-Session-Time,integer
> AcctColumnDef ACCTTERMINATECAUSE,Acct_Terminate-Cause
> AcctColumnDef NASIDENTIFIER,NAS-Identifier
> AcctColumnDef NASIDENTIFIER,NAS-IP-Address
> AcctColumnDef NASPORT,NAS-Port,integer
> AcctColumnDef CLIENTIPADDRESS,Framed-IP-Address
>
> </AuthBy>
>
>
>
>
> ###########################################################################
># ####################
>
> ===
> 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.
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
===
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