Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision | ||
usage [2013-06-19 12:00] – [Non-standard core attributes] wikiadmin | usage [2016-09-19 17:32] – [SMRadius-Disable-WebUITopup] wikiadmin | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Attribute Usage ====== | ||
+ | |||
Attributes are used in order to process and set configuration items for incoming connections. Each attribute has a Name, Operator and Value. | Attributes are used in order to process and set configuration items for incoming connections. Each attribute has a Name, Operator and Value. | ||
- | ====Name==== | + | ===== Name ===== |
Specify the type of attribute to be used. If you need to specify a vendor attribute, use the following format: | Specify the type of attribute to be used. If you need to specify a vendor attribute, use the following format: | ||
- | < | ||
- | ====Operator==== | + | < |
+ | [vendor_code: | ||
+ | </ | ||
+ | |||
+ | ===== Operator ===== | ||
How to use the value of this attribute. See the OPERATORS file for details on each supported operator. | How to use the value of this attribute. See the OPERATORS file for details on each supported operator. | ||
- | ====Value==== | + | ===== Value ===== |
Value of the attribute (string). | Value of the attribute (string). | ||
Example: | Example: | ||
- | < | ||
- | Name: SMRadius-Capping-Traffic-Limit Operator: := Value: 5000</ | ||
- | ====Non-standard | + | < |
+ | // Sets the users traffic limit to 5GB | ||
+ | Name: SMRadius-Capping-Traffic-Limit Operator: := Value: 5000 | ||
+ | </ | ||
+ | |||
+ | ====== Non-standard | ||
A listing of non standard attributes and their functions in SMRadius. These attributes are listed under the areas in SMRadius that make use of them. | A listing of non standard attributes and their functions in SMRadius. These attributes are listed under the areas in SMRadius that make use of them. | ||
- | ===Capping=== | + | ===== Capping ===== |
- | * __[[mod_feature_capping.pm|SMRadius-Capping-Traffic-Limit]]__ | + | |
- | * __[[mod_feature_capping.pm|SMRadius-Capping-Uptime-Limit]]__ | + | * [[mod_feature_capping.pm|SMRadius-Capping-Traffic-Limit]] |
- | * __[[mod_feature_capping.pm|SMRadius-Config-Capping-Traffic-Multiplier]]__ | + | * [[mod_feature_capping.pm|SMRadius-Capping-Uptime-Limit]] |
- | * __[[mod_feature_capping.pm|SMRadius-Config-Capping-Uptime-Multiplier]]__ | + | * [[mod_feature_capping.pm|SMRadius-Config-Capping-Traffic-Multiplier]] |
+ | * [[mod_feature_capping.pm|SMRadius-Config-Capping-Uptime-Multiplier]] | ||
+ | |||
+ | ===== Auto-Topups ===== | ||
+ | |||
+ | * [[mod_feature_capping.pm|SMRadius-AutoTopup-Traffic-Enabled]] | ||
+ | * [[mod_feature_capping.pm|SMRadius-AutoTopup-Traffic-Amount]] | ||
+ | * [[mod_feature_capping.pm|SMRadius-AutoTopup-Traffic-Limit]] | ||
+ | * [[mod_feature_capping.pm|SMRadius-AutoTopup-Traffic-Notify]] | ||
+ | * [[mod_feature_capping.pm|SMRadius-AutoTopup-Traffic-NotifyTemplate]] | ||
+ | |||
+ | * [[mod_feature_capping.pm|SMRadius-AutoTopup-Uptime-Enabled]] | ||
+ | * [[mod_feature_capping.pm|SMRadius-AutoTopup-Uptime-Amount]] | ||
+ | * [[mod_feature_capping.pm|SMRadius-AutoTopup-Uptime-Limit]] | ||
+ | * [[mod_feature_capping.pm|SMRadius-AutoTopup-Uptime-Notify]] | ||
+ | * [[mod_feature_capping.pm|SMRadius-AutoTopup-Uptime-NotifyTemplate]] | ||
+ | |||
+ | ===== Validity ==== | ||
+ | |||
+ | * [[mod_feature_validity.pm|SMRadius-Validity-ValidFrom]] | ||
+ | * [[mod_feature_validity.pm|SMRadius-Validity-ValidTo]] | ||
+ | * [[mod_feature_validity.pm|SMRadius-Validity-ValidWindow]] | ||
+ | |||
+ | |||
+ | ===== Config ===== | ||
+ | |||
+ | * [[mod_config_sql.pm|SMRadius-Config-Secret]] | ||
+ | * [[mod_config_sql.pm|SMRadius-Config-PODServer]] | ||
+ | * [[mod_config_sql.pm|SMRadius-Config-Filter-Reply-Attribute]] | ||
+ | * [[mod_config_sql.pm|SMRadius-Config-Filter-Reply-VAttribute]] | ||
+ | |||
+ | ====== Core ====== | ||
+ | |||
+ | ===== SMRadius-Evaluate ===== | ||
+ | Evaluate and set an attribute / attributes based on the results of the evaluation. Syntax: TEST CASE ? TRUE_ATTRIBUTE : FALSE. | ||
+ | |||
+ | Lets take a real life example: | ||
+ | |||
+ | 1. For traffic under 80000Mbyte, we set an attribute | ||
+ | < | ||
+ | SMRadius-Evaluate ||+= SMRadius_Capping_TotalDataUsage < 80000 ? [14988: | ||
+ | </ | ||
+ | |||
+ | 2. For traffic above 80000Mbyte, but below 130000Mbyte, | ||
+ | < | ||
+ | SMRadius-Evaluate ||+= SMRadius_Capping_TotalDataUsage > 80000 && SMRadius_Capping_TotalDataUsage < 130000 ? [14988: | ||
+ | </ | ||
+ | |||
+ | 3. For traffic above 130000Mbyte, | ||
+ | < | ||
+ | SMRadius-Evaluate ||+= SMRadius_Capping_TotalDataUsage > 130000 ? [14988: | ||
+ | </ | ||
+ | |||
+ | ===== SMRadius-Peer-Address ===== | ||
+ | |||
+ | Allows the admin to specify an address that the peer address must match in order to be authorized. The user / group attribute SMRadius-Peer-Address will be checked against the peer address of the client device. | ||
+ | |||
+ | < | ||
+ | SMRadius-Peer-Address | ||
+ | </ | ||
+ | |||
+ | ===== SMRadius-Disable-WebUITopup ===== | ||
- | ===Validity=== | + | Allows one to build web ui's that ignore topups, this attribute is not used internally. |
- | * __[[mod_feature_validity.pm|SMRadius-Validity-ValidFrom]]__ | + | |
- | * __[[mod_feature_validity.pm|SMRadius-Validity-ValidTo]]__ | + | |
- | * __[[mod_feature_validity.pm|SMRadius-Validity-ValidWindow]]__ | + | |
+ | ===== SMRadius-Username-Transform ===== | ||
- | ===Config=== | + | <btn type=" |
- | * __[[mod_config_sql.pm|SMRadius-Config-Secret]]__ | + | |
- | * __[[mod_config_sql.pm|SMRadius-Config-PODServer]]__ | + | |
- | * __[[mod_config_sql.pm|SMRadius-Config-Filter-Reply-Attribute]]__ | + | |
- | * __[[mod_config_sql.pm|SMRadius-Config-Filter-Reply-VAttribute]]__ | + | |
- | ===Core=== | + | Transforms a username from the supplied username to the configured username. |
- | * __SMRadius-Username-Transform__ | + | |
- | * Transforms a username from the supplied username to the configured username | + | |
- | * < | + | |
- | SMRadius-Username-Transform | + | |
- | * __SMRadius-Evaluate__ | + | < |
- | * Evaluate and set an attribute / attributes based on the results of the evaluation. Syntax: TEST CASE ? TRUE_ATTRIBUTE : FALSE | + | # Transfrom user@example.net to user@this.example.net |
+ | SMRadius-Username-Transform | ||
+ | </ | ||
- | * __SMRadius-Peer-Address__ | ||
- | * Allows the admin to specify an address that the peer address must match in order to be authorized. The user / group attribute SMRadius-Peer-Address will be checked against the peer address of the client device. | ||
- | * < | ||
- | * __SMRadius-Disable-WebUITopup__ | ||
- | * Allows one to build web ui's that ignore topups, this attribute is not used internally at all. |