The Diameter Message Copy feature 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 DSR to provide routing of the messages to DAS. The Message Copy is performed only after the completion of the original transaction.
While Message Copy Trigger Points tag the messages to be copied, the Diameter Message Copy feature 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 the DSR processing, the Diameter Message header and data portions can get modified; a function like Mediation, a local DSR 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 by DSR, and 2) after all the modifications by DSR 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 will be useful at the DAS while processing the copied data. The Diameter Message Copy feature supports copying the Ingress Answer messages along with the Request messages (Ingress or Egress); the Answer message alone cannot be copied to a DAS. The Diameter Message Copy feature 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.
The Diameter Message Copy feature 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 DSR 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 Diameter Request successfully copied will be 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 of the DSR. 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.
A DAS Peer is treated just as another Diameter Peer. Copied messages will be 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 (or by CPA configuration).
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.
If the DSR tries to route the original Diameter Request message to Peer in a Route List and the Answer is not received, the DSR 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, will be sent to the DAS Peer to avoid flooding the DAS Peer due to failure recovery and rerouting on the signaling side.
The Diameter Message Copy feature 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 the Diameter Message Copy feature only once on the original Diameter Request messages. The Message Copy triggering will not be 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.
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 will resend 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 will be 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).
Reroute on Answer based on a DAS Answer response is not supported. Message Copy provides its own rerouting mechanism.
When the Message Copy Configuration Set specifies that the Ingress Answer message need 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. This AVP has the format described in the following table.
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 stripped out 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, as shown in Table 2.
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.) |
The rerouting of the Copied Messages to DAS is different from rerouting the original Request messages. A Copied Message will be 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 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 retry attempts and the Pending Answer Timer configured for the Peers will limit the Total Transaction Lifetime of the Copied Message.
The Diameter Message Copy feature can be manually enabled or disabled system-wide. The discussions here assume that the Diameter Message Copy feature is enabled.
The Diameter Routing Function can automatically disable the Diameter Message Copy feature if the DA-MP enters into a certain level of congestion. This congestion level at which the Diameter Message Copy feature gets disabled is configurable on the Diameter > Configuration > System Options > Message Copy Options GUI page.
If the local DA-MP enters into congestion based on the value of the configured MP Congestion Level for Message Copy, the Diameter Message Copy feature on that DA-MP will be disabled automatically as a load-shedding mechanism. Messages that are awaiting the copy action - those that have been marked and are awaiting an original Answer from a Diameter Peer - will not be copied. Those that have already been copied to the DAS and are awaiting a response from the DAS to complete the transaction will be 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); that is, their transactions will not be 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 when a message is marked for copy and is actually ready to be copied, the local DA-MP's status can change. Therefore, the Diameter Message Copy feature will be 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 will also be raised at this time.
The Diameter Message Copy feature will be 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 will be 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 the Diameter Message Copy feature.
If the Diameter Message Copy feature processing capacity reaches 100% congestion, further Message Copy actions cannot be completed. In order to process the messages, the Diameter Message Copy feature will not be disabled; but an alarm is raised indicating the processing capacity status until the congestion abates.
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.
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 DAS servers are expected to be direct Peers of the DSR. Message Copy is not supported to DAS servers that are connected through other DSRs, relays, and proxy servers.
The Diameter Message Copy is not performed if the DSR generates the Answer or if the original Request times out.
The DSR could attempt alternate routing 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.
In the event that an appropriate Answer is not received, the DSR retransmits the copied message for this 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 will be no retransmission attempts.
A Message Copy Configuration Set must be specified in each Peer Routing Rule that will be used to trigger Message Copy.
A Message Copy Configuration Set must be specified in each Rule Template Action that will be used to trigger Message Copy for Mediation.
CPA specifies the Diameter-configured Route List to use for the DAS.
The Diameter Routing Function uses the values in the Default Message Copy Configuration Set (except for the Route List of the DAS Node).
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). The Diameter Message Copy feature 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. The Diameter Message Copy feature validates the transaction using the MCCS and copies the message to the DAS.
The Diameter Message Copy feature using Message Copy Configuration Sets is backward compatible with the Trigger Points specifying only the Route Lists.
CPA configuration specifies only the DAS Route List for copying to the DAS (Route Lists must be configured in Diameter before they can be configured in CPA); CPA does not specify any Message Copy Configuration Sets. The additional details for the Message Copy of a CPA message are retrieved from the Default Message Copy Configuration Set.
Only Request messages are copied to the DAS Destination. The copy operation is carried out when the corresponding Answer message is received.
During a new DSR installation, the Default Message Copy Configuration Set is created on the DSR, and initialized with the values shown in Table 3.
Element | Value |
---|---|
Message Copy Configuration Set Name | Default |
Route List of DAS | (no value) |
Message Copy Request Type | Original Ingress Request |
Ingress Answer Included | No |
Original Answer Result code For Message Copy | 2xxx Result Code/Experimental Result Code |
DAS Answer Result Code | 2xxx Result Code/Experimental Result Code |
Max DAS Retransmission Attempts | 0 |
On upgrade from a DSR source release that does not support Message Copy Configuration Sets to a DSR that supports Message Copy Configuration Sets, the Message Copy values that are configured in the Diameter > Configuration > System Options > Message Copy tab of the source release are moved to the Default Message Copy Configuration Set of the target release.
The Default Message Copy Configuration Set can be edited if different values are needed for CPA 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 the Diameter Message Copy feature to copy the message to a DAS. The Message Copy Configuration Set specifies a configured Route List for the DAS. See Message Copy Configuration Set configuration.
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 prior to be 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.