[Chilli] Limiting user total time and/or downloads? ... and some other questions, including JSON
Jason Allen
jason at theallens.id.au
Thu Feb 11 03:51:44 UTC 2010
Hi,
Using Coova v1.2.1 on Ubuntu 9.10 (Karmic) with FreeRadius v2.1.0 and mySQL
v5.1.37.
Coova is setup as a captive portal, using http://[UAMIP]:[UAMPORT]/logon.....
for authentication (which is working successfully). The portal allows
existing users to logon, or new users to purchase an account type with
different time, downloads, and bandwidth limitations (eg 1 hour and 100Mb at
256Kb/s) on each purchased account type. On successful (res=success) or
already (res=already), the portal displays account details to the user from
javascript with JSON to Coova.
I have the following Radius attributes set to manage this; Session-Timeout,
ChilliSpot-Max-Input-Octets, WISPr-Bandwidth-Max-Up, and
WISPr-Bandwidth-Max-Down.
Coova is successfully kicking a user after their session time (eg 1 hour) is
complete (with caveat question below), but not when the data download
limitation has been reached.
Now my questions ...
1. How do I configure Radius and/or Coova so that the user is also kicked
when the ChilliSpot-Max-Input-Octets attribute has been reached?
2. If a user has a Session-Timeout of 1 hour, then they can logout before
that time is reached and then re-login again to get another 1 hour of time.
What configuration/action/attribute do I need to take/use so that the user
is kicked after a total time period (eg 1 hour) regardless of what they're
session-time is and how many times the have logged-out/logged-in?
3. When using the javascript JSON to Coova I am currently retrieving
json.session.startTime but am not sure what this is representing? Is it the
date/time that the user last logged-in (ie. the login time for their current
session)? And how do I correctly display/manipulate this in javascript -
using 'var sessionStartTime = new Date(json.session.startTime);" and thus
json.session.startTime contains the number of milliseconds since 1970/01/01?
4. Related to question #2 above, what JSON value can I retrieve to get a
users total online time. I am currently retrieving
json.accounting.sessionTime but this is only giving me the online time for
the users current session. I would like to retrieve either a total online
time (either inclusive of json.accounting.sessionTime, or total_online_time
+ json.accounting.sessionTime). Likewise for total downloads -
json.accounting.inputOctets is only giving me current session downloads.
If you've come this far, thanks for reading :) And Thanks! in advance for
any assistance.
--
Cheers,
Jason
Samuel Goldwyn<http://www.brainyquote.com/quotes/authors/s/samuel_goldwyn.html>
- "I'm willing to admit that I may not always be right, but I am never
wrong."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.coova.org/pipermail/chilli/attachments/20100211/2f0bfc5e/attachment.htm>
More information about the Chilli
mailing list