This is an interested topic that I have tackled a couple of times,
especially with the
ODBC side of RadiusNT.
Lets say the user makes 20 phone calls. The phone company measures
phone useage in
one minute increment, and rounds UP. So a 5 minute and 3 second phone
call,
is really 6 minutes. Now they also count the time the modems actually
jabber at the start,
which could be up to an additional 30-45 seconds BEFORE the connection
and another 1-5 seconds
before the protocol is decided upon, which is when radius starts it's
counting.
Now radius just talks seconds. So you realy can't just add up all the
seconds,
and say thats the time. In SQL terms, I use a statement like:
Sum( (AcctSessionTime)/60 + 1)
to find out how many minutes the user was on-line. Using this
methodolgy, and comparing
our 1-800 billing with Emerald, 98% of the bill the phone company sent
was right on track with
what Emerald billed the user. This is because SQL just returns the
integer portion of the time
when I divide it by 60. So if the user was on-line for 200 seconds ( 3
minutes, 20 seconds)
SQL returns (AcctSessionTime/60) + 1 as 4 minutes, which is what the
phone company is charging
us for.
-- Dale E. Reed Jr. (daler@iea.com) _____________________________________________________________________ Internet Engineering Associates | RadiusNT, Emerald, and NT FAQs Internet Solutions for Today | http://www.emerald.iea.com