Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
mod_feature_capping.pm [2016-09-26 17:49] – [SMRadius-Capping-Traffic-Limit] nkukard | mod_feature_capping.pm [2017-02-03 09:22] (current) – [SMRadius-AutoTopup-$TYPE-Threshold] nkukard | ||
---|---|---|---|
Line 2: | Line 2: | ||
Implements traffic or session time based capping defined using certain attributes that can be set at a group or user level. | Implements traffic or session time based capping defined using certain attributes that can be set at a group or user level. | ||
+ | |||
+ | ====== Config File ====== | ||
+ | |||
+ | The following section is supported in the '' | ||
+ | ===== [mod_feature_capping] ===== | ||
+ | |||
+ | ==== enable_mikrotik ==== | ||
+ | |||
+ | Enable Mikrotik specific attributes to allow better control of capping and traffic control by setting session limits. | ||
+ | < | ||
+ | enable_mikrotik=yes | ||
+ | </ | ||
+ | |||
+ | ==== caveat_captrafzero ==== | ||
+ | |||
+ | <btn type=" | ||
+ | |||
+ | Enable the captrafzero caveat. This will swap the meaning of 0 and undef on traffic capping limits. There was a logic error prior to v1.0.x. | ||
+ | < | ||
+ | caveat_captrafzero=yes | ||
+ | </ | ||
====== Attributes ====== | ====== Attributes ====== | ||
Line 24: | Line 45: | ||
Defines a maximum session time allowed. This value is in minutes. | Defines a maximum session time allowed. This value is in minutes. | ||
- | If unset, this value is taken as undefined which translates to 0, this means prepaid. | + | If unset, this value is unlimited. |
- | If this value is set to 0 it is taken as unlimited, or uncapped. | + | If this value is set to 0, topups must be added. |
< | < | ||
Line 112: | Line 133: | ||
==== SMRadius-AutoTopup-$TYPE-NotifyTemplate ==== | ==== SMRadius-AutoTopup-$TYPE-NotifyTemplate ==== | ||
- | The teamplte | + | The template |
Supported macro' | Supported macro' | ||
Line 134: | Line 155: | ||
Please note that you have [% usage.limit - usage.total %]Mbyte available on username [% user.username %]. We added another [% autotopup.toAdd %] automatic topup(s) totalling [% autotopup.toAddAmount %]Mbyte to your username. Your automatic topup usage is [% autotopup.added + autotopup.toAddAmount %]Mbyte of [% autotopup.limit ? autotopup.limit : ' | Please note that you have [% usage.limit - usage.total %]Mbyte available on username [% user.username %]. We added another [% autotopup.toAdd %] automatic topup(s) totalling [% autotopup.toAddAmount %]Mbyte to your username. Your automatic topup usage is [% autotopup.added + autotopup.toAddAmount %]Mbyte of [% autotopup.limit ? autotopup.limit : ' | ||
[% ELSE %] | [% ELSE %] | ||
- | We cannot add another [% autotopup.amount %]Mbyte to your username as you have reached your automatic topup limit of [% autotopup.limit %]Mbyte. Your total usage is [% autotopup.usage.total %]Mbyte. | + | We cannot add another [% autotopup.amount %]Mbyte to your username as you have reached your automatic topup limit of [% autotopup.limit %]Mbyte. Your total usage is [% usage.total %]Mbyte. |
[% END %] | [% END %] | ||
Line 143: | Line 164: | ||
==== SMRadius-AutoTopup-$TYPE-Threshold ==== | ==== SMRadius-AutoTopup-$TYPE-Threshold ==== | ||
+ | |||
+ | This attribute dictates when the usage falls below this amount a topup should be added. | ||
The threshold can be set to 0, which means only when the total limit has been exceeded will an auto-topup be added. | The threshold can be set to 0, which means only when the total limit has been exceeded will an auto-topup be added. |