3.83. <AuthBy FIDELIOHOTSPOT>

This extension of <AuthBy FIDELIO> provides an easy way to integrate WiFi hotspots and captive portals with Opera hotel Property Management System from Micros Fidelio Opens in new window.
It uses an SQL database to keep track of prepaid access time blocks for Opera guests. It authenticates new sessions with the guest's room number and guest number (as with <AuthBy FIDELIO>), creates new prepaid blocks (and posts the charge to Opera), and keeps track of the remaining time left in each prepaid block. Time-limited prepaid plans are also supported.
<AuthBy FIDELIOHOTSPOT> understands also the same parameters as <AuthBy SQL> and <AuthBy FIDELIO>. For more information, see Section 3.41. <AuthBy SQL> and Section 3.81. <AuthBy FIDELIO>. <AuthBy FIDELIOHOTSPOT> supports also all the common SQL configuration parameters. For more information about the SQL configuration parameters, see Section 3.8. SQL configuration.
For a configuration sample, see a configuration sample file goodies/fidelio-hotspot.cfg

Migrating to AuthBy HOTSPOTFIDELIO

This module is superseded by <AuthBy HOTSPOTFIDELIO> starting with Radiator 4.22. See Section 3.82. <AuthBy HOTSPOTFIDELIO> for more information and sample configuration.
To migrate your current configuration, see configuration samples for <AuthBy HOTSPOTFIDELIO> and the notes below:
  • ConfirmationQuery and ConfirmationQueryParam configuration parameters are deprecated
  • Change ConfirmUpgradeOrRenew configuration parameter to ConfirmSubscription
  • GetServiceQuery configuration parameter has been deprecated. Configure to use ServiceDatabase instead
  • GetCurrentServiceQuery configuration parameter has been deprecated. Configure to use ServiceDatabase instead
  • AddSessionQuery configuration parameter has been deprecated. Configure to use ServiceDatabase and SessionDatabase instead
  • GetSessionQuery configuration parameter has been deprecated. Configure to use ServiceDatabase and SessionDatabase instead
  • UpdateSessionQuery configuration parameter has been deprecated. Configure to use ServiceDatabase and SessionDatabase instead

3.83.1. BlockDuration

Specifies a number of seconds a prepaid block of time will last for, from the time it is first purchased. Defaults to 86400 (1 day).

3.83.2. BlockPrice

Specifies a number of cents a prepaid block of time costs. Defaults to 900 cents ($9.00). This cost will be posted to Opera whenever a new block is purchased.

3.83.3. ServiceAttribute

This string specifies the RADIUS attribute that is used to select the desires prepaid service or plan.
You can create a menu into Mikrotik login page, see an example:
<tr><td>Service:</td><td>
<select name="radius0-9048">
<option value="Mikrotik-Service=free">best effort (free)</option>
<option value="Mikrotik-Service=premium">premium ($5)</option>
</select></td></tr>
name="radius0-9048" is OSC-AVPAIR, this is listed in Radiator dictionary. Use the following parameter setting in Radiator configuration file:
ServiceAttribute OSC-AVPAIR

3.83.4. ServiceAttributePrefix

This optional string specifies the prefix in ServiceAttribute. For more information, see Section 3.83.3. ServiceAttribute. Use this parameter if there is a possibility to have several ServiceAttribute instances and they must be separated to be able to choose the correct one. Here is an example about using ServiceAttributePrefix:
ServiceAttributePrefix Mikrotik-Service=

3.83.5. ConfirmUpgradeOrRenew

This flag defines if the system asks a confirmation for an upgrade or renewal charge. This is disabled by default, and the upgrade or renewal of the current payment plan is processed automatically.

3.83.6. ConfirmationMessage

This string specifies the message that is shown to the guest when asking a confirmation for upgrade or renewal recharge. To show the message, include the following example into Mikrotik login page:
$(if error)<br /><div style="color: #FF8080; font-size: 14px">$(error)</div><br>$(endif)
Then add the ConfirmationMessage to your Radiator configuration:
ConfirmationMessage "You are going to upgrade or renew your plan, please login again 
      to confirm the charge"

3.83.7. ConfirmationQuery

