2.2.2 Rule Template elements

A Rule Template is created by configuring Table 2-6, Table 2-7, Table 2-8, and Table 2-9.

Settings

The Settings are the main Rule Template properties.

Table 2-6 Settings

Element Description Data Input Notes
Rule Template Name Name used to label this Rule Template in this application. This field is required.

Format: a-z, A-Z, 0-9, -, ., @, and _ (Unset cannot be used as a Rule Template Name.)

Range: 1-255 characters

Message type support Indicates the type of message processing that is supported by the Rule Template (Request, Answer, or both). The Message Support Type depends on the selected conditions and actions.

Format: Check marks

Range: Request, Answer, or both are checked.

Default: Both are checked

This field cannot be edited.

Conditions

The Conditions define a set of one to five matching expressions.

All conditions are supported by both requests and replies. Each condition is marked with a letter in the alphabetical order (A, B, C, D, E, and so on). Use the up and down arrows to move the conditions within the Condition Set; however, the letters that label the conditions stay in alphabetical order.

Table 2-7 Conditions

Element Description Data Input Notes
Fast Search

If check marked, fast database lookup is used. Otherwise, the values of the specified field are checked one-by-one until the first match is found. See Fast Search.

All Conditions with the Fast Search option checked must precede the others to maintain the Fast Search.

When the Default value is Fixed, Fast Search is enabled regardless of the selected Operator and right value type.

Format: check mark or not sign; not editable

Range: checked or unchecked

Default: checked

* Name

The name for the left value to display for a Condition on the Rule Set page.

This field is required.

Format: field

Range: 1 to 64 characters

Description The description that appears for a Condition on the Rule Sets page. If possible, provide information such as the format to be used (such as text string or telephone number format) and the range of values (such as 1 to 255 characters).

Format: field

Range: 1 to 255 characters string

* Left value

The left value in a Condition. The left value typically refers to a regular or grouped AVP component (AVP header parts or value) or a Diameter Header component. The grouped AVP can be up to 8 levels deep. Grouped AVPs that have a depth of one are supported (one or more AVPs at the same level within an AVP).

This field is required.

The value can be defined using the Formatting String Wizard Specifiers .

Format: field

Range: See Formatting String Wizard Specifiers

Operator

Operator is used to compare left value and right value in a Condition.

Exist and not exist operators are used to check the presence of the specified left value.

Is true and is not true operators are used to verify whether the specified left value is not 0 or equals 0 (is empty in the case of a string type).

Format: list

Range: See Table 2-13

Default: equals (==)

Case Sensitive

The checkbox is enabled for the UTF8String right value.

Case-sensitive search is possible only together with Fast Search. Without Fast Search, the lookup is always case-insensitive.

Format: checkbox

Range: checked or not checked

Default: not checked (not case-sensitive)

Right Value

The type of data that is compared to the field in the message (specified by the left value) in a Condition to determine if there is a match and Mediation should be performed.

The right value can be:
  • Empty - the optional checkbox is checked (it can be left empty in the rule provisioning in a Rule Set), or the right value is not used by the selected Operator (such as exists).
  • One of the right value types shown in the Range list.

    Actual data of the specified type is entered in a rule in the Rule Set that is generated from the Rule Template, to use in the comparison.

  • An actual data value of the selected right value type, provisioned in the Default value field of the Condition in the Rule Template.

Format: list

Range: Right value types are:
  • Integer32
  • Integer64
  • Unsigned32
  • Unsigned64
  • Float32
  • Float64
  • Address (IPv4 or IPv6 IP address)
  • Time (number of seconds since 0h on 1 January 1900)
  • UTF8string
  • DiameterIdentity (FQDN or Realm)
  • DiameterURI
  • IP/Netmask (IPv4 or IPv6 Netmask)
  • Enumerated (available Enum values; prefaced by enum:)
  • OctetString
  • xl-value (references to AVPs, LAVPs, or parts of the Diameter message)
  • Regular expression (Perl 5 regular expression)
  • Unsigned64Range enter two numbers (the lower and upper limit of the range inclusive) that fit into Unsigned64, separated by a dash (-).
  • Connection provisioned connection
  • Peer provisioned peer nodes

Default: Integer32

All previously provisioned Enumerated Types are listed prefixed with enum:. For example: enum: xyz.

Default value

An actual data value to display for the right value of a Condition on the Rule Set page.

When the Default value is Fixed, Fast Search is enabled regardless of the selected Operator and right value type.

Format: Text

Range: Data value that is valid for selected right value type.

When OctetString or UTF8String is selected, any human-readable character is valid.

When the xl-value type is selected, all Default value entries must be xl-values.

Optional The Optional checkbox can be checked so that the right value data could be deleted or left empty in the Rule Set rule, or unchecked indicating that the right value data must be entered and can be changed in the Rule Set rule.

