Actions on Found Match Value

When the match value is found, the Oracle Communications Session Border Controller uses the action parameter to determine what to do. This parameter indicates the action to perform on the string. You set it to one of the following:

  • none
  • add
  • delete
  • replace
  • store
  • diameter-manip
  • find-replace-all
  • log
  • group-manip

If the match value is not found, the SBC continues processing the message without any AVP manipulation.

The following sections describe the possible values for the action parameter.

none

This action disables the manipulation rule.

add

This action creates a new AVP for the messages specified in msg-type, using the avp-code and avp-type parameters and the value from the new-value parameter. It adds the AVP in the correct position as follows:
  • If a preceding rule used the group-manip action to access a grouped AVP, it adds the AVP into the current grouped AVP.
  • If the avp-path parameter is set, it adds the AVP at the specified path, if the path exists.
  • If neither group-manip nor avp-path apply, it adds the AVP at root level.
The message length and padding are re-computed to account for this newly added AVP.

You can add data to AVPs in grouped AVPs by specifying the group AVP path in the avp-path parameter.

delete

This action removes the AVP specified in avp-code from the list of AVPs in the messages specified in msg-type. The message length and padding are re-computed to account for this deleted AVP.

replace

This action substitutes the AVP's existing value with the new-value parameter. The message length and padding and AVP length and padding are re-computed to account for changes. This is mostly applicable to variable length AVP types such as octet-string.

store

This action stores the data that was contained in the AVP as a string, in a variable composed of the manipulation rule name. You can refer to this variable in subsequent rules. This is useful for creating conditional logic to make decisions whether to execute other manipulation rules or to duplicate information within the Diameter message.

Every manipulation rule performs an implicit store operation before running the specified action type. Store operations are based on regular expression patterns configured in match-value. The information that is stored in the rule is the result of the regular expression applied against the specified string.

When action is set to store, comparison-type is ignored, and match-value is treated as a regular expression.

Because conditional logic cannot be determine whether to perform a store operation or not, storing always occurs. Values stored in a manipulation rule are referred to as user defined variables.

You can store data from AVPs in grouped AVPs by specifying the group AVP path in the avp-path parameter.

diameter-manip

This action instructs the SBC to run another diameter manipulation rule. You set new-value to the exact, case-sensitive name of another diameter-manipulation. This action is primarily to reuse diameter manipulations that may be common to other use cases.

Caution:

Be careful not to create loops where diameter manipulations call back to themselves, either directly or indirectly, through different diameter manipulations.

find-replace-all

This action searches the object's string for the regular expression defined in match-value and replaces every matching occurrence of that expression with the value supplied in new-value. If the regular expression contains sub-groups, you can specify the sub-group to be replaced by adding [[:n:]] at the end of the expression, where n is the sub-group index (zero-based).

When action is set to find-replace-all, comparison-type is ignored, and match-value is treated as a regular expression.

group-manip

This action lets you manipulate AVPs at any level of a hierarchy of grouped AVPs. When you use this action, set avp-type to grouped.

This action is similar to the diameter-manip action in that the SBC runs the rules in the diameter-manipulation element named in new-value.

These two action types differ in their context-sensitivity. The diameter-manip action is context insensitive. When it jumps from one diameter manipulation to the next, it looks for the specified AVP from the top of the message.

Unlike diameter-manip, the group-manip action is context sensitive. It works at an AVP level. When it jumps from one diameter-manipulation to the next, it looks for the specified AVP within the grouped AVP rather than the top of the message. You can use multiple subsequent diameter manipulations with this action to move down a grouped AVP hierarchy chain, and you can use any action, other than diameter-manip, in the subsequent rules to manipulate the AVPs within the final level.

Caution:

To avoid unexpected consequences, do not use a diameter-manip action within a group-manip chain.

You can only use this action to manipulate AVPs within the same grouped AVP. For example, you can copy one AVP within a grouped AVP to another AVP at the same level within the same grouped AVP. However, you cannot copy it to a different level of the same AVP, to the root level, or to a different grouped AVP entirely. To manipulate AVPs in different grouped AVPs or at different levels, you can instead use the avp-path parameter with the add and store actions.

See Diameter Manipulation Examples for examples of rules for manipulating grouped AVPs.