Go to primary content
User Data Repository Diameter User's Guide
Release 12.4
E92984-01
Go To Table Of Contents
Contents

Previous
Previous
Next
Next

Diameter Message Copy

Diameter Message Copy provides flexible ways to specify the conditions under which the copy of the Request (or both Request and Answer) must be made. It makes use of the existing routing principles supported by diameter to provide routing of the messages to DAS. The Message Copy is performed only after the completion of the original transaction.

Message processing

While Message Copy Trigger Points tag the messages to be copied, Diameter Message Copy in the Diameter Routing Function encodes and copies the messages to the DAS based on the details specified in the Message Copy Configuration Sets.

As a Diameter Request message is passed from the ingress side to the egress side, the message can go through modifications before being routed out to the upstream Peer. During diameter processing, the Diameter Message header and data portions can get modified; a function like Mediation, a local diameter application, and the Diameter Routing function could change the message as part of its processing. Thus, the two points of interest in the message processing are: 1) before the Diameter message is modified, and 2) after all the modifications are made and the Diameter message is sent out to the upstream Peer.

Some customers need the Answer messages received for the original Diameter Request messages from the upstream Peer to be copied along with the Request message, because the Answer message contains critical information that is useful at the DAS while processing the copied data. Diameter Message Copy supports copying the Ingress Answer messages along with the Request messages (Ingress or Egress); the Answer message alone cannot be copied to a DAS. Diameter Message Copy copies to the DAS the ingress Answer received to original Request Message, as described in Ingress Answer Message Encoding.

When the Diameter Request message that is marked for copying is sent out, the message is stored as a normal Diameter Pending Transaction. When the Answer message arrives, it has been matched to the Request message, and the message is checked for rerouting. After all required rerouting, the terminating message is checked for copy eligibility. If eligible, the Answer is further qualified as containing the desired Result Code; then the message is copied and routed to a DAS Peer.

Diameter Message Copy can be treated as another form of rerouting. The copy of the original Request and Answer are combined into one single message that is encoded as a copied message, processed as a new Diameter transaction, and passed to Peer Routing for Connection selection and transmission. The new Diameter/copy transaction is processed as any other Diameter Request, requiring a new Answer from the DAS Peer with a qualifying Result Code (separate from the original transaction) to complete the copy transaction. However, with Message Copy, the Answer message from the DAS Peer is released by the Diameter Routing Function and not forwarded on, because the Diameter Routing Function on the local DA-MP was the originator of the transaction. (Message Copy is not performed if diameter generates the Answer, or if the original Request times out.)

After a message is selected for copying, a DAS is selected for routing and the normal existing Diameter routing and congestion handling is applied. Copied Messages are assigned a Message Priority of 2, and are processed in the same way as any Priority 2 message.

Each successfully copied Diameter Request is treated as a new transaction. When a received Diameter Request is copied it becomes two transactions - one for the original and one for the Message Copy. Thus, a copied Request/Answer transaction deducts two MPS from the net MPS rating. No additional flow control or congestion mechanism specific to Message Copy is required. The additional MPS for Message Copy also accounts for copying the original Answer messages to the DAS.

Routing to a DAS Peer

A DAS Peer is treated just as another Diameter Peer. Copied messages are routed to an available DAS Peer selected from Route Lists configured or specified in the Diameter Routing Function. Route Lists are configured and intended to point to a Peer Node. The DAS Route List to which the message needs to be copied is specified in a Message Copy Configuration Set.

Note:

The DASs are expected to be direct Peers. Message Copy cannot be supported to DASs connected through other diameter applications, relays, and proxy servers.

Only Requests matching the advertised Application-ID are copied to the DAS.

If a message has been marked for Message copy to a certain DAS-Route List and all the available Connections to the Peers in the Route List do not support the Application-ID present in the copied message, the copy is not performed, an Event is raised, and the copy action is ignored.

Note:

Diameter Message Copy does not support copying the same message to multiple DAS Peers simultaneously.

If the diameter tries to route the original Diameter Request message to Peer in a Route List and the Answer is not received, diameter must attempt alternate routing by selecting other Peers in the Route Group and Route List. If alternate routing is attempted, only one copy of the original Request (Ingress or Egress), and optionally the Answer, are sent to the DAS Peer to avoid flooding the DAS Peer due to failure recovery and rerouting on the signaling side.