Format: checkbox

Range: Check mark or no check mark

Default: Checked

Fixed Indicates that the right value data that is entered in the Default value in the Rule Template Condition is actual data, and cannot be changed in the Rule Set rule.

Format: checkbox

Range: Check mark or no check mark

Default: Not checked

Condition Set

The Condition Set specifies whether the conditions are logically ANDed, ORed or they form a Complex Expression.

Table 2-8 Condition Set

Element Description Data Input Notes
Condition Set

The defined matching expressions (Conditions) are combined in one logical expression (Condition Set) and can be AND, OR or represent Complex Expression operators, so the set matches on the message if all the expressions are true.

If no matching expression is defined, the message unconditionally matches.

Format: Options

Range: ANDed, ORed or Complex Expression.

Actions

The Actions specify the possible settings for each action to be taken for this Rule Template.

Use the up or down arrows to move the order of the Actions.

Table 2-9 Actions

Action Description Data Input Notes
New Action Add a new Action to the list that is applied when the conditions of the Rule Template match on the message.

Format: list

Range: Actions listed in this section of this table.

The Table 2-10 allows the Diameter Header and Set Command Flags to be modified.

Table 2-10 Actions Performed on the Diameter Header

Action Description Data Input Notes
Modify Diameter Header Parts

Allows modifying or overwriting of the Version, Command Code, and Application ID components of the Diameter Header.

Note: Modifying values in the Diameter Header can result in incompatibility with the standard defined in IETF RFC3588bis (draft-ietf_dime_rfc3588bix-26.txt) Diameter Base Protocol.

Header Part - the component to modify

Format: list

Range: Version, Command Code, Application ID

Default: Version

Overwrite to - the new value of the component

Format: Integer

Range: New value; 8-bit, 24-bit, or 32-bit unsigned integer

Optional

Format: Checkbox

Range: Check mark or no check mark

Set Command Flags
Allows modifying of one or more Command Flags in the processed message, including the reserved flags:
  • Set Command Flag
  • Clear Command Flag
  • Keep Original value
Flags R, P, E, and T are supported; r4, r5, r6, and r7 are reserved for future use:
  • R - Request; shows whether the message is a Request or a Response.
  • P - Proxiable; shows if the message can be proxied, relayed, or redirected, or it must be locally processed.
  • E - Error; shows if the message contains protocol or semantic errors.
  • T - Shows that a message can potentially be a retransmitted message after a link fail-over, or is used to aid removal of duplicate messages.

Set Command Flag:

Clear Command Flag:

Keep original:

Default: Keep original

Format: Options

Range: R, P, E, T, r4, r5, r6, r7

Optional

is not available

The Actions performed on the Diameter Payload (AVPs) can be applied to a regular AVP, to a Grouped AVP, or to an AVP within the Grouped AVP.

To perform the action on a regular or Grouped AVP, the supported AVP definition from the dictionary and the instance number or value must be specified. The value is valid only for some of the actions.

For actions that are performed on an AVP within a Grouped AVP, the parent AVP and its instance number must be specified.

If an AVP is not present in the dictionary, it is unknown by the Mediation feature and must be defined in the dictionary before the specified action can be performed.

Many of the actions allow xl-values, which can be defined using the Formatting String Wizard Specifiers.

Table 2-11 describes available Diameter Payload actions.

Table 2-11 Actions Performed on the Diameter Payload (AVPs)

Action Description Data Input Notes
Add AVP

This action can support up to 8 levels deep AVPs.

Note: The action fails, if the specified instance of the parent AVP is also added but the previous instances of this AVP do not exist in the message.

The Flags and the Value must be set for the new AVP.

For Grouped AVPs,
  • If the AVP is added within a Grouped AVP, the Parent AVP and its Instance must be specified.
  • A Parent AVP can be added if it not present in the message; Flags for the added Parent AVP must be set.
  • If the Parent AVP is not found in the message and it is not added to the message, the action fails.
Flags V, M and P are supported; r3, r4, r5, r6 and r7 are reserved for future use.
  • V - Vendor-Specific; indicates whether the optional Vendor-ID field is present in the AVP header. When set, the AVP Code belongs to the specific vendor code address space.
  • M - Mandatory; indicates whether support of the AVP is required. If an AVP with the M bit set is received by a Diameter client, server, proxy, or translation agent and either the AVP or its value is unrecognized, the message MUST be rejected. Diameter Relay and Redirect Agents MUST NOT reject messages with unrecognized AVPs. AVPs with the M bit cleared are informational only. A receiver of a message with an AVP that is not supported, or whose value is not supported, can simply ignore the AVP.
  • P - Indicates the need for encryption for end-to-end security. Diameter base protocol specifies which AVPs must be protected by end-to-end security measures (encryption) if the message is to pass through a Diameter agent. If a message includes any of those AVPs, the message must not be sent unless there is end-to-end security between the originator and the recipient of the message.

Add parent AVP if it is not present:

Format: Checkbox

Range: Check mark or no check mark

Default: No check mark

AVP:

Format: list

Range: Available AVPs

Instance:

Format: list

Range: First, Second, Third, Fourth, Fifth, all internal variables of Integer32, Integer64, Unsigned32, Unsigned64 type.

Set Flags:

Format: checkbox for each flag

Range: V, M, P, r3, r4, r5, r6, r7

Set Value:

Format: Specify the AVP value in Formatting String Wizard Specifiers.

Optional

Format: Checkbox

Range: Check mark or no check mark

Set/Add AVP

The action allows changing the value of an AVP if it is found in the message or adding an AVP if it is not found in the message.

This action can support up to 8 levels deep AVPs.

It searches for the specific instance of an AVP in the message, overwriting its value when this AVP is found or appending this AVP (adding it as a last instance) when it's not present.

The AVP can be looked up in the message either by the instance number or by the value.

If the AVP is not found in the message it can be appended, which requires setting the Flags and specifying the Value of the AVP that is to be added.

If a non-existing AVP that was looked up in the message by the specific instance number is about to be added to the message with the different instance number, the action fails.

AVP:

Format: list

Range: Available AVPs

Instance

Format: list

Range: First, Second, Third, Fourth, Fifth, all internal variables of Integer32, Integer64, Unsigned32, Unsigned64 type.

Default: First

Set Flags

Flag definitions in Add AVP:
  • If the flag must be set, the flag is checked and disabled.
  • If the flag must not be set, the flag is unchecked and disabled.
  • If the flag can be set, the checkbox is available to be changed.

Format: checkboxes for the flags

Range: V, M, P, r3, r4, r5, r6, r7

If the AVP is found, set its value (all specified flags are ignored)

Format: Options

Range: Search by the instance or Search by the value

Else append the AVP to the message (all specified flags are considered). Add parent AVP if it is not present

Format: checkbox

Range: Checked or unchecked

Set/Add Value

Format: Value entered

Range: Specify the AVP value in Formatting String Wizard Specifiers

Optional

Format: Checkbox

Range: Check mark or no check mark

Delete AVP

Delete a specified AVP in the message.

This action can support up to 8 levels deep AVPs.

If the Instance of the specified AVP is All, the action is applied to all instances of the AVP or Grouped AVP in the message.

If the specified AVP is within a Grouped AVP, the Parent AVP and its Instance must be specified.

If the specified AVP is the last AVP within the Grouped AVP, the action can be defined to delete the Parent AVP.

If the specified AVP is a Grouped AVP, the Grouped AVP and all of the AVPs within the group are deleted.

If the deleted AVP has been the last AVP within the Grouped AVP, then Delete parent AVP if it is empty can be checked to delete the Parent AVP as well.

If the specified AVP is not found in the message, the Delete AVP action is considered successful.

Delete parent AVP if it is empty:

Format: Checkbox

Range: Check mark or no check mark

Default: Checked

AVP:

Format: list

Range: Available AVPs

Instance:

Format: list

Range: First, Second, Third, Fourth, Fifth, all internal variables of Integer32, Integer64, Unsigned32, Unsigned64 type.

With the value:

Specify the AVP value in Formatting String Wizard Specifiers

Format: Checkbox

Optional

Format: Checkbox

Range: Check mark or no check mark

Save AVP

A saved AVP is stored in the buffer as long as the transaction exists.

Saved AVPs can be accessed through the Formatting String Wizard Specifiers as corresponding Linking-AVPs with the same AVP and instance number.

If the Instance of the specified AVP is All, the action saves all instances of the AVP in the message.

Note: A grouped AVP can be saved and restored, but sub-AVPs within the stored or restored grouped AVP cannot be retrieved (such as with @msg.avp["name"][index].avp["name"]​[index]), modified, or removed.

If the same AVP is saved multiple times (the action is applied multiple times), the saved value is overwritten each time the AVP is saved.

If the specified AVP is not found in the message, the Save AVP action is considered to have failed.

Save AVP:

Format: list

Range: Available AVPs

Instance:

First, Second, Third, Fourth, Fifth, All, all internal variables of integer32, integer64, unsigned32, unsigned64 type.

With the value:

Specify the AVP value in Formatting String Wizard Specifiers

Format: checkbox

Optional

Format: checkbox

Range: Check mark or no check mark

Restore AVP

AVPs can be restored in the message by either appending each AVP to the message or by replacing all of the same existing AVPs.

The instance number of the saved AVP must be specified, to find the appropriate Linking-AVP (LAVP) that was stored.

