---------- Forwarded Message ----------
Subject: BOUNCE [EMAIL PROTECTED]: Non-member submission from ["C
Thompson" <[EMAIL PROTECTED]>]
Date: Wed, 9 Jan 2002 08:58:45 -0600
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
>From [EMAIL PROTECTED] Wed Jan 9 08:58:44 2002
Received: from agape.wingnet.net (agape.wingnet.net [206.30.215.2])
by server1.open.com.au (8.11.0/8.11.0) with ESMTP id g09Ewi302501
for <[EMAIL PROTECTED]>; Wed, 9 Jan 2002 08:58:44 -0600
Received: from spiffy (makrothumia.wingnet.net [206.30.215.5])
by agape.wingnet.net (8.11.6/8.11.6) with ESMTP id g09GZZX31333
for <[EMAIL PROTECTED]>; Wed, 9 Jan 2002 11:35:35 -0500 (EST)
(envelope-from [EMAIL PROTECTED])
From: "C Thompson" <[EMAIL PROTECTED]>
Organization: WingNet Internet Services
To: [EMAIL PROTECTED]
Date: Wed, 9 Jan 2002 11:35:35 -0500
Subject: doing minute billing
Reply-to: [EMAIL PROTECTED]
Message-ID: <3C3C2B07.32.AE8C825@localhost>
Priority: normal
X-mailer: Pegasus Mail for Windows (v4.01)
Currently, we are doing some accounting updates to our MySQL database
using the following code in RADIUS.CFG:
AcctSQLStatement update SUBSCRIBERS set TIMELEFT=TIMELEFT-0%{Acct-
Session-Time} where USERNAME='%n'
So if a user has a session-time of 50 seconds, they are billed for 50
seconds.
What we want to do is to be able to bill the user in minute increments.
The logic for this seems to be the following:
set TIMELEFT=TIMELEFT-0{Acct-Session-Time} / 60 ; round up to next whole
number and multiply by 60
Can we do this in RADIUS, or must it be done in MySQL? Any code
examples out there?
Thanks!
Craig Thompson, Manager
WingNET Internet Services,
P.O. Box 2605 // Cleveland, TN 37320-2605
423-559-LINK (v) 423-559-5145 (f)
http://www.wingnet.net
-------------------------------------------------------
--
Mike McCauley [EMAIL PROTECTED]
Open System Consultants Pty. Ltd Unix, Perl, Motif, C++, WWW
24 Bateman St Hampton, VIC 3188 Australia http://www.open.com.au
Phone +61 3 9598-0985 Fax +61 3 9598-0955
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory etc etc
on Unix, Win95/8, 2000, NT, MacOS 9, MacOS X
===
Archive at http://www.open.com.au/archives/radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.