6 Actions for Writing Policy Rules
- Mandatory actions
- This action defines what happens when the current policy is through executing. When you are creating a policy rule in the policy wizard, these actions are displayed at the top of the list of available actions with a radio button that forces you to select only one of these actions.
- Optional actions
- These are actions executed when the conditions in the policy rule have been met. When you are creating a policy rule in the policy wizard, this is a list of actions that you can add to your policy rule. You can select none, one, several, or up to 40 of these optional actions per rule. However, each action is limited, so that it can be executed only once per policy rule.
In the same way that you can customize conditions by editing parameter values, many of these actions can be customized by specifying parameter values as well.
Actions are listed in alphabetical order. Actions also are affected by the current mode. Therefore, some of the actions documented may not be available in your policy wizard.
add custom grouped AVP name and send always
Syntax
add custom grouped AVP name and send send-mode
Parameters
Description
Add or send new custom grouped AVP to the current reply. A condition can be set specifying that the AVP is always set to send mode. If you are defining a new grouped third party AVP with members, the grouped AVP has to appear first in the policy. If you are adding a new member AVP that does not have its parent AVP added yet, the policy attempts to locate this grouped AVP in the rest of the policy. If you are including a grouped AVP multiple times in the same message, you have to follow the order in which it appears in the message.
set value to Existing or New custom AVP name and send always
Syntax
set value to avp-type custom AVP avp-name and send send-mode
Parameters
Description
Adds the third-party non-grouped AVP to the current Diameter session with the specified value. If a third-party AVP value is set in the current Diameter session, it will be sent with the corresponding outgoing message. The value parameter must corresponds to the AVP data type, otherwise this AVP will not be set. If New is selected as the type of AVP name, every time this action is called a new AVP is added to the message, even if the AVP with the same name is present in the message.
set custom AVP name value to the policy context property name
Syntax
set custom AVP avp-name value to the policy context property property-name
Parameters
Description
Makes the AVP value accessible throughout the policy context so other policies can access this AVP value as a context property. The context property variable will be set only if this AVP exists in the request and its value is not null.
mark request AVP name as failed if exists and send always
Syntax
mark request AVP name as failed if exists and send send-mode
Parameters
- name
- String representing existing AVP name, entered in the format AVPname:VendorID or, for nested AVP names in an AVP group, entered in the format [AVPname1]:VendorID.[AVPname2]:VendorID ... for the members of the grouped AVPs. There is also the option to evaluate as an expression (click to select check box).
- send-mode
- One of the following:
- always (default)
- unless rejected
- if rejected
Description
Marks a request AVP as failed in the reply message, and notifies the opposite peer of the failed AVP validation. This action supports both loaded base Diameter AVPs and third-party AVPs.
set the user property name to Existing or New custom AVP name and send always
Syntax
set the user property property-name to property-type custom AVP avp-name and send send-mode
Parameters
Description
Sets the user property value for an outgoing AVP. If a user property with the corresponding name exists, the AVP will be sent in the reply message.