Note: A Grouped AVP can be saved and restored, but sub-AVPs within the stored or restored Grouped AVP cannot be retrieved (such as with @msg.avp["name"]​[index].avp["name"][index]), modified, or removed.

Delete before restore:

Format: checkbox

Range: Checked, unchecked; default is unchecked.

Restore AVP:

Format: list

Range: Available AVPs

Instance:

Format: list

Range: First, Second, Third, Fourth, Fifth, All, all internal variables of integer32, integer64, unsigned32, unsigned64 type.

Optional

Format: Checkbox

Range: Check mark or no check mark

Set LAVP

Allows constructing a top-level non-Grouped AVP by setting the Flags and specifying the value, and placing it into the buffer associated with the Diameter transaction. The AVP can be accessed as a Linking-AVP through the Formatting String Wizard Specifiers.

The value is stored in the buffer as long as the transaction exists. The LAVP can be used for the Restore AVP action.

  • Instance - Specify the instance number of the AVP within the buffer of the transaction. The new AVP specification always overwrites the existing if there is already one with the same instance number.
  • Set Value
    • The Input field is available when the selected LAVP has a data format other than Enumerated.
    • The list is available when the selected LAVP has the data format Enumerated.
    • An error message appears if the entered value of the Input field is not an x1-value and does not correspond to the data format required by the selected AVP.
  • Delete: Click to delete an existing Linking-AVP.

Set LAVP

Format: list

Range: All non-Grouped AVPs from the dictionary

Default: First non-Grouped AVP definition from the dictionary

Instance

Format: list

Range: First, Second, Third, Fourth, Fifth, all internal variables of integer32, integer64, unsigned32, unsigned64 type.

Default: First

Set Flags

Flag definitions in Add AVP:
  • If the flag must be set, the flag is checked and disabled.
  • If the flag must not be set, the flag is unchecked and disabled.
  • If the flag can be set, the checkbox is available to be changed.

Format: checkboxes for the flags

Range: V, M, P, r3, r4, r5, r6, r7

Default: From the dictionary

Set Value:

Specify the AVP value in Formatting String Wizard Specifiers

Optional

Format: Checkbox

Range: Check mark or no check mark

Actions that modify an AVP

If the specified AVP is not found in the message, the action is considered to have failed. Table 2-12 describes Modify AVP actions.

Table 2-12 Actions that Modify an AVP

Action Description Data Input Notes
Change AVP Code

Replace an AVP definition with a new one, keeping the original AVP value and flag that are not strictly defined in the dictionary (that can be set).

This action can support up to 8 levels deep AVPs.

Allows changing the Code of the specified AVP and modifying its Flags.

Parent AVP:

Format: list

Range: Available AVPs

Instance:

Format: list

Range: First, Second, Third, Fourth, Fifth, all internal variables of integer32, integer64, unsigned32, unsigned64 type.

AVP:

Format: list

Range: Available AVPs

Instance: First, Second, Third, Fourth, Fifth, all internal variables of integer32, integer64, unsigned32, unsigned64 type

With the value:

Specify the AVP value in Formatting String Wizard Specifiers

Format: Checkbox

New AVP

Format: list

Range: Available AVPs

Optional

Format: Checkbox

Range: Check mark or no check mark

Change AVP Flags

Allows setting, clearing, and keeping the original value of AVP flags.

This action can support up to 8 levels deep AVPs.

Flags V, M and P are supported; r3, r4, r5, r6 and r7 are reserved for future use.
  • V - Vendor-Specific; indicates whether the optional Vendor-ID field is present in the AVP header. When set, the AVP Code belongs to the specific vendor code address space.
  • M - Mandatory; indicates whether support of the AVP is required. If an AVP with the M bit set is received by a Diameter client, server, proxy, or translation agent and either the ABP or its value is unrecognized, the message MUST be rejected. Diameter Relay and Redirect Agents MUST NOT reject messages with unrecognized AVPx. AVPs with the M bit cleared are informational only. A receiver of a message with an AVP that is not supported, or whose value is not supported, can simply ignore the AVP.
  • P - Indicates the need for encryption for end-to-end security. Diameter base protocol specifies which AVPs must be protected by end-to-end security measures (encryption) if the message is to pass through a Diameter agent. If a message includes any of those AVPs, the message must not be sent unless there is end-to-end security between the originator and the recipient of the message.

Parent AVP

Format: list

Range: Available AVPs

Instance:

Format: list

Range: First, Second, Third, Fourth, Fifth, all internal variables of integer32, integer64, unsigned32, unsigned64 type.

AVP:

Format: list.

Range: Available AVPs

With the value:

Specify the AVP value in Formatting String Wizard Specifiers

Format: Checkbox

Set Command Flag:

Clear Command Flag:

Keep original:

Default: Keep original

Format: Options

Range: R, P, E, T, r4, r5, r6, r7