Diameter Message Copy evaluates the copy eligibility based only on the original terminating transaction. The Result Code/Experimental Result Code of the terminating Answer is used to evaluate the copy eligibility. This ensures that the copy of the message is sent only once to the DAS, regardless of the number of alternate routing attempts. Message Copy is evaluated based on the value of the Result code/Experimental Result code AVP in the Original terminating Answer. If an Egress Request message is selected for copying, the Egress Request corresponding to the terminating Answer is copied to the DAS.

Regardless of which message is actually copied, the copy action is always performed by Diameter Message Copy only once on the original Diameter Request messages. The Message Copy triggering is not performed on the rerouted Diameter Request messages. A Diameter Request message can be marked for copy only before the first routing attempt of the original Request message. The Message Copy triggering could happen multiple times on the Answer Messages in the alternate routing scenario (from Mediation and PRT triggering). Only the last trigger that is set on the original terminating Answer is considered for Message Copy.

DAS Peer Response and Error Handling

The DAS Peer is expected to respond to the copied message with either a 2xxx (Success) or an error Result code/Experimental Result code. When such a response is not received (either due to an unexpected response or outbound Connection failure), a retry mechanism resends the message until the expected response is received or the maximum number of retries is exhausted. The mechanism consists of a configurable number of retries and a retry timer. If a response is received, it is discarded after the release of the associated resources. If the intended Route List for the DAS Peer is unavailable, the copy is not performed (or is discarded).

Note:

Reroute on Answer based on a DAS Answer response is not supported. Message Copy provides its own rerouting mechanism.

Ingress Answer Message Encoding

When the Message Copy Configuration Set specifies that the Ingress Answer message needs to be included in the copied message, the header-stripped Answer message is encoded in the copied Request message in the data portion of a specific MsgCopyAnswer AVP. Table 13-1 describes the AVP format.

Table 13-1 Specific MsgCopyAnswer AVP Format

