Decoding Diameter AVPs
Most Diameter AVPs represent one field and its value. However, some AVPs represent multiple fields. For example, the 3GPP-User-Location-Info AVP is defined as an octet string that has many fields encoded in it. Diameter Gateway can decode specific encoded AVPs that contain more than one field.
In the field examples, ASCII strings are enclosed in double quotes " ". Example values without double quotes are integer numbers.
The diameter_dictionary_base.xml
file supports the following decode operations:
- decode_3gpp_access_network_info
- decode_3gpp_mcc_mnc
- decode_3gpp_user_location_info
- decode_ascii_string
- decode_bcd_string
- decode_bcd_nro_string
- decode_hex_string
- decode_hex_ascii_string
- decode_diameter_address
- decode_octet_string
- decode_tbcd_string
Note: If any possible output field in an MDC is not defined, a warning message is logged
when the engine is started. The warning is not an error and only the defined fields will
be modified.
You can define decode operations using selective updates or in sed.extra
files. For example, the following example from a
diameter_dictionary_base_xml_sed.extra file demonstrates how to
add mappings and decode ULI to UINT32 values. Custom MDCs must be defined during engine
configuration.
# Add a mapping for a special ULI to UINT32 value mapping
# and add a mapping to decode to UINT32 values
/<!-- extra Credit-Control Request AVP lines go here -->/ a\
<avp name="3GPP-User-Location-Info" mdc_field_name="UInt32FieldLocationInfo">\
<decode_3gpp_user_location_info/>\
</avp>\
<avp name="3GPP-SGSN-MCC-MNC" mdc_field_name="UInt32FieldMccMnc">\
<decode_3gpp_mcc_mnc/>\
</avp>
Diameter decode operations work exactly the same way as selective update decode operations. For more information about selective updates, see MATRIXX Integration.
For more information about extending the Diameter dictionary, see the discussion about extending the Diameter dictionary.