Menu

yfi_explain_voucher

Anonymous

Vouchers

The following features are available for the creation of Vouchers

  • Single or Batch generation.
  • CSV export
  • PDF export in various formats including a range of Avery templates.
  • Test of authentication against the RADIUS server.
  • Edit of individual Vouchers - including the addition of RADIUS attributes.
  • PDF export in various supported languages.
  • Status indication for easy housekeeping
  • Advanced list view filtering.

Attribute Yfi-Voucher explained

(For the more technical inclined) YFi Hotspot Manager features an optional RADIUS attribute called 'Yfi-Voucher'.

Background

  • With the first version of Hotcakes Hotspot Manager there was no way one could print a bunch of time limited vouchers that would expire within a specified time from log-in.
  • This functionality is nice to have when you want to give a visitor a day-pass, week-pass, or month-pass voucher.
  • Having this functionality a hotel or guest house can generate a batch vouchers and hand them to people as they check in.
  • When the voucher gets used for the first time a countdown starts which will cause the voucher to be expired 'x' days form first log-in.

Yfi-Voucher Attribute

  • Creating a Voucher will require you to specify an amount of days that the Voucher will be valid for.
  • It will also require you to specify an expiry date for the Voucher.
  • The Voucher detail will contain an attribute called 'Yfi-Voucher' with a value like '1-00-00-00'.
  • This is a day voucher. A week voucher will be '7-00-00-00'.
  • The custom Perl module that FreeRADIUS uses takes this value (if present) and will dynamically calculate a value for WISPr-Session-Terminate-Time.

  • This value gets used by the NAS device (eg Chillispot or Mikrotik) to determine when the user's session will terminate.

  • The value of 'Yfi-Voucher' is in the format <days>-<hours>-<minutes>-<seconds>.

The value returned by the custom Perl module is determined by the following:

  • If the voucher was never used before it will take the current time and add the value of Yfi-Voucher to create the WISPr-Session-Terminate-Time value.
  • If the voucher was used before it will take the time of first log-in and add the value of Yfi-Voucher to create the WISPr-Session-Terminate-Time value.

Say the date and time is 1April 2009 9:27AM and you log in with a day voucher, the return attribute for WISPr-Session-Terminate-Time will be:

Acct-Interim-Interval = 120
Idle-Timeout = 900
WISPr-Session-Terminate-Time = "2009-04-02T09:00:00+02:00"
ChilliSpot-Bandwidth-Max-Down = 393216
ChilliSpot-Bandwidth-Max-Up = 393216

Profiles

Using this system does not exclude time limited voucher profiles. Creating a time limited profile will be as follows:

  • Create a Template Profile with the Session-Timeout attribute as a check to a time related counter.
  • Create Profiles from time limit template EG 1Hour.

You can now create a batch of vouchers using the time limited profile. Say a batch has the following:

  • Profile: Voucher 1Hour
  • Days valid: 30
  • Expiry Date: 31December 2009

This means the following:

  • The Voucher expires 31December 2009
  • Use the Voucher within 30 days from first log-in.
  • Total online time is 1 hour.
  • If user decide to break the 1 hour up, eg 10minutes each day, that is OK, as long as they log out each time in order for FreeRADIUS to close each session.
  • Devices like Coova Chilli and Mikrotik will actually automatically log users off after x minutes of inactivity.

Other Possible usage

  • This opens the way to run promotions - You may want to hand out free vouchers with a Data Limit and expiry date at the end of the month.
  • The person using the voucher must then use it within x days form first log-in AND before the expiry date is reached.
  • Since the value of Yfi-Voucher is calculated to the second, writing extra code in the Cake PHP voucher controller that can generate hour / or even minute vouchers is now possible.
  • Used in conjunction with Yfi-MAC-Reset it is possible to ban a MAC address for a specified time from using another voucher with the Yfi-MAC-Reset attribute.
  • This can then be used to run another promotion style auto-generation page where a user can generate their own voucher which will only be able to use every <Yfi-MAC-Reset value> days/hours/minutes.

Related

Wiki: Home