Byte 1 Byte 2 Byte 3 Byte 4
AVP Code = 2516(0x9d4
Flags=10000000 Length = (number of octets including 12 octets of AVP header)
Vendor ID = 323(0x143)
Data = Answer Message (Octet String)

The value of the MsgCopyAnswer AVP has the AVP portion of the received Ingress Answer message. The Diameter header is removed from the original Ingress Answer message, and the remaining portion of the message that contains all the AVPs is included as the value of the MsgCopyAnswer AVP. This is shown in Table 13-2.

Table 13-2 Portion of the Answer Message Included as Data Value of the MsgCopyAnswer AVP

Byte 1 Byte 2 Byte 3 Byte 4
Version Message Length
Command Flags Command-Code
Application-ID
Hop-by-Hop Identifier
End-to-End Identifier
AVPs (This is the only portion included as the value of the MsgCopyAnswer AVP.)

Rerouting of Copied Messages

Rerouting of the Copied Messages to DAS is different from rerouting of the original Request messages. A Copied Message is retried when the Result Code in the Answer from DAS is different from the one specified in the Message Copy Configuration Set. This is not influenced by the Reroute on Answer configured for the Application-ID. The maximum number of attempts to resend the Copied Message is limited by the Max DAS Retransmission Attempts value specified in the Message Copy Configuration Set. These attempts are not influenced by the maximum reroutes specified in the Routing Option Sets, Application-ID, or Peer configuration. The total transaction life time of a message is controlled by the settings on the ingress Peer node. In the case of a Copied Message, the Local Node is the ingress Peer. Therefore, there is no specific Transaction Lifetime for the Copied Messages. The maximum number of retry attempts and the Pending Answer Timer configured for the Peers limits the Total Transaction Lifetime of the Copied Message.

Diameter routing Message Copy congestion

You can manually enable or disable Diameter Message Copy on a system-wide basis.

Note:

The discussion in this section assumes that Diameter Message Copy is enabled.

The Diameter Routing Function can automatically disable Diameter Message Copy if the DA-MP reaches a specific level of congestion. The congestion level at which Diameter Message Copy is disabled is configurable on the Diameter > Configuration > System Options > Message Copy Options GUI page.

If the local DA-MP enters a congestion level based on the value of the configured MP Congestion Level for Message Copy, Diameter Message Copy on that DA-MP is disabled automatically as a load-shedding mechanism. Messages that are waiting for the copy action (those that have been marked and are awaiting an original Answer from a Diameter Peer) are not copied. Messages that have already been copied to the DAS and are waiting for a response from the DAS to complete the transaction are processed until normal completion (either an Answer is received from the DAS Peer, or the number of DAS retries has been exhausted and the Copy pending transaction is deleted); thus, their transactions are deleted by the Pending Transaction Manager.

An original Request is not eligible for copy until a matching Answer is received from the upstream Peer. Between the time a message is marked for copy and is actually copied, the local DA-MP's status can change. Therefore, Diameter Message Copy is declared as disabled when the next Answered marked message is processed by the Pending Transaction Manager to have a copy made and the local DA-MP has congested (based on the Message Copy MP Congestion Level). A Message Copy alarm is raised at this time.

Diameter Message Copy is enabled again when the local DA-MP Congestion Level abates (based on the configured Message Copy MP Congestion Level), and an attempt is made to copy a message that is marked for copy. The Message Copy disabled alarm is cleared only when the local DA-MP congestion (Message Copy) is abated below the configured Message Copy MP Congestion Level, and a message marked for copy is processed by Diameter Message Copy.

If Diameter Message Copy processing capacity reaches 100% congestion, further Message Copy actions cannot be completed. To process the messages, Diameter Message Copy is not disabled; but an alarm is raised to indicate the processing capacity status until the congestion abates.

Message Copy Configuration Sets

A Message Copy Configuration Set (MCCS) is a collection of attributes that determine the messages to be copied (Request or optionally the Answer), the Result code/Experimental Result code on which the Message Copy is initiated, and the number of retries to be made if the Message Copy attempt to the DAS fails. A Message Copy Trigger Point must specify a Message Copy Configuration Set when the message is marked for copying.

Up to 100 Message Copy Configuration Sets are supported. The following elements can be configured for each Message Copy Configuration Set; the fields are described in Message Copy Configuration Set elements:
Message Copy Configuration Set Name
Each Message Copy Configuration Set is assigned a unique name. A default Message Copy Configuration Set named Default is always provided and can be edited, but not deleted.
Route List of the DAS Node
The required Route List of the DAS Node element of the MCCS specifies the Route List to use for copying the message. This Route List consists of a Peer Route Group or Connection Route Group. The DAS Peers are treated like any other Diameter Peers with respect to Connection establishment and management. The CEx messages are exchanged upon establishing a Connection, and the DWx/DPx messages are exchanged as needed. Requests matching the advertised Application-ID inly are copied to the DAS. If a message has been marked for Message Copy to a certain DAS Route List and all the available Connections to the Peers in the Route List do not support the Application-ID present in the copied message, the copy is not performed, an Event is raised, and the copy action is ignored.

The Route List must exist before the MCCS can select it. Route Groups must be configured before Route Lists can be configured in Diameter Configuration.

The DASs are expected to be direct Peers. Message Copy is not supported to DASs connected through other diameter applications, relays, and proxy servers.

Message Copy Request Type
The original Request significantly altered as it traverses the routing network. Depending on the function provided by the DAS, the DAS might be interested in seeing the Request before or after the modifications made. The DAS can receive a copy of the Original Ingress Request or the Original Egress Request. The Original Ingress Request is the Request as received before any manipulation. The Original Egress Request is the Request as sent to the upstream Peer. The default is Original Ingress Request.
Ingress Answer Included
In some cases, DAS must query the contents of the original Answer received for the Request message in order to accomplish the function. When the Ingress Answer Included element is set to YES, Diameter Message Copy copies the ingress Answer that is received for the original Request Message to the DAS, as described in Ingress Answer Message Encoding. The default is NO, Answer not included.
Original Answer Result Code for Message Copy
The Result Code of the Answer messages corresponding to the Original Requests might influence the Message Copy action. For example, a DAS might not be interested in receiving a copy of the Request if the Original Transaction ended with an Answer that contained a non-2xxx Result Code/Experimental Result Code. The DAS can receive a copy of the message based on the outcome of the Original Transaction. If 2xxx is selected, Diameter Message Copy is performed only if the value of the Result Code/Experimental Result Code AVP in the Original Answer is a 2xxx. If Any Result Code is selected, the Message Copy is performed regardless of the Result Code/Experimental Result Code AVP value as long as the diameter routing function receives an Answer from the upstream Peer. The default is to copy on 2xxx only.

The Diameter Message Copy is not performed if the Answer is generated or if the original Request times out.

Alternate routing is not attempted on a given Request, but in such cases the Diameter Message Copy is attempted just once regardless of the number of alternate routing attempts. Message Copy is evaluated based on the value of the Result Code/Experimental Result Code AVP in the Original terminating Answer.

DAS Answer Result Code
DASs are expected to respond with a 2xxx Result Code or an error Result Code/Experimental Result Code upon the receipt of the copied message. If an appropriate Answer is not received, the copied message is transmitted again for the configured maximum number of times until the appropriate response is received. The DAS Message Copy Answer Result Code can be configured with one of the following choices:
  • 2xxx Result Code/Experimental Result Code in the DAS Answer
  • Any Result Code/Experimental Result Code in the DAS Answer
Max DAS Retransmission Attempts
This value determines the maximum number of times a copied message is transmitted again using the specified Route List, until the DAS Answer containing the specified Result Code is received.

In the event that an appropriate Answer is not received, the copied message is transmitted again for the configured number of times until the appropriate response is received. The default is 0 and the range is 0-4. If the value is 0, there are no retransmission attempts.

Diameter Configuration for Message Copy

The following Diameter Configuration components must be configured if Diameter Message Copy is used in the system:
  • For PRT-Triggered Message Copy:
    • One or more Route Groups
    • One or more Route Lists
    • One or more Message Copy Configuration Sets
    • One or more Peer Route Tables
    • One or more Peer Routing Rules

      A Message Copy Configuration Set must be specified in each Peer Routing Rule that is used to trigger Message Copy.

    • Set the Message Copy Feature element to Enabled in Diameter > Configuration > System Options
  • For Mediation-Triggered Message Copy:
    • One or more Route Groups
    • One or more Route Lists
    • One or more Message Copy Configuration Sets

      A Message Copy Configuration Set must be specified in each Rule Template Action that is used to trigger Message Copy for Mediation.

    • Set the Message Copy Feature element to Enabled in Diameter > Configuration > System Options

PRT-Triggered Message Copy

A Peer Routing Rule can be configured such that Request messages routed through that Peer Routing Rule can be marked for copying to a Diameter Application Server (DAS). Diameter Message Copy uses the contents and conditions that are specified in a Message Copy Configuration Set (MCCS) for copying the message. If there is valid MCCS configured in the Peer Routing Rule, the Diameter Routing Function marks the message for copy and attaches the specified MCCS. Diameter Message Copy validates the transaction using the MCCS and copies the message to the DAS.

Mediation-Triggered Diameter Message Copy

The Mediation Rule Template Message Copy Action can be defined to trigger Diameter Message Copy for messages that are processed by Diameter Mediation. Mediation Rule Templates are described in the Diameter Mediation User's Guide and associated online help.

The Message Copy Action triggers Diameter Message Copy, and specifies the Diameter-configured Message Copy Configuration Set (MCCS) that contains the Request/Answer content criteria to be used by Diameter Message Copy to copy the message to a DAS. The Message Copy Configuration Set specifies a configured Route List for the DAS. See Message Copy Configuration Sets.

Mediation Message Copy can be performed only for Request messages; the Message Copy Action is ignored if set at Mediation Trigger Point ATP10 (Diameter Answer message before being forwarded to connection).

If Diameter Message Copy is triggered for the same message from multiple locations, the Message Copy Configuration Set for the latest Message Copy triggering is used.

In the case of Request re-route due to invalid Result code, only the Message Copy Configuration Set that is associated with the Answer that completes the transaction at ATP1 is considered.

The Message Copy is performed after the completion of the original transaction. The Copied Message is not processed by the Mediation Triggering Points.