Rule Templates

Rule Templates are created by:
Note: The Administrator privileges must be activated for the Diameter Mediation feature before the Rule Templates GUI screens can be accessed to create and modify Rule Templates.

All Rule Templates are listed on the Rule Templates GUI with check boxes by each row. To automatically check all the Rule Templates, check the box by Rule Template Name.

A Rule Template is created by configuring Settings, Conditions, and Actions.

Settings

Settings are the main Rule Template properties:

Conditions

One or more (up to 5) matching expressions (Conditions) can be defined in a Rule Template. The expressions are combined into one logical expression with ANDed, ORed or Complex Expression operators, so that the request or response matches the condition set if all of the expressions are true. If no matching expression is defined, the message unconditionally matches.

Each matching expression consists of a left-hand value or operand, an operator, and a right-hand value or operand.

Conditions can be configured to cause Mediation to use fast database lookups of the rule data. See Fast Search.

Actions

Actions indicate what to do when the conditions match (such as modify the part of a message, forward a message, send a reply, insert or remove headers, or set attributes for further processing). Actions implement the mediation of a message.

When the message processing reaches a selected triggering point, the Conditions of the Rule Template are examined for the message. If the Conditions match, Mediation Actions are applied to the message. The Actions allow manipulation of some particular part of the message, adding or deleting information in the message, or forwarding the message to a specific destination, or triggering of Diameter Message Copy to send a copy of the message to a DAS.

The Actions to take when a Mediation operation is triggered and its Condition Set is matched are defined in the Rule Template. Actions belonging to the same Rule Template form an Action Set. See Rule Template elements for the Actions available in Rule Templates.

On the Diameter > Mediation > Rule Templates page, you can perform the following actions:

Fast Search

The Fast Search option is used to cause Mediation to use fast database lookups. If Fast Search is not used, the values of each condition are checked one-by-one until the first match is found.

The Fast Search option appears as the first element for each condition that is defined in the Conditions section for a Rule Template. The Fast Search option is not editable; it serves only to indicate whether Fast Search will or will not be used for the condition:

All of the conditions with the Fast Search option enabled must precede any conditions without Fast Search enabled in the Rule Set list. If any conditions without Fast Search enabled precede conditions with Fast Search enabled, a database lookup could fall back to slow search because of the order of the conditions.

The Condition Set layout is the alphabetical order of displaying the conditions on the "Rule Templates" screen. The Condition evaluation order is the order in which the conditions are evaluated. For simple ANDed or ORed Condition Sets, the evaluation order matches with the alphabetical order of the layout. For the Complex Expressions, conditions are evaluated in the order they appear in the expression from left to right.

The Fast Search value is either the “Yes” (check mark) sign or the “No”(red circle with a red line through it) sign. The fast-search first depends on the content of the condition and then on the condition evaluation order and condition grouping method in the following order:
  1. "Fast search" dependency on the operator , right value type and the default value are:
    1. "yes" sign if one of the operators "==", "=^^", "=^", "is within", "exists", "does not exist", "is true", "is false" is selected and the right hand operand type is not "xl-value"
    2. "yes" sign if the default value is fixed regardless of the selected operator and the right value type
    3. "no" sign for other case
  2. "Fast search" dependency on the condition evaluation order and condition grouping method:
    • Conditions are ANDed:
      • "yes" sign if the condition is the first on the condition set layout or all the conditions above also have "yes" sign under the "fast search" label.
      • "no" sign for other case.
    • Conditions are ORed:
      • "no" sign for all condition.
    • Conditions form a complex expression with mixed ANDs/ORs:
      • "yes" sign if the condition is the first condition evaluated in the expression or all the conditions before in the expression also have "yes" sign under the "fast search" label + the condition is simply ANDed to the rest of expression.
      • "no" sign if the condition is ORed.
      • "no" sign for other cases.
    • Regardless of the Operator, the Fast Search option is not supported if the “xl-value” Right value type is selected without a Fixed value.
    • The Default value is Fixed regardless of the selected Operator and Right value type; and either the condition is the first one in the Condition Set, or all the conditions above it also have a “Yes” sign for the Fast Search option.