2.11.1 Rule Templates and Rules

Upon identifying the need for message mediation, an operator begins by creating a “Rule Template”. A Rule Template includes the logic required to perform a specific mediation. Conditions and Actions are defined as part of the template and then the rule template is associated with one or more Trigger Points (defined below). Once the definition is complete, the operator provisions the data (Rules) needed for the conditions and the actions. An operator can provision up to 2000 Rules per Rule Template and 2000 counters that can be used for measurements based on message content. To ensure system performance is not impacted, the total number of rules across all rule sets combined should not exceed 3750.

The Rule Template allows for up to 5 conditions and 5 actions to be defined in a template. When multiple conditions are present in a Rule Template, the framework allows the conditions to be combined using the logical operators (AND, OR) and also the order in which the actions must be executed.

Some examples of the conditions supported are:

  • Checking for the presence or absence of well-known or proprietary AVPs.
  • Checking for the value of AVP header components or data part of well-known or proprietary AVPs.
  • Checking for any other component of an AVP such as AVP flag.
  • Checking for any component of the Diameter message (flags, appl-id, cmd-code, so on).
  • Checking for ranges.
  • Checking for peer and connection names/ids.
  • Checking for message priority.
  • Checking for bit set/reset.
  • Checking if a message has been redirected.

    Some examples of the actions supported are:

  • Adding or deleting AVPs.
  • Modifying parts of AVP header.
  • Modifying the Diameter header.
  • Set a message priority.
  • Activate message copy.
  • Set alarm/event.
  • User defined measurements associated with the use of measurement rules.
  • Redirect a message.
  • Parse decorated NAI.
  • Peg a mediation framework counter.

    Both actions and conditions can be applied to Grouped AVPs. A max depth of 8 is supported for the Grouped AVPs.

    Rule Templates and their associated Rules can be independently exported on one system (such as a lab system)and then imported into another system (such as a production system). This capability is useful when the Rule Templates and Rules are being tested in a lab environment and for moving the Rule templates and Rules to production system upon successful completion of testing. The import and export all comes in handy when a Rule Template has to be updated and replaced with a newer version of the Rule Template but the older Rules need to be preserved.