group-manip
The group manip action is used to manipulate AVPs inside grouped AVPs. For this diameter manipulation, you must set the avp-type to grouped.
The group manip action is similar to the diameter manip action in that the Oracle Communications Session Border Controller executes the diameter-manipulation configured in the new value.
There is an important difference between group manip and diameter manip. The diameter-manip action is context insensitive, meaning when it jumps from one diameter-manipulation to the next diameter-manipulation, it starts looking for the specified AVP from the top of the message.
The group manip action is context sensitive, meaning when the processing jumps from one diameter-manipulation to the next diameter-manipulation, it will look for the specified AVP within the grouped AVP. In short, the group manip works at an AVP level. All actions are allowed in the subsequent manipulations that are invoked, with the key difference being that those manipulation rules will be applied to the current grouped AVP in the chain. Thus it is possible to apply manipulation to an AVP at any level in the hierarchy.
Consider the following examples:
In order to replace the experimental-result, experimental-result-code AVP value from 5002 to 3002, a group manip can be configured as follows:
diam-manipulation
name manipExpRslt
description
diameter-manipulation-rule
name expRslt
avp-code 297
descr-avp-code
avp-type grouped
action group-manip
comparison-type case-sensitive
msg-type response
msg-cmd-codes 316,317,318
match-value
new-value expRsltCode
last-modified-by admin@console
last-modified-date 2011-09-13 18:50:33
diam-manipulation
name expRsltCode
description
diameter-manipulation-rule
name expRsltCode
avp-code 298
descr-avp-code
avp-type unsignedint32
action replace
comparison-type case-sensitive
msg-type response
msg-cmd-codes 316,317,318
match-value 5002
new-value 3002
last-modified-by admin@console
last-modified-date 2011-09-13 18:56:14
Further, if you want to add a new AVP called AvpD at the following location in the chain of AVPs Message: GrpAvpA, GrpAvpB, GrpAvpC, AvpD, then the manipulation chain would look like this
- diameter-manipulation (name=grpAvpA, action=group-manip, new-value=grpAvpB)
- diameter-manipulation (name=grpAvpB, action=group-manip, new-value=grpAvpC)
- diameter-manipulation (name=grpAvpC, action=group-manip new-value=AvpD)
- diameter-manipulation
(name=AvpD action=add new-value="added new value")
Note:
using diameter-manip from inside the group-manip chain may have unexpected impact and must be avoided.