Optional

Format: Checkbox

Range: Check mark or no check mark

Set AVP Value

Allows overwriting of the value of an AVP.

This action can support up to 8 levels deep AVPs.

Parent AVP:

Format: list

Range: Available AVPs

Instance:

Format: list

Range: First, Second, Third, Fourth, Fifth, all internal variables of integer32, integer64, unsigned32, unsigned64 type.

AVP:

Format: list.

Range: Available AVPs

Instance:

Format: list

Range: First, Second, Third, Fourth, Fifth, all internal variables of integer32, integer64, unsigned32, unsigned64 type.

With the value:

Specify the AVP value in Formatting String Wizard Specifiers

Format: Checkbox

Set Value:

Specify the AVP value in Formatting String Wizard Specifiers

Optional

Format: Checkbox

Range: Check mark or no check mark

Strip from AVP Value

Strips the defined number of characters from either the beginning or the ending of the AVP value. This action can be used in combination with the Prefix/Suffix to AVP Value action.

This action can support up to 8 levels deep AVPs.

Parent AVP:

Format: list

Range: Available AVPs

Instance:

Format: list

Range: First, Second, Third, Fourth, Fifth, all internal variables of integer32, integer64, unsigned32, unsigned64 type

AVP:

Format: list

Range: Available AVPs

Instance: First, Second, Third, Fourth, Fifth, all internal variables of integer32, integer64, unsigned32, unsigned64 type.

With the value:

Specify the AVP value in Formatting String Wizard Specifiers

Format: Checkbox

Strip from:

Format: Options

Range: Beginning of the value or End of the AVP value in Formatting String Wizard Specifiers

Optional

Format: Checkbox

Range: Check mark or no check mark

Prefix/Suffix to AVP Value

Add the defined data as a prefix or suffix to the AVP value. This action can be used in combination with the Strip for AVP Value action.

This action can support up to 8 levels deep AVPs.

Parent AVP:

Format: list

Range: Available AVPs

Instance:

Format: list

Range: First, Second, Third Fourth, Fifth, all internal variables of integer32, integer64, unsigned32, unsigned64 type

AVP:

Format: list

Range: Available AVPs

Instance: First, Second, Third, Fourth, Fifth, all internal variables of integer32, integer64, unsigned32, unsigned64 type.

With the value:

Specify the AVP value in Formatting String Wizard Specifiers

Format: Checkbox

Options: Prefix to the value, Suffix to the value

Prefix to the value or Suffix to the value:

Specify the AVP value in Formatting String Wizard Specifiers

Optional

Format: Checkbox

Range: Check mark or no check mark

Substitute in AVP Value

Use a defined pattern to locate a field in the AVP value, and replace the data in the field with the specified new data.

This action can support up to 8 levels deep AVPs.

Parent AVP:

Format: list

Range: Available AVPs

Instance:

Format: list

Range: First, Second, Third Fourth, Fifth, all internal variables of integer32, integer64, unsigned32, unsigned64 type

AVP:

Instance: First, Second, Third, Fourth, Fifth, all internal variables of integer32, integer64, unsigned32, unsigned64 type.

With the value:

Specify the AVP value in Formatting String Wizard Specifiers

Format: Checkbox

Pattern:

Format: Text

Range: Pattern to locate the field

Replacement:

Format: Text

Range: Specify the AVP value in Formatting String Wizard Specifiers

Optional

Format: Checkbox

Range: Check mark or no check mark

Bit Set/Reset Allows setting/resetting the specified bit of the AVP. This action can support up to 8 levels deep AVPs.

Parent AVP:

Format: list

Range: Available AVPs

Instance:

Format: list

Range: First, Second, Third Fourth, Fifth and all internal variables of integer32, integer64, unsigned32, unsigned64 type.

Default: First non-Grouped AVP definition from the dictionary

Bit Position:

Note: Disabled unless the AVP is selected.

Format: list

Range: Bit indexes between 0-31 or 0-63 depending on the format of an AVP.

Default: First non-Grouped AVP definition from the dictionary

Range: First, Second, Third Fourth, Fifth and all internal variables of integer32, integer64, unsigned32, unsigned64 type.

Set/Reset Value:

Note: Disabled unless the AVP is selected.

Format: list

Range: 1 or 0 - Default a 1

Note: If the name of the selected AVP is too long and does not fit on the page, the hint message is available; it displays the entire name.

Optional

Format: Checkbox

Range: Check mark or no check mark

Set internal variable Allows setting the value for an internal variable that is valid for the entire duration of a transaction.

Internal Variable

Format: list

Range: Available configured Internal Variables.

Set Value

Specify the AVP value inFormatting String Wizard Specifiers

Optional

Format: Checkbox

Range: Check mark or no check mark

