hi Hugh!!!
I am sorry about the wrong email address, and I apologize for the
inconvience that might have caused to you.

well this is what exactly i want to do.
We are planning to have two different type of subscription scheme. In the
first scheme the  subscription is charged on hourly basis while the other
one it is based on number of days/months.
I want to keep the accounting information for this two types in two
different accounting tables.

Regards
Hakim
-----Original Message-----
From: Hugh Irvine [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 17, 2000 4:41 AM
To: Hakim Tass; [EMAIL PROTECTED]
Subject: Re: (Fwd) RE: (RADIATOR) (Fwd) can i have two accounting
tables?



Hello Hakim -

Could you please send your mail to "[EMAIL PROTECTED]" please (not
[EMAIL PROTECTED])? Thanks.

>
> hi Hugh!!!
>
> I did try that before putting in my question to the mailing list.
> But some how the accounting is being done in the first <AuthBy SQL> clause
> that i mention.
> I am writing below the snapshot of the configuration file , perhaps i
might
> be making a mistake or missing out on something.
>
> For the first two <AuthBy SQL> clause i want the accounting to be done in
> accountingtable1
> while for the last clause i want the accounting in accountingtable2. (but
> here the accounting information is going in accountingtable2)
>
> <Realm>
>         MaxSessions 1
>         AuthByPolicy ContinueWhileReject
>         <AuthBy SQL>
>                 DBSource        dbi:mysql:mydatabase
>                 DBUsername      xxxx
>                 DBAuth          xxxx
>                 AuthSelect select PASSWORD,BALANCETIME from
> AUTHENTICATIONTABLE where \
>                 (USERNAME='%n' and BALANCETIME > 0 and (EXPIRY_DATE >
now()
> or EXPIRY_DATE IS NULL))
>                 AuthColumnDef   0,Password,check
>                 AuthColumnDef   1,Session-Timeout,reply
>                 AddToReply      Service-Type = Framed,Framed-Protocol =
PPP
>                 AccountingStopsOnly
>                 AccountingTable ACCOUNTINGTABLE1
>                 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
>                 # You can use this to force Radiator to limit
>                 # maximum session times to how many minutes
>                 # are left in subaccounts.timeleft
>                 AcctSQLStatement update AUTHENTICATIONTABLE set
BALANCETIME
> = BALANCETIME-%{Acct-Session-Time} \
>                                  where USERNAME = '%n'
>         </AuthBy>
>       AuthByPolicy ContinueWhileReject
>         MaxSessions 1
>         <AuthBy SQL>
>               #accounting for this authby clause to go in accountingtable1
>                 # Change DBSource, DBUsername, DBAuth for your database
>                 # See the reference manual
>                 DBSource        dbi:mysql:mydatabase
>                 DBUsername      xxxx
>                 DBAuth          xxxx
>
>                 AuthSelect select PASSWORD,EXPIRY_DATE from UNLIMITED
where
> USERNAME='%n' and (EXPIRY_DATE > now() or EXPIRY_DATE is NULL)
>
>                 AuthColumnDef   0,Password,check
>                 AddToReply      Service-Type = Framed,Framed-Protocol =
PPP
>         </AuthBy>
>          AuthByPolicy ContinueWhileReject
>         <AuthBy SQL>
>
>                 DBSource dbi:mysql:mydatabase
>                 DBUsername     xxxx
>                 DBAuth         xxxx
>                 AuthSelect select password,balancetime from
> AUTHENTICATIONTABLE2 where (username='%n' and  status = 1)
>                 AuthColumnDef    0,Password,check
>                 AuthColumnDef    1,Session-Timeout,Reply
>                 AccountingStopsOnly
>                 AccountingTable accountingtable2
>                 AcctColumnDef   username,User-Name
>                 AcctColumnDef   calldate,Timestamp,formatted-date,to_date\
>                                          ('%e %m %Y %H %M %S','DD MM YYYY
> HH24:MI:SS')
>                 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   nasport,NAS-Port,integer
>                 AcctColumnDef   clientipaddress,Framed-IP-Address
>                 AcctSQLStatement update authenticationtable2 set
balancetime
> = balancetime-%{Acct-Session-Time}\
>                                  where USERNAME = '%n'
>          </AuthBy SQL>
> </Realm>
>

Using two AuthBy SQL clauses like this will not work. Perhaps you could give
me
a little more detail on what you want to do?

regards

Hugh

--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, Interbiller, TACACS+, PAM, external, etc, etc.
Available on Unix, Linux, FreeBSD, Windows 95/98/2000, NT, MacOS X.


===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to