Hello,
First of all, you can set radius.conf to "see" your database (sql.conf). You
can make some tables like users.
In users you can have fields like Prepaid ->yes or no, Calling Card-> yes or
no, Balance, Usage etc.

There is a radacct table that includes AcctStopTime, AcctStartTime,
AcctSessionTime(seconds) etc.
This table updated (in sql.conf) when an accounting_start and an
acconting_stop packet comes.

You get the AcctSessionTime(seconds) and calculate the credits(money). You
must have in mind charge_step, minimum_charge etc.

Regards,

Kyriaki Gali,
IT Applications Specialist
Kinetix Tele.com Support Center,
Tel & Fax: +30 2310 256140
GSM: +30 6947 723737
http://www.kinetix.gr
e-mail: [EMAIL PROTECTED]
----- Original Message ----- 
From: "Stefan Bosnjakovic" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 21, 2004 2:25 AM
Subject: Re:gnugk+freeradius+mysql works well,but how to configure for
prepaid??


Hi gokhan,

> this is my first mail. actually I am reading mails for a while. and by the
aim of this list
> ý managed to install and run mysql radius and gnugk.
> from now I want to make a sistem that works with tarriff and prepaid
balances.
> for example usera calls userb and it talks 60 seconds. the tarriff is 1
USD for 60 seconds.
> so usera's balance must decrease 1 USD. so how can I manage this. What is
the configuration for this. thank you

I'm just working on a similar setup, hooking up a Nomadix HSG to
freeradius/MySQL linux box controlling a
WLAN hotspot. I have to admit that I'm not a RADIUS guru though ... :-(
We need to implement pre-paid cards as well. Users can buy 30, 60, 120mins
cards.
I could not figure out how to do this with the unmodified above setup, so
I'm currently patching the MySQL driver.
I implement an additional table holding the "time left" per user. That value
gets sent to the NAS with the
Session-Timeout directive as an additional answer to an authentication
request. After each RADIUS-Stop-Accounting-Request,
I subtract the used time from that table. With a short inactivity timer and
automatic reconnect and reauthentication
that should work pretty well.
The only snag is, that generally I hate such sort of patching, since it
makes it virtually impossible to stay
up-to-date when a new version of freeradius is beeing rolled out.

So any ideas & suggestions are most welcome!

Cheers, Stefan !



-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to