4. Procedures
The M2UA layer needs to respond to various primitives it receives from other layers as well as messages it receives from the peer-to- peer messages. This section describes various procedures involved in response to these events.4.1 Procedures to Support the M2UA-User Layer
These procedures achieve the M2UA layer "Transport of MTP Level 2 / MTP Level 3 boundary" service.4.1.1 MTP Level 2 / MTP Level 3 Boundary Procedures
On receiving a primitive from the local upper layer, the M2UA layer will send the corresponding MAUP message (see Section 3) to its peer. The M2UA layer MUST fill in various fields of the common and specific headers correctly. In addition the message SHOULD be sent on the SCTP stream that corresponds to the SS7 link.4.1.2 MAUP Message Procedures
On receiving MAUP messages from a peer M2UA layer, the M2UA layer on an SG or MGC needs to invoke the corresponding layer primitives to the local MTP Level 2 or MTP Level 3 layer.
4.2 Receipt of Primitives from the Layer Management
On receiving primitives from the local Layer Management, the M2UA layer will take the requested action and provide an appropriate response primitive to Layer Management. An M-SCTP_ESTABLISH request primitive from Layer Management at an ASP will initiate the establishment of an SCTP association. The M2UA layer will attempt to establish an SCTP association with the remote M2UA peer by sending an SCTP-ASSOCIATE primitive to the local SCTP layer. When an SCTP association has been successfully established, the SCTP will send an SCTP-COMMUNICATION_UP notification primitive to the local M2UA layer. At the SGP that initiated the request, the M2UA layer will send an M-SCTP_ESTABLISH confirm primitive to Layer Management when the association setup is complete. At the peer M2UA layer, an M-SCTP_ESTABLISH indication primitive is sent to Layer Management upon successful completion of an incoming SCTP association setup. An M-SCTP_RELEASE request primitive from Layer Management initiates the shutdown of an SCTP association. The M2UA layer accomplishes a graceful shutdown of the SCTP association by sending an SCTP-SHUTDOWN primitive to the SCTP layer. When the graceful shutdown of the SCTP association has been accomplished, the SCTP layer returns an SCTP-SHUTDOWN_COMPLETE notification primitive to the local M2UA layer. At the M2UA Layer that initiated the request, the M2UA layer will send an M- SCTP_RELEASE confirm primitive to Layer Management when the association shutdown is complete. At the peer M2UA Layer, an M- SCTP_RELEASE indication primitive is sent to Layer Management upon abort or successful shutdown of an SCTP association. An M-SCTP_STATUS request primitive supports a Layer Management query of the local status of a particular SCTP association. The M2UA layer simply maps the M-SCTP_STATUS request primitive to an SCTP-STATUS primitive to the SCTP layer. When the SCTP responds, the M2UA layer maps the association status information to an M-SCTP_STATUS confirm primitive. No peer protocol is invoked. Similar LM-to-M2UA-to-SCTP and/or SCTP-to-M2UA-to-LM primitive mappings can be described for the various other SCTP Upper Layer primitives in RFC 2960 [8] such as INITIALIZE, SET PRIMARY, CHANGE HEARTBEAT, REQUEST HEARTBEAT, GET SRTT REPORT, SET FAILURE THRESHOLD, SET PROTOCOL PARAMETERS, DESTROY SCTP INSTANCE, SEND FAILURE, AND NETWORK STATUS CHANGE. Alternatively, these SCTP Upper Layer
primitives (and Status as well) can be considered for modeling purposes as a Layer Management interaction directly with the SCTP Layer. M-NOTIFY indication and M-ERROR indication primitives indicate to Layer Management the notification or error information contained in a received M2UA Notify or Error message respectively. These indications can also be generated based on local M2UA events. An M-ASP_STATUS request primitive supports a Layer Management query of the status of a particular local or remote ASP. The M2UA layer responds with the status in an M-ASP_STATUS confirm primitive. No M2UA peer protocol is invoked. An M-AS_STATUS request supports a Layer Management query of the status of a particular AS. The M2UA responds with an M-AS_STATUS confirm primitive. No M2UA peer protocol is invoked. M-ASP_UP request, M-ASP_DOWN request, M-ASP_ACTIVE request and M- ASP_INACTIVE request primitives allow Layer Management at an ASP to initiate state changes. Upon successful completion, a corresponding confirm primitive is provided by the M2UA layer to Layer Management. If an invocation is unsuccessful, an Error indication primitive is provided in the primitive. These requests result in outgoing ASP Up, ASP Down, ASP Active and ASP Inactive messages to the remote M2UA peer at an SGP.4.2.1 Receipt of M2UA Peer Management Messages
Upon successful state changes resulting from reception of ASP Up, ASP Down, ASP Active and ASP Inactive messages from a peer M2UA, the M2UA layer SHOULD invoke corresponding M-ASP_UP, M-ASP_DOWN, M-ASP_ACTIVE and M-ASP_INACTIVE, M-AS_ACTIVE, M-AS_INACTIVE, and M-AS_DOWN indication primitives to the local Layer Management. M-NOTIFY indication and M-ERROR indication primitives indicate to Layer Management the notification or error information contained in a received M2UA Notify or Error message. These indications can also be generated based on local M2UA events. All MGMT messages, except BEAT and BEAT Ack, SHOULD be sent with sequenced delivery to ensure ordering. All MGMT messages, with the exception of ASPTM, BEAT and BEAT Ack messages, SHOULD be sent on SCTP stream '0'. All ASPTM messages SHOULD be sent on the stream which normally carries the data traffic to which the message applies. BEAT and BEAT Ack messages MAY be sent using out-of-order delivery, and MAY be sent on any stream.
4.3 AS and ASP State Maintenance
The M2UA layer on the SGP maintains the state of each remote ASP, in each Application Server that the ASP is configured to receive traffic, as input to the M2UA message distribution function.4.3.1 ASP States
The state of each remote ASP, in each AS that it is configured to operate, is maintained in the M2UA layer in the SGP. The state of a particular ASP in a particular AS changes due to events. The events include: * Reception of messages from the peer M2UA layer at the ASP; * Reception of some messages from the peer M2UA layer at other ASPs in the AS (e.g., ASP Active message indicating "Override"); * Reception of indications from the SCTP layer; or * Local Management intervention. The ASP state transition diagram is shown in Figure 5. The possible states of an ASP are: ASP-DOWN: The remote M2UA peer at the ASP is unavailable and/or the related SCTP association is down. Initially all ASPs will be in this state. An ASP in this state SHOULD NOT be sent any M2UA messages, with the exception of Heartbeat, ASP Down Ack and Error messages. ASP-INACTIVE: The remote M2UA peer at the ASP is available (and the related SCTP association is up) but application traffic is stopped. In this state the ASP MAY be sent any non-MAUP M2UA messages. ASP-ACTIVE: The remote M2UA peer at the ASP is available and application traffic is active (for a particular Interface Identifier or set of Interface Identifiers).
Figure 5: ASP State Transition Diagram +--------------+ | ASP-ACTIVE | +----------------------| | | Other +-------| | | ASP in AS | +--------------+ | Overrides | ^ | | | ASP | | ASP | | Active | | Inactive | | | v | | +--------------+ | | | | | +------>| ASP-INACTIVE | | +--------------+ | ^ | ASP Down/ | ASP | | ASP Down / SCTP CDI/ | Up | | SCTP CDI/ SCTP RI | | v SCTP RI | +--------------+ | | | +--------------------->| ASP-DOWN | | | +--------------+ SCTP CDI: The SCTP CDI denotes the local SCTP layer's Communication Down Indication to the Upper Layer Protocol (M2UA) on an SGP. The local SCTP layer will send this indication when it detects the loss of connectivity to the ASP's peer SCTP layer. SCTP CDI is understood as either a SHUTDOWN_COMPLETE notification or COMMUNICATION_LOST notification from the SCTP layer. SCTP RI: The local SCTP layer's Restart indication to the upper layer protocol (M2UA) on an SG. The local SCTP will send this indication when it detects a restart from the ASP's peer SCTP layer.4.3.2 AS States
The state of the AS is maintained in the M2UA layer on the SGP. The state of an AS changes due to events. These events include: * ASP state transitions * Recovery timer triggers
The possible states of an AS are: AS-DOWN: The Application Server is unavailable. This state implies that all related ASPs are in the ASP-DOWN state for this AS. Initially the AS will be in this state. An Application Server MUST be in the AS-DOWN state before it can be removed from a configuration. AS-INACTIVE: The Application Server is available but no application traffic is active (i.e., one or more related ASPs are in the ASP- INACTIVE state, but none in the ASP-ACTIVE state). The recovery timer T(r) is not running or has expired. AS-ACTIVE: The Application Server is available and application traffic is active. This state implies that at least one ASP is in the ASP-ACTIVE state. AS-PENDING: An active ASP has transitioned to ASP-INACTIVE or ASP- DOWN and it was the last remaining active ASP in the AS. A recovery timer T(r) SHOULD be started and all incoming signalling messages SHOULD be queued by the SGP. If an ASP becomes ASP-ACTIVE before T(r) expires, the AS is moved to the AS-ACTIVE state and all the queued messages will be sent to the ASP. If T(r) expires before an ASP becomes ASP-ACTIVE, the SGP stops queuing messages and discards all previously queued messages. The AS will move to the AS-INACTIVE state if at least one ASP is in the ASP-INACTIVE state, otherwise it will move to the AS-DOWN state. Figure 6 shows an example AS state machine for the case where the AS/ASP data is pre-configured. For other cases where the AS/ASP configuration data is created dynamically, there would be differences in the state machine, especially at the creation of the AS. For example, where the AS/ASP configuration data is not created until Registration of the first ASP, the AS-INACTIVE state is entered directly upon the first successful REG REQ from an ASP. Another example is where the AS/ASP configuration data is not created until the first ASP successfully enters the ASP-ACTIVE state. In this case the AS-ACTIVE state is entered directly.
Figure 6: AS State Transition Diagram +----------+ one ASP trans to ACTIVE +-------------+ | AS- |---------------------------->| AS- | | INACTIVE | | ACTIVE | | |<--- | | +----------+ \ +-------------+ ^ | \ Tr Expiry, ^ | | | \ at least one | | | | \ ASP in ASP-INACTIVE | | | | \ | | | | \ | | | | \ | | one ASP | | all ASP \ one ASP | | Last ACTIVE trans | | trans to \ trans to | | ASP trans to to | | ASP-DOWN -------\ ASP- | | ASP-INACTIVE ASP- | | \ ACTIVE | | or ASP-DOWN INACTIVE| | \ | | (start Tr) | | \ | | | | \ | | | v \ | v +----------+ \ +-------------+ | | --| | | AS-DOWN | | AS-PENDING | | | | (queuing) | | |<----------------------------| | +----------+ Tr Expiry and no ASP +-------------+ in ASP-INACTIVE state Tr = Recovery Timer4.3.3 M2UA Management Procedures for Primitives
Before the establishment of an SCTP association the ASP state at both the SGP and ASP is assumed to be in the state ASP-DOWN. Once the SCTP association is established (see Section 4.2.1) and assuming that the local M2UA-User is ready, the local M2UA ASP Maintenance (ASPM) function will initiate the relevant procedures, using the ASP Up/ASP Down/ASP Active/ASP Inactive messages to convey the ASP state to the SGP (see Section 4.3.4). If the M2UA layer subsequently receives an SCTP-COMMUNICATION_DOWN or SCTP-RESTART indication primitive from the underlying SCTP layer, it will inform the Layer Management by invoking the M-SCTP_STATUS indication primitive. The state of the ASP will be moved to ASP- DOWN.
In the case of SCTP-COMMUNICATION_DOWN, the SCTP client MAY try to re-establish the SCTP association. This MAY be done by the M2UA layer automatically, or Layer Management MAY re-establish using the M-SCTP_ESTABLISH request primitive. In the case of an SCTP-RESTART indication at an ASP, the ASP is now considered by its M2UA peer to be in the ASP-DOWN state. The ASP, if it is to recover, must begin any recovery with the ASP-Up procedure.4.3.4 ASPM Procedures for Peer-to-Peer Messages
4.3.4.1 ASP Up Procedures
After an ASP has successfully established an SCTP association to an SGP, the SGP waits for the ASP to send an ASP Up message, indicating that the ASP M2UA peer is available. The ASP is always the initiator of the ASP Up message. This action MAY be initiated at the ASP by an M-ASP_UP request primitive from Layer Management or MAY be initiated automatically by an M2UA management function. When an ASP Up message is received at an SGP and internally the remote ASP is in the ASP-DOWN state and not considered locked-out for local management reasons, the SGP marks the remote ASP in the state ASP-INACTIVE and informs Layer Management with an M-ASP_Up indication primitive. If the SGP is aware, via current configuration data, which Application Servers the ASP is configured to operate in, the SGP updates the ASP state to ASP-INACTIVE in each AS that it is a member. Alternatively, the SGP may move the ASP into a pool of Inactive ASPs available for future configuration within Application Server(s), determined in a subsequent Registration Request or ASP Active procedure. If the ASP Up message contains an ASP Identifier, the SGP should save the ASP Identifier for that ASP. The SGP MUST send an ASP Up Ack message in response to a received ASP Up message even if the ASP is already marked as ASP-INACTIVE at the SGP. If for any local reason (e.g., management lock-out) the SGP cannot respond with an ASP Up Ack message, the SGP responds to an ASP Up message with an Error message with Reason "Refused - Management Blocking". At the ASP, the ASP Up Ack message received is not acknowledged. Layer Management is informed with an M-ASP_UP confirm primitive. When the ASP sends an ASP Up message it starts timer T(ack). If the ASP does not receive a response to an ASP Up message within T(ack), the ASP MAY restart T(ack) and resend ASP Up messages until it
receives an ASP Up Ack message. T(ack) is provisionable, with a default of 2 seconds. Alternatively, retransmission of ASP Up messages MAY be put under control of Layer Management. In this method, expiry of T(ack) results in an M-ASP_UP confirm primitive carrying a negative indication. The ASP MUST wait for the ASP Up Ack message before sending any other M2UA messages (e.g., ASP Active or REG REQ). If the SGP receives any other M2UA messages before an ASP Up message is received (other than ASP Down - see Section 4.3.4.2), the SGP MAY discard them. If an ASP Up message is received and internally the remote ASP is in the ASP-ACTIVE state, an ASP Up Ack message is returned, as well as an Error message ("Unexpected Message), and the remote ASP state is changed to ASP-INACTIVE in all relevant Application Servers. If an ASP Up message is received and internally the remote ASP is already in the ASP-INACTIVE state, an ASP Up Ack message is returned and no further action is taken.4.3.4.1.1 M2UA Version Control
If an ASP Up message with an unsupported version is received, the receiving end responds with an Error message, indicating the version the receiving node supports and notifies Layer Management. This is useful when protocol version upgrades are being performed in a network. A node upgraded to a newer version SHOULD support the older versions used on other nodes it is communicating with. Because ASPs initiate the ASP Up procedure it is assumed that the Error message would normally come from the SGP.4.3.4.2 ASP Down Procedures
The ASP will send an ASP Down message to an SGP when the ASP wishes to be removed from service in all Application Servers that it is a member and no longer receive any MAUP or ASPTM messages. This action MAY be initiated at the ASP by an M-ASP_DOWN request primitive from Layer Management or MAY be initiated automatically by an M2UA management function. Whether the ASP is permanently removed from any AS is a function of configuration management. In the case where the ASP previously used the Registration procedures (see Section 4.4) to register within Application Servers but has not unregistered from all of them prior to sending the ASP Down message, the SGP MUST consider the ASP as unregistered in all Application Servers that it is still a member.
The SGP marks the ASP as ASP-DOWN, informs Layer Management with an M-ASP_Down indication primitive, and returns an ASP Down Ack message to the ASP. The SGP MUST send an ASP Down Ack message in response to a received ASP Down message from the ASP even if the ASP is already marked as ASP-DOWN at the SGP. At the ASP, the ASP Down Ack message received is not acknowledged. Layer Management is informed with an M-ASP_DOWN confirm primitive. If the ASP receives an ASP Down Ack without having sent an ASP Down message, the ASP SHOULD now consider itself as in the ASP-DOWN state. If the ASP was previously in the ASP-ACTIVE or ASP_INACTIVE state, the ASP SHOULD then initiate procedures to return itself to its previous state. When the ASP sends an ASP Down message it starts timer T(ack). If the ASP does not receive a response to an ASP Down message within T(ack), the ASP MAY restart T(ack) and resend ASP Down messages until it receives an ASP Down Ack message. T(ack) is provisionable, with a default of 2 seconds. Alternatively, retransmission of ASP Down messages MAY be put under control of Layer Management. In this method, expiry of T(ack) results in an M-ASP_DOWN confirm primitive carrying a negative indication.4.3.4.3 ASP Active Procedures
Anytime after the ASP has received an ASP Up Ack message from the SGP, the ASP MAY send an ASP Active message to the SGP indicating that the ASP is ready to start processing traffic. This action MAY be initiated at the ASP by an M-ASP_ACTIVE request primitive from Layer Management or MAY be initiated automatically by a M2UA management function. In the case where an ASP wishes to process the traffic for more than one Application Server across a common SCTP association, the ASP Active message(s) SHOULD contain a list of one or more Interface Identifiers to indicate for which Application Servers the ASP Active message applies. It is not necessary for the ASP to include any Interface Identifiers of interest in a single ASP Active message, thus requesting to become active in all Interface Identifiers at the same time. Multiple ASP Active messages MAY be used to activate within the Application Servers independently, or in sets. In the case where an ASP Active message does not contain a Interface Identifier parameter, the receiver must know, via configuration data, of which Application Server(s) the ASP is a member. For the Application Servers that the ASP can successfully activate, the SGP responds with one or more ASP Active Ack messages, including
the associated Interface Identifier(s) and reflecting any Traffic Mode Type value present in the related ASP Active message. The Interface Identifier parameter MUST be included in the ASP Active Ack message(s) if the received ASP Active message contained any Interface Identifiers. Depending on any Traffic Mode Type request in the ASP Active message or local configuration data if there is no request, the SGP moves the ASP to the correct ASP traffic state within the associated Application Server(s). Layer Management is informed with an M-ASP_Active indication. If the SGP receives any Data messages before an ASP Active message is received, the SGP MAY discard them. By sending an ASP Active Ack message, the SGP is now ready to receive and send traffic for the related Interface Identifier(s). The ASP SHOULD NOT send MAUP messages for the related Interface Identifier(s) before receiving an ASP Active Ack message, or it will risk message loss. Multiple ASP Active Ack messages MAY be used in response to an ASP Active message containing multiple Interface Identifiers, allowing the SGP to independently acknowledge the ASP Active message for different (sets of) Interface Identifiers. The SGP MUST send an Error message ("Invalid Interface Identifier") for each Interface Identifier value that cannot be successfully activated. In the case where an "out-of-the-blue" ASP Active message is received (i.e., the ASP has not registered with the SG or the SG has no static configuration data for the ASP), the message MAY be silently discarded. The SGP MUST send an ASP Active Ack message in response to a received ASP Active message from the ASP, if the ASP is already marked in the ASP-ACTIVE state at the SGP. At the ASP, the ASP Active Ack message received is not acknowledged. Layer Management is informed with an M-ASP_ACTIVE confirm primitive. It is possible for the ASP to receive Data message(s) before the ASP Active Ack message as the ASP Active Ack and Data messages from an SG may be sent on different SCTP streams. Message loss is possible as the ASP does not consider itself in the ASP-ACTIVE state until reception of the ASP Active Ack message. When the ASP sends an ASP Active message it starts timer T(ack). If the ASP does not receive a response to an ASP Active message within T(ack), the ASP MAY restart T(ack) and resend ASP Active message(s) until it receives an ASP Active Ack message. T(ack) is provisionable, with a default of 2 seconds. Alternatively, retransmission of ASP Active messages MAY be put under the control of Layer Management. In this method, expiry of T(ack) results in an M- ASP_ACTIVE confirm primitive carrying a negative indication.
There are three modes of Application Server traffic handling in the SGP M2UA layer: Override, Load share and Broadcast. When included, the Traffic Mode Type parameter in the ASP Active message indicates the traffic handling mode to be used in a particular Application Server. If the SGP determines that the mode indicated in an ASP Active message is unsupported or incompatible with the mode currently configured for the AS, the SGP responds with an Error message ("Unsupported / Invalid Traffic Handling Mode"). If the traffic handling mode of the Application Server is not already known via configuration data, the traffic handling mode indicated in the first ASP Active message causing the transition of the Application Server state to AS-ACTIVE MAY be used to set the mode. In the case of an Override mode AS, reception of an ASP Active message at an SGP causes the (re)direction of all traffic for the AS to the ASP that sent the ASP Active message. Any previously active ASP in the AS is now considered to be in the state ASP-INACTIVE and SHOULD no longer receive traffic from the SGP within the AS. The SGP then MUST send a Notify message ("Alternate ASP Active") to the previously active ASP in the AS, and SHOULD stop traffic to/from that ASP. The ASP receiving this Notify MUST consider itself now in the ASP-INACTIVE state, if it is not already aware of this via inter-ASP communication with the Overriding ASP. In the case of a Load-share mode AS, reception of an ASP Active message at an SGP causes the direction of traffic to the ASP sending the ASP Active message, in addition to all the other ASPs that are currently active in the AS. The algorithm at the SGP for load- sharing traffic within an AS to all the active ASPs is implementation dependent. The algorithm could, for example be round-robin or based on information in the Data message (e.g., such as the SLS in the Routing Label). An SGP, upon reception of an ASP Active message for the first ASP in a Load share AS, MAY choose not to direct traffic to a newly active ASP until it determines that there are sufficient resources to handle the expected load (e.g., until there are "n" ASPs in state ASP-ACTIVE in the AS). All ASPs within a load-sharing mode AS must be able to process any Data message received for the AS, to accommodate any potential fail- over or balancing of the offered load. In the case of a Broadcast mode AS, reception of an ASP Active message at an SGP causes the direction of traffic to the ASP sending the ASP Active message, in addition to all the other ASPs that are currently active in the AS. The algorithm at the SGP for
broadcasting traffic within an AS to all the active ASPs is a simple broadcast algorithm, where every message is sent to each of the active ASPs. An SGP, upon reception of an ASP Active message for the first ASP in a Broadcast AS, MAY choose not to direct traffic to a newly active ASP until it determines that there are sufficient resources to handle the expected load (e.g., until there are "n" ASPs in state ASP-ACTIVE in the AS). Whenever an ASP in a Broadcast mode AS becomes ASP-ACTIVE, the SGP MUST tag the first DATA message broadcast in each SCTP stream with a unique Correlation Id parameter. The purpose of this Correlation Id is to permit the newly active ASP to synchronize its processing of traffic in each ordered stream with the other ASPs in the broadcast group.4.3.4.4 ASP Inactive Procedures
When an ASP wishes to withdraw from receiving traffic within an AS, the ASP sends an ASP Inactive message to the SGP. This action MAY be initiated at the ASP by an M-ASP_INACTIVE request primitive from Layer Management or MAY be initiated automatically by an M2UA management function. In the case where an ASP is processing the traffic for more than one Application Server across a common SCTP association, the ASP Inactive message contains one or more Interface Identifiers to indicate for which Application Servers the ASP Inactive message applies. In the case where an ASP Inactive message does not contain a Interface Identifier parameter, the receiver must know, via configuration data, of which Application Servers the ASP is a member and move the ASP to the ASP-INACTIVE state in all Application Servers. In the case of an Override mode AS, where another ASP has already taken over the traffic within the AS with an ASP Active ("Override") message, the ASP that sends the ASP Inactive message is already considered by the SGP to be in the state ASP- INACTIVE. An ASP Inactive Ack message is sent to the ASP, after ensuring that all traffic is stopped to the ASP. In the case of a Load-share mode AS, the SGP moves the ASP to the ASP-INACTIVE state and the AS traffic is re-allocated across the remaining ASPs in the state ASP-ACTIVE, as per the load-sharing algorithm currently used within the AS. A Notify message ("Insufficient ASP resources active in AS") MAY be sent to all inactive ASPs, if required. An ASP Inactive Ack message is sent to the ASP after all traffic is halted and Layer Management is informed with an M-ASP_INACTIVE indication primitive.
In the case of a Broadcast mode AS, the SGP moves the ASP to the ASP-INACTIVE state and the AS traffic is broadcast only to the remaining ASPs in the state ASP-ACTIVE. A Notify message ("Insufficient ASP resources active in AS") MAY be sent to all inactive ASPs, if required. An ASP Inactive Ack message is sent to the ASP after all traffic is halted and Layer Management is informed with an M-ASP_INACTIVE indication primitive. Multiple ASP Inactive Ack messages MAY be used in response to an ASP Inactive message containing multiple Interface Identifiers, allowing the SGP to independently acknowledge for different (sets of) Interface Identifiers. The SGP sends an Error message ("Invalid Interface Identifier") for each invalid or not configured Interface Identifier value in a received ASP Inactive message. The SGP MUST send an ASP Inactive Ack message in response to a received ASP Inactive message from the ASP and the ASP is already marked as ASP-INACTIVE at the SGP. At the ASP, the ASP Inactive Ack message received is not acknowledged. Layer Management is informed with an M-ASP_INACTIVE confirm primitive. If the ASP receives an ASP Inactive Ack without having sent an ASP Inactive message, the ASP SHOULD now consider itself as in the ASP-INACTIVE state. If the ASP was previously in the ASP-ACTIVE state, the ASP SHOULD then initiate procedures to return itself to its previous state. When the ASP sends an ASP Inactive message it starts timer T(ack). If the ASP does not receive a response to an ASP Inactive message within T(ack), the ASP MAY restart T(ack) and resend ASP Inactive messages until it receives an ASP Inactive Ack message. T(ack) is provisionable, with a default of 2 seconds. Alternatively, retransmission of ASP Inactive messages MAY be put under the control of Layer Management. In this method, expiry of T(ack) results in a M-ASP_Inactive confirm primitive carrying a negative indication. If no other ASPs in the Application Server are in the state ASP- ACTIVE, the SGP MUST send a Notify message ("AS-Pending") to all of the ASPs in the AS which are in the state ASP-INACTIVE. The SGP SHOULD start buffering the incoming messages for T(r)seconds, after which messages MAY be discarded. T(r) is configurable by the network operator. If the SGP receives an ASP Active message from an ASP in the AS before expiry of T(r), the buffered traffic is directed to that ASP and the timer is canceled. If T(r) expires, the AS is moved to the AS-INACTIVE state.
4.3.4.5 Notify Procedures
A Notify message reflecting a change in the AS state MUST be sent to all ASPs in the AS, except those in the ASP-DOWN state, with appropriate Status Information and any ASP Identifier of the failed ASP. At the ASP, Layer Management is informed with an M-NOTIFY indication primitive. The Notify message MUST be sent whether the AS state change was a result of an ASP failure or reception of an ASP State Management (ASPSM) / ASP Traffic Management (ASPTM) message. In the second case, the Notify message MUST be sent after any related acknowledgment messages (e.g., ASP Up Ack, ASP Down Ack, ASP Active Ack, or ASP Inactive Ack). In the case where a Notify ("AS-PENDING") message is sent by an SGP that now has no ASPs active to service the traffic, or where a Notify ("Insufficient ASP resources active in AS") message MUST be sent in the Load share or Broadcast mode, the Notify message does not explicitly compel the ASP(s) receiving the message to become active. The ASPs remain in control of what (and when) traffic action is taken. In the case where a Notify message does not contain a Interface Identifier parameter, the receiver must know, via configuration data, of which Application Servers the ASP is a member and take the appropriate action in each AS.4.3.4.6 Heartbeat Procedures
The optional Heartbeat procedures MAY be used when operating over transport layers that do not have their own heartbeat mechanism for detecting loss of the transport association (i.e., other than SCTP). Either M2UA peer may optionally send Heartbeat messages periodically, subject to a provisionable timer T(beat). Upon receiving a Heartbeat message, the M2UA peer MUST respond with a Heartbeat Ack message. If no Heartbeat Ack message (or any other M2UA message) is received from the M2UA peer within 2*T(beat), the remote M2UA peer is considered unavailable. Transmission of Heartbeat messages is stopped and the signalling process SHOULD attempt to re-establish communication if it is configured as the client for the disconnected M2UA peer. The Heartbeat message may optionally contain an opaque Heartbeat Data parameter that MUST be echoed back unchanged in the related Heartbeat Ack message. The sender, upon examining the contents of the returned Heartbeat Ack message, MAY choose to consider the remote M2UA peer as unavailable. The contents/format of the Heartbeat Data parameter is
implementation-dependent and only of local interest to the original sender. The contents may be used, for example, to support a Heartbeat sequence algorithm (to detect missing Heartbeats), and/or a time stamp mechanism (to evaluate delays). Note: Heartbeat related events are not shown in Figure 5 "ASP state transition diagram".4.4 Link Key Management Procedures
The Interface Identifier Management procedures are optional. They can be used to support automatic allocation of Signalling Terminals or Signalling Data Links [2][3].4.4.1 Registration
An ASP MAY dynamically register with an SGP as an ASP within an Application Server for individual Interface Identifier(s) using the REG REQ message. A Link Key parameter in the REG REQ specifies the parameters associated with the Link Key. The SGP examines the contents of the received Link Key parameters (SDLI and SDTI) and compares them with the currently provisioned Interface Identifiers. If the received Link Key matches an existing SGP Link Key entry, and the ASP is not currently included in the list of ASPs for the related Application Server, the SGP MAY authorize the ASP to be added to the AS. Or, if the Link Key does not currently exist and the received Link Key data is valid and unique, an SGP supporting dynamic configuration MAY authorize the creation of a new Interface Identifier and related Application Server and add the ASP to the new AS. In either case, the SGP returns a Registration Response message to the ASP, containing the same Local-LK-Identifier as provided in the initial request, a Registration Result "Successfully Registered" and the Interface Identifier. A unique method of Interface Identifier valid assignment at the SG/SGP is implementation dependent but MUST be guaranteed to be unique for each Application server or Link Key served by SGP. If the SGP determines that the received Link Key data is invalid, or contains invalid parameter values, the SGP returns a Registration Response message to the ASP, containing a Registration Result "Error - Invalid Link Key", "Error - Invalid SDTI", "Error - Invalid SDLI" as appropriate.
If the SGP determines that the Link Key parameter overlaps with an existing Link Key entry, the SGP returns a Registration Response message to the ASP, with a Registration Status of "Error - Overlapping (Non-Unique) Link Key". An incoming signalling message received at an SGP cannot match against more than one Link Key. If the SGP does not authorize the registration request, the SGP returns a REG RSP message to the ASP containing the Registration Result "Error - Permission Denied". If an SGP determines that a received Link Key does not currently exist and the SGP does not support dynamic configuration, the SGP returns a Registration Response message to the ASP, containing a Registration Result "Error - Link Key not Provisioned". If an SGP determines that a received Link Key does not currently exist and the SGP supports dynamic reconfiguration but does not have the capacity to add new Link Key and Application Server entries, the SGP returns a Registration Response message to the ASP, containing a Registration Result "Error - Insufficient Resources". An ASP MAY register multiple Link Keys at once by including a number of Link Key parameters in a single REG REQ message. The SGP MAY respond to each registration request in a single REG RSP message, indicating the success or failure result for each Link Key in a separate Registration Result parameter. Alternatively, the SGP MAY respond with multiple REG RSP messages, each with one or more Registration Result parameters. The ASP uses the Local-LK-Identifier parameter to correlate the requests with the responses.4.4.2 Deregistration
An ASP MAY dynamically de-register with an SGP as an ASP within an Application Server for individual Interface Identifier(s) using the DEREG REQ message. A Interface Identifier parameter in the DEREG REQ specifies which Interface Identifier to de-register. The SGP examines the contents of the received Interface Identifier parameter and validates that the ASP is currently registered in the Application Server(s) related to the included Interface Identifier(s). If validated, the ASP is de-registered as an ASP in the related Application Server. The deregistration procedure does not necessarily imply the deletion of Link Key and Application Server configuration data at the SGP. Other ASPs may continue to be associated with the Application Server,
in which case the Link Key data CANNOT be deleted. If a Deregistration results in no more ASPs in an Application Server, an SGP MAY delete the Link Key data. The SGP acknowledges the de-registration required by returning a DEREG RSP to the requesting ASP. The result of the de-registration is found in the Deregistration Result parameter, indicating success or failure with cause. An ASP MAY de-register multiple Interface Identifiers at once by including a number of Interface Identifiers in a single DEREG REQ message. The SGP MUST respond to each deregistration request in a single DEREG RSP message, indicating the success or failure result for each Interface Identifier in a separate Deregistration Result parameter.5. Examples of MTP2 User Adaptation (M2UA) Procedures
5.1 Establishment of associations between SGP and MGC examples
5.1.1 Single ASP in an Application Server (1+0 sparing)
This scenario shows the example M2UA message flows for the establishment of traffic between an SGP and an ASP, where only one ASP is configured within an AS (no backup). It is assumed that the SCTP association is already set-up. SGP ASP1 | |<---------ASP Up----------| |--------ASP Up Ack------->| | | |<-------ASP Active--------| |------ASP Active Ack----->| | | |------NTFY(AS-ACTIVE)---->|
5.1.2 Single ASP in an Application Server (1+0 sparing) with Dynamic Registration
This scenario is the same as the one shown in Section 5.1.1 except with a dynamic registration (automatic allocation) of an Interface Identifier(s). SGP ASP1 | |<---------ASP Up----------| |--------ASP Up Ack------->| | | |<--------REG REQ----------| |------REG REQ RESP------->| | | |<-------ASP Active--------| |------ASP Active Ack----->| | | |------NTFY(AS-ACTIVE)---->|5.1.3 Two ASPs in Application Server (1+1 sparing)
This scenario shows the example M2UA message flows for the establishment of traffic between an SGP and two ASPs in the same Application Server, where ASP1 is configured to be active and ASP2 to be standby in the event of communication failure or the withdrawal from service of ASP1. ASP2 MAY act as a hot, warm, or cold standby depending on the extent to which ASP1 and ASP2 share call/transaction state or can communicate call state under failure/withdrawal events. SGP ASP1 ASP2 | | | |<--------ASP Up----------| | |-------ASP Up Ack------->| | | | | |<-----------------------------ASP Up----------------| |----------------------------ASP Up Ack------------->| | | | | | | |<-------ASP Active-------| | |-----ASP Active Ack----->| | | | | | | | |-----NTFY(AS-ACTIVE)---->| | | | | |------------------NTFY(AS-ACTIVE)------------------>|
5.2 ASP Traffic Fail-over Examples
5.2.1 (1+1 Sparing, withdrawal of ASP, backup Override)
Following on from the example in Section 5.1.2, and ASP withdraws from service: SGP ASP1 ASP2 | | | |<-----ASP Inactive-------| | |----ASP Inactive Ack---->| | | | | |----NTFY(AS-PENDING)---->| | |------------------NTFY(AS-PENDING)----------------->| | | | |<------------------------------ ASP Active----------| |-----------------------------ASP Active Ack-------->| | | | |-----NTFY(AS-ACTIVE)---->| | |------------------NTFY(AS-ACTIVE)------------------>| | | | In this case, the SGP notifies ASP2 that the AS has moved to the AS- PENDING state. ASP2 sends ASP Active to bring the AS back to the AS-ACTIVE state. If ASP2 did not send the ASP Active message before T(r) expired, the SGP would send a NOTIFY (AS-DOWN). Note: If the SGP detects loss of the M2UA peer (through a detection of SCTP failure), the initial SGP-ASP1 ASP Inactive message exchange would not occur. SGP ASP1 ASP2 | | | (detects SCTP failure) |------------------NTFY(AS-PENDING)----------------->| | | | |<------------------------------ ASP Active----------| |-----------------------------ASP Active Ack-------->| | | | |------------------NTFY(AS-ACTIVE)------------------>| | | |
5.2.2 (1+1 Sparing, backup Override)
Following on from the example in Section 5.1.2, and ASP2 wishes to override ASP1 and take over the traffic: SGP ASP1 ASP2 | | | |<-------------------------------ASP Active----------| |-----------------------------ASP Active Ack-------->| |----NTFY(Alt ASP-Act)--->| | | | | In this case, the SGP notifies ASP1 that an alternative ASP has overridden it.5.3 SGP to MGC, MTP Level 2 to MTP Level 3 Boundary Procedures
When the M2UA layer on the ASP has a MAUP message to send to the SGP, it will do the following: - Determine the correct SGP - Find the SCTP association to the chosen SGP - Determine the correct stream in the SCTP association based on the SS7 link - Fill in the MAUP message, fill in M2UA Message Header, fill in Common Header - Send the MAUP message to the remote M2UA peer in the SGP, over the SCTP association When the M2UA layer on the SGP has a MAUP message to send to the ASP, it will do the following: - Determine the AS for the Interface Identifier - Determine the Active ASP (SCTP association) within the AS - Determine the correct stream in the SCTP association based on the SS7 link - Fill in the MAUP message, fill in M2UA Message Header, fill in Common Header - Send the MAUP message to the remote M2UA peer in the ASP, over the SCTP association
5.3.1 SS7 Link Alignment
The MGC can request that a SS7 link be brought into alignment using the normal or emergency procedure [2][3]. An example of the message flow to bring a SS7 link in-service using the normal alignment procedure is shown below. MTP2 M2UA M2UA MTP3 SGP SGP ASP ASP <----Start Req---|<---Establish Req----|<----Start Req------ ---In Serv Ind-->|----Establish Cfm--->|----In Serv Ind----> An example of the message flow to bring a SS7 link in-service using the emergency alignment procedure. MTP2 M2UA M2UA MTP3 SGP SGP ASP ASP <----Emer Req----|<--State Req (STATUS_EMER_SET)----|<----Emer Req--- -----Emer Cfm--->|---State Cfm (STATUS_EMER_SET)--->|----Emer Cfm----> <---Start Req----|<-------Establish Req-------------|<---Start Req---- ---In Serv Ind-->|--------Establish Cfm------------>|---In Serv Ind-->5.3.2 SS7 Link Release
The MGC can request that a SS7 link be taken out-of-service. It uses the Release Request message as shown below. MTP2 M2UA M2UA MTP3 SGP SGP ASP ASP <-----Stop Req-----|<---Release Req------|<-----Stop Req------ --Out of Serv Ind->|----Release Cfm----->|--Out of Serv Ind-->
The SGP can autonomously indicate that a SS7 link has gone out-of- service as shown below. MTP2 M2UA M2UA MTP3 SGP SGP ASP ASP --Out of Serv->|----Release Ind----->|--Out of Serv-->5.3.3 Set and Clear Local Processor Outage
The MGC can set a Local Processor Outage condition. It uses the State Request message as shown below. MTP2 M2UA M2UA MTP3 SGP SGP ASP ASP <----LPO Req----|<---State Req (STATUS_LPO_SET)----|<----LPO Req--- -----LPO Cfm--->|----State Cfm (STATUS_LPO_SET)--->|----LPO Cfm----> The MGC can clear a Local Processor Outage condition. It uses the State Request message as shown below. MTP2 M2UA M2UA MTP3 SGP SGP ASP ASP <---LPO Req---|<---State Req (STATUS_LPO_CLEAR)----|<----LPO Req--- ----LPO Cfm-->|----State Cfm (STATUS_LPO_CLEAR)--->|----LPO Cfm---->5.3.4 Notification of Remote Processor Outage
The SGP can indicate that Remote has entered or exited the Processor Outage condition for a SS7 link. It uses the State Indication message as shown below. MTP2 M2UA M2UA MTP3 SGP SGP ASP ASP ----RPO Ind---->|----State Ind (EVENT_RPO_ENTER)-->|-----RPO Ind----> -RPO Rcvr Ind-->|----State Ind (EVENT_RPO_EXIT)--->|--RPO Rcvr Ind-->
5.3.5 Notification of SS7 Link Congestion
The SGP can indicate that a SS7 link has become congested. It uses the Congestion Indication message as shown below. MTP2 M2UA M2UA MTP3 SGP SGP ASP ASP ----Cong Ind---->|--------Cong Ind (STATUS)------->|----Cong Ind----> -Cong Cease Ind->|--------Cong Ind (STATUS)------->|-Cong Cease Ind->5.3.6 SS7 Link Changeover
An example of the message flow for an error free changeover is shown below. In this example, there were three messages in the retransmission queue that needed to be retrieved. MTP2 M2UA M2UA MTP3 SGP SGP ASP ASP <-Rtrv BSN Req-|<--Rtrv Req (ACTION_RTRV_BSN)--|<--Rtrv BSN Req--- (seq_num = 0) -Rtrv BSN Cfm->|---Rtrv Cfm (ACTION_RTRV_BSN)->|---Rtrv BSN Cfm--> (seq_num = BSN) <-Rtrv Msg Req-|<-Rtrv Req (ACTION_RTRV_MSGS)--|<--Rtrv Msg Req--- (seq_num = FSN) -Rtrv Msg Cfm->|--Rtrv Cfm (ACTION_RTRV_MSGS)->|---Rtrv Msg Cfm--> (seq_num = 0) -Rtrv Msg Ind->|---------Retrieval Ind ------->|---Rtrv Msg Ind--> -Rtrv Msg Ind->|---------Retrieval Ind ------->|---Rtrv Msg Ind--> -Rtrv Msg Ind->|---------Retrieval Ind ------->|---Rtrv Msg Ind--> -Rtrv Compl Ind->|----Retrieval Compl Ind ---->|-Rtrv Compl Ind--> Note: The number of Retrieval Indication is dependent on the number of messages in the retransmit queue that have been requested. Only one Retrieval Complete Indication SHOULD be sent.
An example of a message flow with an error retrieving the BSN is shown below. MTP2 M2UA M2UA MTP3 SGP SGP ASP ASP <-Rtrv BSN Req-|<--Rtrv Req (ACTION_RTRV_BSN)--|<--Rtrv BSN Req--- -BSN Not Rtrv->|---Rtrv Cfm (ACTION_RTRV_BSN)->|---BSN Not Rtrv--> (seq_num = -1) An example of a message flow with an error retrieving the messages is shown below. <-Rtrv BSN Req-|<--Rtrv Req (ACTION_RTRV_BSN)--|<--Rtrv BSN Req--- -Rtrv BSN Cfm->|---Rtrv Cfm (ACTION_RTRV_BSN)->|---Rtrv BSN Cfm--> (seq_num = BSN) <-Rtrv Msg Req-|<-Rtrv Req (ACTION_RTRV_MSGS)--|<--Rtrv Msg Req--- (seq_num = FSN) -Rtrv Msg Cfm->|--Rtrv Cfm (ACTION_RTRV_MSGS)->|---Rtrv Msg Cfm--> (seq_num = -1) An example of a message flow for a request to drop messages (clear retransmission buffers) is shown below. MTP2 M2UA M2UA MTP3 SGP SGP ASP ASP -Clr RTB Req----|<-StateReq (STATUS_CLEAR_RTB)--|<--Clr RTB Req----- -Clr RTB Req--->|-StateCfm (STATUS_CLEAR_RTB)-->|---Clr RTB Req---->5.3.7 Flush and Continue
The following message flow shows a request to flush buffers. MTP2 M2UA M2UA MTP3 SGP SGP ASP ASP <--Flush Req----|<-State Req (STATUS_FLUSH_BUFS)--|<---Flush Req-- ---Flush Cfm--->|--State Cfm (STATUS_FLUSH_BUFS)->|---Flush Cfm-->
The following message flow shows a request to continue. MTP2 M2UA M2UA MTP3 SGP SGP ASP ASP <---Cont Req----|<--State Req (STATUS_CONTINUE)---|<---Cont Req--- ----Cont Cfm--->|---State Cfm (STATUS_CONTINUE)-->|----Cont Cfm-->5.3.8 Auditing of SS7 link state
It may be necessary for the ASP to audit the current state of a SS7 link. The flows below show an example of the request and all the potential responses. Below is an example in which the SS7 link is out-of-service. MTP2 M2UA M2UA MGMT SGP SGP ASP ASP |<----State Req (STATUS_AUDIT)----|<----Audit------- MTP3 ASP |-----------Release Ind---------->|-Out of Serv Ind-> MGMT ASP |-----State Cfm (STATUS_AUDIT)--->|----Audit Cfm---> Below is an example in which the SS7 link is in-service. MTP2 M2UA M2UA MGMT SGP SGP ASP ASP |<----State Req (STATUS_AUDIT)----|<----Audit------- MTP3 ASP |-----------Establish Cfm-------->|---In Serv Ind--> MGMT ASP |-----State Cfm (STATUS_AUDIT)--->|----Audit Cfm--->
Below is an example in which the SS7 link is in-service, but congested. MTP2 M2UA M2UA MGMT SGP SGP ASP ASP |<----State Req (STATUS_AUDIT)----|<----Audit------- MTP3 ASP |-----------Establish Cfm-------->|---In Serv Ind--> |----------Congestion Ind-------->|---Cong Ind-----> MGMT ASP |-----State Cfm (STATUS_AUDIT)--->|----Audit Cfm---> Below is an example in which the SS7 link is in-service, but in Remote Processor Outage. MTP2 M2UA M2UA MGMT SGP SGP ASP ASP |<----State Req (STATUS_AUDIT)----|<---Audit Req---- MTP3 ASP |-----------Establish Ind-------->|---In Serv Ind--> |---State Ind (EVENT_RPO_ENTER)-->|----RPO Enter---> MGMT ASP |-----State Cfm (STATUS_AUDIT)--->|----Audit Cfm--->