Diameter Requests

Diameter Requests

When constructing Diameter messages to send, the N2IWF is able to modify the values of core AVPs and include additional AVPs as required.

Request configuration has several sub-sections specified within LogicApp global variables.

A sample Diameter request configuration for CAMEL/INAP calls might be:

<global name="SERVICE_IDENTIFIERS" type="array">
    <rule literal="1" var="network" value="home" />
    <rule literal="2" var="network" value="national_roaming" />
    <rule literal="3" />
</global>

<global name="RATING_GROUPS" type="array">
    <rule literal="10" var="bearer" value="voice" />
</global>

<global name="REQUESTED_TIMES" type="array">
    <rule literal="" initialdp_arg.callingPartyNumber_digits="021477577" />
    <rule literal="600" var="network" value="home" />
    <rule literal="300" var="network" value="national_roaming" />
    <rule literal="65"/>
</global>

<global name="SERVICE_CONTEXT_IDS" literal="n2iwf_test@nsquared.nz"/>

<global name="ADDITIONAL_AVPS" type="array">
    <avp name="Multiple-Services-Credit-Control">
        <value type="array">
            <avp name="IMS-Charging-Identifier" literal="n2" edr="charge_id" />
            <avp name="Extension-2" literal="2" />
        </value>
    </avp>
    <avp name="Service-Information">
        <value type="array">
            <avp name="IMS-Information">
                <value type="array">
                    <avp name="Calling-Party-Address" source="normalised_calling_party" />
                    <avp name="Called-Party-Address">
                      <value type="array">
                        <rule source="normalised_calling_party" />
                      </value>
                    </avp>
                </value>
            </avp>
            <avp name="VCS-Information">
                <value type="array">
                    <avp name="MSC-Address" from_var="msc" />
                    <avp name="VLR-Number" from_var="vlr" />
                    <avp name="ISUP-Location-Number" from_var="location" />
                    <avp name="Bearer-Capability" source="bearerCap_itc" />
                </value>
            </avp>
        </value>
    </avp>
</global>

This configuration would construct Diameter requests with the following characteristics:

Rating Groups

The LogicApp global variable RATING_GROUPS holds the selector rules that are applied to determine the value of the Diameter Rating-Group AVP.

If not present, or if no rules are specified or matched, no Rating-Group will be sent to the OCS in requests.

Service Identifiers

The LogicApp global variable RATING_GROUPS holds the selector rules that are applied to determine the value of the Diameter Service-Identifier AVP.

If not present, or if no rules are specified or matched, no Service-Identifier will be sent to the OCS in requests.

Requested Times

The LogicApp global variable REQUESTED_TIMES holds the selector rules that are applied to determine the value of the Diameter Requested-Service-UnitCC-Time AVP when using the SCUR charging model.

An empty string may be specified as a literal if no CC-Time AVP is to be sent, i.e. the Requested-Service-Unit AVP is empty. Note that this is in contradiction to the Diameter Credit-Control standards, but some OCSs require this configuration.

The following rule is appended to this ruleset to act as a fallback:

    <rule literal="60" />

Requested Units

The LogicApp global variable REQUESTED_UNITS holds the selector rules that are applied to determine the value of the Diameter Requested-Service-UnitCC-Service-Specific-Units AVP when using the ECUR or IEC charging models.

An empty string may be specified as a literal if no CC-Service-Specific-Units AVP is to be sent, i.e. the Requested-Service-Unit AVP is empty. Note that this is in contradiction to the Diameter Credit-Control standards, but some OCSs require this configuration.

The following rule is appended to this ruleset to act as a fallback:

    <rule literal="1" />

Service Context IDs

The LogicApp global variable SERVICE_CONTEXT_IDS holds the selector rules that are applied to determine the value of the Diameter Service-Context-Id AVP.

If no rule applies, the value n2iwf@nsquared.nz is used.

Additional AVPs

The LogicApp global variable ADDITIONAL_AVPS holds additional AVP definitions that are added at the end of the Diameter request.

This global is an array of AVPs, with each avp definition containing either a source value or other avp definitions. AVPs are added in the order listed.

If a source value for an AVP does not have a value (e.g. the network did not provide it for population), the AVP will not be sent. Grouped AVPs with other AVPs as their children must have at least one child present to be sent. An AVP may be marked as mandatory, in which case a failure to populate it will cause the session to be handled using error-handling rules.

Note that all AVPs listed for inclusion must exist in the N2SVCD Diameter codec or be specified in the Diameter application as custom AVPs.

In addition to the standard IWF selector rule extensions, each avp definition supports additional parameters:

Parameter Type Description
name String [Required] The AVP name for this definition. This name must be present in the default N2SVCD Diameter codec or configured as a custom AVP in the Diameter application.
edr String If provided, the AVP’s populated value will be written to EDRs produced in the field named. Note that the EDR field will not be filled if the AVP was not sent to the OCS for any reason.
Does not apply to Grouped AVPs, i.e. AVPs with children.
mandatory Boolean Whether this AVP must be included in outbound messages or not. If set to false and the AVP cannot be populated with a source value or with child AVP, the AVP will not be included in the sent Diameter request. If true and the AVP cannot be populated, the session will be handled using error-handling rules.
(Default = false, allow request without this AVP).
value Array Holds the value of an AVP. If the AVP is not Grouped and is not defined as a shorthand ruleset, may be used to specify an array of selector rules for populating the AVP. For Grouped AVPs, contains the child AVPs to populate. Note that in all cases that this must specifically be marked as type="array" in order to be correctly processed as a complex global.

Diameter Session-Id Generation

Diameter Session-Id AVPs sent to the OCS in initial requests are generated in the following format:

<prefix>;<hostname>-<application>-<instance ID>;<epoch>:<microseconds>

Where: