In this section:

The XML messages are diameter-like, in that each message contains a diameter header followed by diameter rules for AVP encoding (see the following figure).

Basic Structure of a Diameter-like XML Message

XML messages are of the following three types:

  • Requests
  • Answers (success or error)

All three messages types are constructed in a similar and generic format as illustrated in Figure  Basic Structure of a Diameter-like XML Message.

All outgoing messages from the XML APIs are constructed with all mandatory and optional parameters, while the parsing of incoming messages do take into consideration the optionally of each and every single attribute.


XML Version

This metadata is a preamble to the XML message.

Optional for incoming messages, and always present in outgoing messages

Example:

<?xml version="1.0" encoding="utf-8"?>

Diameter Message XML Element

Start and end tag of the XML message. Encapsulates all other element and attributes contained in the XML message.

Example:

<diameter-message>

.......

</diameter-message>

Header

Mandatory parameters of three types:

Command Code

Click to read more...

Hop-by-Hop Identifier

Click to read more...  

End-to-End Identifier

Click to read more...  


Optional parameters
are of two types:

Flags

Click to read more...  

Application ID

Click to read more...  

Example:

<header application-id="0" cmd-code="257" flags="0" hh-id="1" ee-id="1234"/>

Attribute-value Pairs

“AVPs are a method of encapsulating information relevant to the Diameter message.”

AVP parameters are of two types: Mandatory and Optional.

When present, the provided value overrides the default value.

Example:

<avp vendor-id="0" avp-code="264" flags="64" avp-name="Origin-Host" type="DiameterIdentity" encoding="string" value="hhdsc1.sonus.com"/>


Mandatory Parameters 

AVPs parameters are mandatory where absence of an attribute causes errors or connection aborts.

Mandatory AVPs are of two types:

AVP Value (value)

Click to read more...  

AVP Code (avp-code)

Click to read more...  


Optional Parameters

AVP parameters are optional where a default value is provided for the attribute.

Optional parameters are of five types:

AVP Flags (flags)

Click to read more...  

AVP Vendor ID (vendor-id)

Click to read more...  

AVP Name (avp-name)

Click to read more...  


AVP Type (type)

Click to read more...  


AVP Encoding (encoding)

Click to read more...  


  • No labels