Message Copy Trigger Diameter Message Copy for the message, based on the values in the Message Copy Configuration Set that is specified for the Action. See Configuration in the Diameter User’s Guide. Select Message Copy Configuration Set

Format: list

Range: Default or Message Copy

Default: Blank

Optional

Format: Checkbox

Range: Check mark or no check mark

Set Request Priority Allows setting the Priority of a Request to Max Normal Request Priority, which can be used by congestion controls. The action is not applicable for Answer messages.

Request Priority

Format: list

Range: 0 - Max Normal Request Priority as configured in the system options.

Note: Set Request Priority is mutually exclusive with this action.

Optional

Format: Checkbox

Range: Check mark or no check mark

Set Route List
Allows setting the Route List to bypass the PRT. This is used when the Request has to be routed based on AVPs that are beyond the ones accessible via the Peer Route Tables. The action can also enforce skipping the Application Route Tables matching. The action is applicable only for the following options:
  • Diameter request message received from connection
  • Diameter request message ready to be forwarded to application
  • Diameter request message received from application trigger points
It is ignored at all other trigger points.

Note: If the ART is not skipped, then it is possible that an application can specify a PRT, which can result in the overwriting of the Route List specified by mediation.

Set Route List

Format: list

Range: Pre-defined Route List.

Skip Application Route Tables

Format: Checkbox

Range: Check mark or no check mark

Note: Abandon Message and Send Answer are mutually exclusive with this action.

Optional

Format: Checkbox

Range: Check mark or no check mark

Peg Counter

Allows the user to peg the pre-defined measurements from the list in Diameter, and then Mediation, and then Measurements.

A report is generated from Measurements, and then Report.

Measurement

Format: list

Range: Pre-defined measurements based on the list in Diameter, and then Mediation, and then Measurements.

Optional

Format: Checkbox

Range: Check mark or no check mark

Send Answer

Allows answering the request with a configurable Result-Code. The action enables specifying the Result-Code or Experimental-Result-Code and Vendor-ID.

The action is supported by Requests only

Answer Result-Code Value

Format: Options

Vendor-ID

Format: Text

Range: 1 - 4294967295

Answer Error Message

Format: Text

Range: N/A or specify the message placed in the Error-Message AVP in Answer message.

Note: Abandon Message and Send Answer are mutually exclusive with this action.

Exit from Execution Trigger

Bypasses any subsequent Rule Template in it.

Optional is not available for this Action.

Abandon Message Allows to silently drop the request. The action is supported by Requests and Answers at the DCL trigger points. The DRL answer triggers (ATP1, ATP4, ATP6 and ATP10) ignore this action.

Format: Blank

Range: Blank

Note: Send Answer and Set Route List are mutually exclusive with this action.

Exit from Execution Trigger

Bypasses any subsequent Rule Template in it.

Optional is not available for this Action.

Set Destination-Realm This action populates Destination-Realm AVP based on the IMSI value present in the Request.

Format: Blank

Range: Blank

Note: Process Decorated NAI is mutually exclusive with this action.

Exit from Execution Trigger

Bypasses any subsequent Rule Template in it.

Optional is not available for this Action.

Process Decorated NAI
Performs the following actions:
  • Inspects the User-Name AVP for the presence of Decorated NAI, if not present, then the action stops. The request continues processing.
  • If present, extracts the realm value from the Decorated NAI and populates the Destination-Realm AVP. For more information see RFC 5729 and RFC 4282.
  • The action also modifies the User-Name AVP value. For more information, see RFC 4282.

If Destination-Realm is deleted/absent during request processing, the action adds it back.

Format: Blank

Range: Blank

Note: Set Destination-Realm is mutually exclusive with this action.

Optional is not available for this Action.

Redirect Request-Host

This action generates an Answer message with a Result-Code value of 3006 and the (E(rror)) E bit set.

The user can specify one of the following options for the Redirect-Host AVP:
  • Do not include the Redirect-Host AVP
  • The Redirect-Host AVP is prefixed with an aaa:// and set to the value of Destination-Host AVP from the request or populated manually. If the Destination-Host AVP is not present in the request, the Redirect-Host AVP is not included in the 3006 response
  • Include the Redirect-Host AVP with a user provisioned value (String Wizard available)
