Under certain circumstances an MPE device can associate additional information with a request. This information can be obtained using policy rule variables and used during policy rule execution. During policy rule execution, variables are replaced with context-specific information. Each time a policy rule is evaluated, the unique set of policy rule variable replacements is referred to as the policy context.
The availability of this information depends on:
- The carrier network environment (wireless, cable, or wireline) in which the MPE device is executing. Some variables are only meaningful in certain modes, while others are available in all modes.
- The device for which a policy rule is being executed. Some variables are only available for certain device types, while others are available for all devices.
- Whether the information is provisioned on the MPE device or, if present, a Subscriber Profile Repository (SPR) database.
- The protocol in use and how much information is available in the request. Some protocols have optional information which, if specified, can be used to associate additional information.
The format of a policy rule variable is as follows:
{name[:default-value]}
The name can contain the following characters:
- A–Z
- a–z
- 0–9
- underscore (_)
- period (.)
- backslash (\)
Note: When you create a policy rule, the format and validity of a variable is not checked.
The following are examples of policy rule variables:
{Bandwidth}
{Device.Name}
{Flow.ARP.PriorityLevel}
{Policy.Variable.RandVarf:2017-10-24T10:24:54}
The following are examples of policy variable use in conditions and actions:
- In a condition to evaluate the value of a policy context property: where the policy context property {Request.DefaultEPSBearerQoS.QoSClassIdentifier} is numerically equal to 8
- In an action to set a policy context property: set policy context property QCI to {Flow.QoSClassIdentifier}
- In an action to substitute textual information into a text message sent to a subscriber: send sms alert `You have reached 80%% of your quota {User.MSISDN}` to user
- In an action to substitute textual information into a logging message: send notification to syslog with `{User.Name}: Allocated {User.Quota.WeekGold.volume}` and severity `Info`
Policy rule variables are used in key columns of policy tables. The policy engine obtains the value from the policy context when using the policy table to look up a row. When you define the key, you can either select a basic policy variable from a list or directly enter the name of the variable you want to use.