This worked beautifully, thank you.  Here's the snippet of
my radiusd.cfg file for future reference:

#
# AuthBy Clause for *accounting packets only* with custom
# insert statement to calculate the LOGIN_TIME column in my RADIUS
# table.
#
        <AuthBy SQL>
            #
            # Disable authentication via SQL
            #
            AuthSelect

            #
            # DB Login Paramaters
            #
            DBSource dbi:Oracle:SID
            DBUsername username
            DBAuth password

            AccountingTable RADIUS
            AccountingStopsOnly

            AcctSQLStatement \
                INSERT INTO radius \
                  ( session_id, username, login_time, logout_time, \
                    session_time, server, input_packets, output_packets, \
                    xmit_data_rate, data_rate, framed_address, caller_id ) \
                VALUES \
                  ( '%{Acct-Session-Id}', '%{User-Name}', \
                    (%{Timestamp} - %{Acct-Session-Time}), %{Timestamp},\
                    %{Acct-Session-Time}, '%{NAS-Identifier}', \
                    %{Acct-Input-Packets}, %{Acct-Output-Packets}, \
                    %{Ascend-Xmit-Rate}, %{Ascend-Data-Rate}, \
                    '%{Framed-Address}', '%{Caller-Id}' )

        </AuthBy>


At 08:46 AM 7/5/99 -0500, you wrote:
>Hi John,
>
>On Jul 2,  1:56pm, John Coy wrote:
>> Subject: (RADIATOR) Run perl code to generate more accounting fields
>> I'd like to calculate two fields (login_time and logout_time)
>> from the "Timestamp" and the "Acct-Session-Time" accounting
>> STOP records for insert into an SQL database.  I'd like
>> to define:
>>
>> LOGIN_TIME = (Timestamp - Acct-Session-Time)
>> LOGOUT_TIME = Timestamp
>>
>Best way to do this is to construct an AcctSQLStatement that does the
>arithmentic you want:
>
>AcctSQLStatement insert into accounting
>LOGIN_TIME=%{Timestamp}-%{Acct-Session-Time}, LOGOUT_TIME=%{Acct-Session-Time}
>.....
>


===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to