Two additional redirect types can be added to the generated Answer message by checking Add:
  • Redirect-Host-Usage - if the user selects any non-zero value for this AVP the redirection should be cached (zero = DON'T_CACHE)
  • Redirect-Max-Cache-Time - number of seconds to cache the redirection (if Redirect-Host-Usage equals zero, then it recommended that this AVP be zero).

Note: If either of the Additional AVPs exist, then both AVPs must exist.

Note: If the Redirect-Host is not included in the response, then the Redirect-Host-Usage and Redirect-Max-Cache-Time is not included

Note: If Do not include Redirect-Host is selected, then the Add checkbox is disabled.

Do not include Redirect-Host AVP

Format: Option

Range: No Range available

Include Redirect-Host AVP with the value of Destination-Host from the request with the aaa:// prefix

Format: Option

Range: No Range available

Include Redirect-Host AVP with the value:

Format: Option

Range: Specify the AVP value in Formatting String Wizard Specifiers.

Add

Specify if the extra AVPs have to be added to 3006 response.

Format: Checkbox

Range: Check to disable or no check mark

Default: Unchecked

Redirect-Host-Usage AVP

Format: list

Range: DONT_CACHE, ALL_SESSION, ALL_REALM, REALM AND APPLICATION, ALL_APPLICATION, ALL_HOST, AND ALL_USER

Default: DONT_CACHE

Redirect-Max-Cache-Time AVP

Format: Text

Range: Specify the AVP value in Formatting String Wizard Specifiers

Default: 0

Exit from Execution Trigger

Bypasses any subsequent Rule Template in it.

Optional is not available for this Action.

Redirect Request-Realm

This action generates an Answer message with a Result-Code value of 3011 and the (E(rror)) E bit set.

The user can specify one of the following options for the Redirect-Realm AVP:
  • Do not include the "Redirect-Realm" AVP
  • Include the "Redirect-Realm" AVP with the value of "Destination-Realm" AVP from the Request or populated manually. If the "Destination-Realm" AVP is not present in the request, the "Redirect-Realm" AVP is not included in the 3011 response.
  • Include the Redirect-Realm AVP with a user provisioned value (String Wizard available)
Two additional redirect avps can be added to the generated Answer message by checking the Add box:
  • Redirect-Realm-Usage - if the user selects any non-zero value for this AVP the redirection should be cached (zero = DON'T_CACHE)
  • Redirect-Max-Cache-Time - number of seconds to cache the redirection (if Redirect-Realm-Usage equals zero, then it recommended that this AVP be zero).

Note: If either of the Additional AVPs exist, then both AVPs must exist.

Note: If the Redirect-Realm is not included in the response, then the Redirect-Realm-Usage and Redirect-Max-Cache-Time is not included

Note: If Do not include Redirect-Realm is selected, then the Add checkbox is disabled.

Do not include "Redirect-Realm" AVP

Format: Option

Range: No Range available

Include "Redirect-Realm" AVP with the value of "Destination-Realm" from the request

Format: Option

Range: No Range available

Include "Redirect-Realm" AVP with the value:

Format: Option

Range: Specify the AVP value in Formatting String Wizard Specifiers

Add

Specify if the extra AVPs have to be added to 3011 response.

Format: checkbox

Range: Check to disable or no check mark

Default: Unchecked

"Redirect-Realm-Usage" AVP

Format: list

Range: DONT_CACHE, ALL_SESSION, ALL_REALM, REALM AND APPLICATION, ALL_APPLICATION, ALL_HOST, AND ALL_USER

Default: REALM AND APPLICATION

"Redirect-Max-Cache-Time" AVP

Format: checkbox

Range: Specify the AVP value in Formatting String Wizard Specifiers

Default: 3600

Exit from Execution Trigger

Bypasses any subsequent Rule Template init.

Optional

Format: Checkbox

Range: Check mark or no check mark

Assert Alarm/Event

Define the severity of the alarm at template action.

Allows the user to cause an Alarm or Event based on the Condition.

The alarm instance value is automatically set to the Template-ID: Rule-ID.

The alarms are throttled and auto cleared after 300 seconds.

Alarm/Event

Format: list

Range: Mediation Generic Event, Mediation Generic Alarm - Minor, Mediation Generic Alarm - Major, Mediation Generic Alarm - Critical

Additional info

- Write a short explanation to distinguish between different problems. Type in the text box or use the Wizard to write xl-expressions, which are resolved at the run time.

Optional

Format: Checkbox

Range: Check mark or no check mark

Execute Rule template

The value needs to be set at the time the new Rule Template is defined.

Only Rule Templates in Test or Active state are listed.

This field is displayed on the Diameter Mediation Rule Template Insert and Edit pages, but not on the View page.

Format: list

Range: Available Rule Templates in Test and Active states.

Optional is not available for this Action.

Exit from Execution Trigger Exits from the Execution Trigger, bypassing any subsequent Rule Set associated with it. Optional is not available for this Action.
Execute Perl subroutine The Execute perl subroutine can query the Diameter message headers and AVPs and change the Diameter message content, for example add, delete, change AVPs and get and set Internal Variables or Linking AVPs.

Script

Format: Text

Range: Name of the perl script

Subroutine

Format: Text

Range: Specify the subroutine to execute.

Optional is not available for this Action.

Rule Template Condition Operators

TheTable 2-13 describes the operator that allows a comparison of the left-hand operand and the right-hand operand in a condition. The value can be an AVP, another part of a Diameter message, a constant, or an internal variable.

Table 2-13 Rule Template Condition Operators

Operator Operator Type Returns true when...
Example of use
equals (==) Generic Value exists AND equals...
@msg.command.code==316
does not equal (!=) Generic Value does not exist OR does not equal...
@msg.command.code!=316
begins with (longest match) (=^^) String Value exists AND begins with (longest match)...
@msg.avp["Destination-Realm"]=^^test
begins with (=^) String Value exists AND begins with...
@msg.avp["Destination-Realm"]=^testlb
does not begin with (!=^) String Value does not exist OR does not begin with...
@msg.avp["Destination-Realm"]!=^testlb
ends with (longest match) (=$$) String Value exists AND ends with (longest match)
@msg.avp["Origin-Host"][1]=$$entity.com
ends with (=$) String Value exists AND ends with...
@msg.avp["Origin-Host"][1]=$entity.com
does not end with (!=$) String Value does not exist OR does not end with...
@msg.avp["Origin-Host"][1]!=$entity.com
regular expression match (=~) String Value exists AND matches the regular expression...
@msg.avp[Session-Id]!=~.*\.example\..*
regular expression does not match (!=~) String Value does not exist OR does not match the regular expression...
@msg.avp["Session-Id"]!=~.*\example\..*
less than (<) Numeric Value exists AND is less than...
@msg.avp["Validity-Time"]<30
greater than (>) Numeric Value exists AND is greater than...
@msg.avp["Validity-Time"]>30
less than or equal to (<=) Numeric Value exists AND is less than or equal to...
@msg.avp["Validity-Time"]<=30
greater than or equal to (>=) Numeric Value exists AND is greater than or equal to...
@msg.avp["Validity-Time"]>=30
is within Subnet Value exists AND is within...
@msg.avp["Served-Party-IP-Address] is within 192.168.0.0/24
is not within Subnet Value does not exist OR is not within...
@msg.avp["Served-Party-IP-Address] is not within 192.168.0.0/24
exists   AVP specified as Left value exists...
@msg.avp["Vendor-Specific-Application"] exists
does not exist   AVP specified as Left value does not exist...
@msg.avp["Vendor-Specific-Application"] does not exist
is true   AVP specified as Left value exists AND it is not empty/non-zero...
@msg.avp["Disconnect-Cause"] is true
is false   AVP specified as Left value does not exist OR it is empty/0...
@msg.avp["Disconnect-Cause"] is false

The is true and is false work only on numbers (Integer32, Integer32, Unsigned32, Unsigned64, Float32, Float64, Enumerated, Time) and strings (OctetString, UTF8String, DiameterIdentity, DiameterURI).

For an IP Address, is true always succeeds; the address can be converted to a string that is never empty.

If the condition cannot be evaluated (for example, the AVP does not exist or the xl-value is incompatible), then is true fails and is false succeeds.

Rule Template Condition Conversion Rules

Based on the type of operator selected, the left and right values are converted according to the rules in Table 2-14.

Table 2-14 Rule Template Condition Conversion Rules

Left value Type Operator Type Right Value Type Conversion
- String - Convert left value and right value to strings.
- Numeric - Convert left value and right value to numbers.
- Subnet -

Convert left value to an IP address.

Convert right value to a subnet

String Generic String No conversion is needed.
Numeric Generic Numeric No conversion is needed.
IP address Generic IP address No conversion is needed.
String Generic Numeric Convert left value to a number.
Numeric Generic String Convert right value to a number.
IP address Generic String Convert right value to an IP address.
String Generic IP address Convert left value to an IP address.
None of these cases Conversion cannot be done.
Operators by Type (see also Table 2-13)
String =~, !=~, =^, =^^, !=^, =$$, =$, !=$
Numeric <, >, <=, >=
Subset is within, is not within
Generic ==, !=

The conversion fails if the input value is reasonably not convertible to the new format (such as the numeric input cannot be converted to an IP Address).

If the conversion is impossible or fails, the condition is evaluated to false unless the operator is negated (begins with !, or is not within).

For float to string conversion, the double argument is rounded and converted to decimal notation in the style [-]ddd.dddddd, with 6 characters of precision. If the conversion does not fit into 21 characters, then it fails.

For IPv6 to string conversion, the following rules apply:
  • Leading zeros are ignored (01->1)
  • Lowercase to uppercase (ffff->FFFF)
  • 1:0:0:0:0:0:0:0->1:0:0:0:0:0:0:0
  • 1::2->1:0:0:0:0:0:0:2
  • ::ffff->0:0:0:0:0:0:0:FFFF
  • ffff::->FFFF:0:0:0:0:0:0:
  • ::->0:0:0:0:0:0:0:0