This string is an optional parameter. It defines the exact form of the query that is used to add the upgrade or renewal confirmation record to the database.

3.83.8. ConfirmationQueryParam

This optional string array enables the use of SQL bind variables with ConfirmationQuery. Set ConfirmationQuery using the SQL bind variables or without them. If you use the SQL bind variables, you must specify all query parameters with respective ConfirmationQueryParams. Here is an example of using the SQL bind variables:
ConfirmationQuery UPDATE sessions SET confirmation_requested=1 WHERE roomNumber=? 
      AND guestNumber=? AND macAddress=?
ConfirmationQueryParam %0
ConfirmationQueryParam %1
ConfirmationQueryParam %2
The same query without the SQL bind variables looks this:
ConfirmationQuery UPDATE sessions SET confirmation_requested=1 WHERE roomNumber=%0 
      AND guestNumber=%1 AND macAddress=%2
For more information about SQL bind variables, see Section 3.8.1. SQL bind variables.

3.83.9. PostSendQuery

This optional string defines the exact form of the insert query that is used to insert posting records.

3.83.10. PostSendQueryParam

This optional string array enables the use of SQL bind variables with PostSendQuery. Set PostSendQuery using the SQL bind variables or without them. If you use the SQL bind variables, you must specify all query parameters with respective PostSendQueryParams. Here is an example of using the SQL bind variables:
PostSendQuery INSERT INTO posts (roomNumber, guestNumber, macAddress, postNumber, 
      posted, cost) VALUES (?, ?, ?, ?, ?, ?)
PostSendQueryParam %0
PostSendQueryParam %1
PostSendQueryParam %2
PostSendQueryParam %3
PostSendQueryParam %4
PostSendQueryParam %5
The same query without the SQL bind variables looks this:
PostSendQuery INSERT INTO posts (roomNumber, guestNumber, macAddress, postNumber, 
      posted, cost) VALUES (%0, %1, %2, %3, %4, %5)
For more information about SQL bind variables, see Section 3.8.1. SQL bind variables.

3.83.11. PostAnswerQuery

This optional string defines the exact form of the insert query that is used to insert Posting Answer (PA) data.

3.83.12. PostAnswerQueryParam

This optional string array enables the use of SQL bind variables with PostAnswerQuery. Set PostAnswerQuery using the SQL bind variables or without them. If you use the SQL bind variables, you must specify all query parameters with respective PostAnswerQueryParams. Here is an example of using the SQL bind variables:
PostAnswerQuery INSERT INTO postacks (roomNumber, postNumber, transactionNumber, received) 
      values (?, ?, ?, ?)
PostAnswerQueryParam %0
PostAnswerQueryParam %1
PostAnswerQueryParam %2
PostAnswerQueryParam %3
The same query without the SQL bind variables looks this:
PostAnswerQuery INSERT INTO postacks (roomNumber, postNumber, transactionNumber, received) 
      values (%0, %1, %2, %3)
For more information about SQL bind variables, see Section 3.8.1. SQL bind variables.

3.83.13. GetServiceQuery

This optional string defines the exact form of the query that is used to fetch information, such as price, duration, or reply attributes, about the service. %0 denotes the value of a RADIUS attribute denoted by ServiceAttribute.

3.83.14. GetServiceQueryParam

This optional string array enables the use of SQL bind variables with GetServiceQuery. Set GetServiceQuery using the SQL bind variables or without them. If you use the SQL bind variables, you must specify all query parameters with respective GetServiceQueryParams. Here is an example of using the SQL bind variables:
GetServiceQuery SELECT price, duration, replyattributes FROM services WHERE serviceclass=?
GetServiceQueryParam %0
The same query without the SQL bind variables looks this:
GetServiceQuery SELECT price, duration, replyattributes FROM services WHERE serviceclass=%0
For more information about SQL bind variables, see Section 3.8.1. SQL bind variables.

3.83.15. GetCurrentServiceQuery

This optional string defines the exact form of the query that is used to fetch information about the prepaid service and the user's current session.

3.83.16. GetCurrentServiceQueryParam

