Diameter Tasks - Specifying AVPs

Most of the tasks used to send request or answer messages, takes an AVP parameter list. This parameter is used to specify (Optional) AVPs to be included in the message to be sent.

AVPs is specified in a list, using the name, value and vendor id of each AVP. Example:

AVP Example

AVP name and values is specified using text and converted to values when executed. All AVPs as specified in Supported Diameter Protocols are supported.

AVP Types

AVP of different types are converted from string values to the expected type automatically. In most cases the conversion is straightforward, but the following are notes for a few types.

Enumerated

Enumerated values can be specified using a number as well as a symbolica name. For example the enumerated AVP "Framed-Protocol" can be set as follows:

Which will give the same result.

Date

AVP values of type Date are specified in one of the following formats:

yyyy-MM-dd HH:mm:ss
Set the Date to exactly as specified. For example "2014-05-21 09:00:00" will set the value to this date and time
HH:mm:ss
Set the date relatively current date, adding the number of hours, minutes and seconds. For example "00:00:30" will set the date to current date and time adding 30 seconds.

Grouped AVPs

A special case is grouped AVPs which value is specified by using the syntax:

<AVP-group> : <AVP-Value>

For example to specify Subscription-Id that includes Subscription-Id-Type and Subscription-Id-Data, the folllowing can be used:

AVP Example

This will give you the following result:

    Subscription-Id: <Grouped>
      Subscription-Id-Type: END_USER_SIP_URI
      Subscription-Id-Data: <sip:bob@ims.test>

If you need multiple instance of same grouped AVP, you can force to use a new AVP using * at the end of the name. For example:

AVP Example

This will give you the following result:

    Supported-Features: <Grouped>
      Vendor-Id: 10415
      Feature-List-ID: 1
      Feature-List: 2
    Supported-Features: <Grouped>
      Vendor-Id: 10415
      Feature-List-ID: 2
      Feature-List: 3