This optional string array enables the use of SQL bind variables with GetCurrentServiceQuery. Set GetCurrentServiceQuery using the SQL bind variables or without them. If you use the SQL bind variables, you must specify all query parameters with respective GetCurrentServiceQueryParams. Here is an example of using the SQL bind variables:
GetCurrentServiceQuery SELECT expiry,replyattributes,price,sessions.serviceclass,confirmation_requested 
      FROM sessions LEFT JOIN services ON \ sessions.serviceclass=services.serviceclass 
      WHERE roomNumber=? AND guestNumber=? AND macAddress=?
GetCurrentServiceQueryParam %0
GetCurrentServiceQueryParam %1
GetCurrentServiceQueryParam %2
The same query without the SQL bind variables looks this:
GetCurrentServiceQuery SELECT expiry,replyattributes,price,sessions.serviceclass,confirmation_requested 
      FROM sessions LEFT JOIN services ON \ sessions.serviceclass=services.serviceclass 
      WHERE roomNumber=%0 AND guestNumber=%1 AND macAddress=%2
For more information about SQL bind variables, see Section 3.8.1. SQL bind variables.

3.83.17. AddSessionQuery

This optional string defines the exact form of the query that is used to add information about the current prepaid or postpaid session.

3.83.18. AddSessionQueryParam

This optional string array enables the use of SQL bind variables with AddSessionQuery. Set AddSessionQuery using the SQL bind variables or without them. If you use the SQL bind variables, you must specify all query parameters with respective AddSessionQueryParams. Here is an example of using the SQL bind variables:
AddSessionQuery INSERT INTO sessions (roomNumber, guestNumber, macAddress, serviceclass, 
      expiry) VALUES (?, ?, ?, ?, ?)
AddSessionQueryParam %0
AddSessionQueryParam %1
AddSessionQueryParam %2
AddSessionQueryParam %3
AddSessionQueryParam %4
The same query without the SQL bind variables looks this:
AddSessionQuery INSERT INTO sessions (roomNumber, guestNumber, macAddress, serviceclass, 
      expiry) VALUES (%0, %1, %2, %3, %4)
For more information about SQL bind variables, see Section 3.8.1. SQL bind variables.

3.83.19. GetSessionQuery

This optional string defines the exact form of the query that is used to fetch information about the current postpaid session.

3.83.20. GetSessionQueryParam

This optional string array enables the use of SQL bind variables with GetSessionQuery. Set GetSessionQuery using the SQL bind variables or without them. If you use the SQL bind variables, you must specify all query parameters with respective GetSessionQueryParams. Here is an example of using the SQL bind variables:
GetSessionQuery SELECT expiry FROM sessions WHERE roomNumber=? AND guestNumber=? 
      AND macAddress=?
GetSessionQueryParam %0
GetSessionQueryParam %1
GetSessionQueryParam %2
The same query without the SQL bind variables looks this:
GetSessionQuery SELECT expiry FROM sessions WHERE roomNumber=%0 AND guestNumber=%1 
      AND macAddress=%2
For more information about SQL bind variables, see Section 3.8.1. SQL bind variables.

3.83.21. UpdateSessionQuery

This optional string defines the exact form of the query that is used to update information about the current prepaid or postpaid session.

3.83.22. UpdateSessionQueryParam

This optional string array enables the use of SQL bind variables with UpdateSessionQuery. Set UpdateSessionQuery using the SQL bind variables or without them. If you use the SQL bind variables, you must specify all query parameters with respective UpdateSessionQueryParams. Here is an example of using the SQL bind variables:
UpdateSessionQuery UPDATE sessions SET serviceclass=?, expiry=?, confirmation_requested=0 
      WHERE roomNumber=? AND guestNumber=? AND macAddress=?
UpdateSessionQueryParam %3
UpdateSessionQueryParam %4
UpdateSessionQueryParam %0
UpdateSessionQueryParam %1
UpdateSessionQueryParam %2
The same query without the SQL bind variables looks this:
UpdateSessionQuery UPDATE sessions SET serviceclass=%3, expiry=%4,confirmation_requested=0 
      WHERE roomNumber=%0 AND guestNumber=%1 AND macAddress=%2
For more information about SQL bind variables, see Section 3.8.1. SQL bind variables.