RFC 4666

Signaling System 7 (SS7) Message Transfer Part 3 (MTP3) - User Adaptation Layer (M3UA)

๐Ÿ“… published September 2006, from ietf

RFC 4666 bestie, part 1 of 28 โœจ๐ŸŽ€

Okay so this is the M3UA spec, and it's giving main character for SS7 ๐Ÿฆ‹ Here's the title block in one glance:

  • Title: Signaling System 7 (SS7) Message Transfer Part 3 (MTP3) - User Adaptation Layer (M3UA) ๐Ÿ’œ
  • Number: RFC 4666, from the Network Working Group ๐ŸŒธ
  • Authors: K. Morneault (Ed.) from Cisco Systems, and J. Pastor-Balbas (Ed.) from Ericsson ๐Ÿ‘‘
  • Category: Standards Track ๐Ÿ”ฅ
  • Date: September 2006 ๐Ÿ“…
  • Obsoletes: RFC 3332, so this one replaces it ๐Ÿ’…
  • Updates: nothing is listed in its header ๐Ÿ™ˆ

Status of This Memo โœจ

Okay bestie, so this doc is an Internet standards track protocol for the Internet community, and it's literally asking for discussion and suggestions for improvements ๐Ÿซถ If you want to know where it stands officially, check the current edition of the "Internet Official Protocol Standards" (STD 1). Distribution of this memo is unlimited, so share away ๐ŸŒˆ

Copyright (C) The Internet Society (2006). ๐Ÿ’œ

Abstract ๐Ÿฆ‹

Okay so the big idea is this: the memo defines a protocol for carrying any SS7 MTP3-User signalling over IP, like ISUP and SCCP messages, using the services of the Stream Control Transmission Protocol ๐ŸŒธ It's not just transport, either. It also has protocol elements that help MTP3-User peers keep working smoothly across both the SS7 and IP worlds, which is so iconic ๐Ÿ‘‘

Where would you actually use this? Between a Signalling Gateway (SG) and a Media Gateway Controller (MGC) or an IP-resident Database, or between two IP-based applications ๐Ÿ’… On the SS7 side, the SG gets its signalling over a standard SS7 interface, using the SS7 Message Transfer Part (MTP) to handle transport ๐Ÿ”ฅ

And yes, this document obsoletes RFC 3332, so this is the new and improved version ๐Ÿ“


Table of Contents ๐Ÿ“š

Here's the full map of what's coming, copied exactly so you can find your way around โœจ

   1. Introduction ....................................................6
      1.1. Scope ......................................................6
      1.2. Terminology ................................................6
      1.3. M3UA Overview ..............................................9
           1.3.1. Protocol Architecture ...............................9
           1.3.2. Services Provided by the M3UA Layer ................10
                  1.3.2.1. Support for the Transport of
                           MTP3-User Messages ........................10
                  1.3.2.2. Native Management Functions ...............11
                  1.3.2.3. Interworking with MTP3 Network
                           Management Functions ......................11
                  1.3.2.4. Support for the Management of SCTP
                           Associations between the ..................11
                  1.3.2.5. Support for the Management of
                           Connections to Multiple SGPs ..............12
      1.4. Functional Areas ..........................................12
           1.4.1. Signalling Point Code Representation ...............12
           1.4.2. Routing Contexts and Routing Keys ..................14
                  1.4.2.1. Overview ..................................14
                  1.4.2.2. Routing Key Limitations ...................15
                  1.4.2.3. Managing Routing Contexts and
                           Routing Keys ..............................15
                  1.4.2.4. Message Distribution at the SGP ...........15
                  1.4.2.5. Message Distribution at the ASP ...........16
           1.4.3. SS7 and M3UA Interworking ..........................16
                  1.4.3.1. Signalling Gateway SS7 Layers .............16
                  1.4.3.2. SS7 and M3UA Interworking at the SG .......17
                  1.4.3.3. Application Server ........................17
                  1.4.3.4. IPSP Considerations .......................18
           1.4.4. Redundancy Models ..................................18
                  1.4.4.1. Application Server Redundancy .............18
           1.4.5. Flow Control .......................................18
           1.4.6. Congestion Management ..............................19
           1.4.7. SCTP Stream Mapping ................................19
           1.4.8. SCTP Client/Server Model ...........................19
      1.5. Sample Configuration ......................................20
           1.5.1. Example 1: ISUP Message Transport ..................20
           1.5.2. Example 2: SCCP Transport between IPSPs ............21
           1.5.3. Example 3: SGP Resident SCCP Layer, with
                  Remote ASP .........................................22
      1.6. Definition of M3UA Boundaries .............................23
           1.6.1. Definition of the Boundary between M3UA and
                  an MTP3-User .......................................23
           1.6.2. Definition of the Boundary between M3UA and SCTP ...23
           1.6.3. Definition of the Boundary between M3UA and
                  Layer Management ...................................24

   2. Conventions ....................................................27
   3. M3UA Protocol Elements .........................................28
      3.1. Common Message Header .....................................28
           3.1.1. M3UA Protocol Version: 8 bits (unsigned integer) ...28
           3.1.2. Message Classes and Types ..........................28
           3.1.3. Reserved: 8 Bits ...................................30
           3.1.4. Message Length: 32-Bits (Unsigned Integer) .........30
      3.2. Variable-Length Parameter Format ..........................30
      3.3. Transfer Messages .........................................33
           3.3.1. Payload Data Message (DATA) ........................33
      3.4. SS7 Signalling Network Management (SSNM) Messages .........36
           3.4.1. Destination Unavailable (DUNA) .....................36
           3.4.2. Destination Available (DAVA) .......................39
           3.4.3. Destination State Audit (DAUD) .....................40
           3.4.4. Signalling Congestion (SCON) .......................40
           3.4.5. Destination User Part Unavailable (DUPU) ...........43
           3.4.6. Destination Restricted (DRST) ......................45
      3.5. ASP State Maintenance (ASPSM) Messages ....................45
           3.5.1. ASP Up .............................................45
           3.5.2. ASP Up Acknowledgement (ASP Up Ack) ................46
           3.5.3. ASP Down ...........................................47
           3.5.4. ASP Down Acknowledgement (ASP Down Ack) ............48
           3.5.5. Heartbeat (BEAT) ...................................48
           3.5.6. Heartbeat Acknowledgement (BEAT Ack) ...............49
      3.6. Routing Key Management (RKM) Messages [Optional] ..........49
           3.6.1. Registration Request (REG REQ) .....................49
           3.6.2. Registration Response (REG RSP) ....................54
           3.6.3. Deregistration Request (DEREG REQ) .................56
           3.6.4. Deregistration Response (DEREG RSP) ................57
      3.7. ASP Traffic Maintenance (ASPTM) Messages ..................59
           3.7.1. ASP Active .........................................59
           3.7.2. ASP Active Acknowledgement (ASP Active Ack) ........60
           3.7.3. ASP Inactive .......................................61
           3.7.4. ASP Inactive Acknowledgement (ASP Inactive Ack) ....62
      3.8. Management (MGMT) Messages ................................63
           3.8.1. Error ..............................................63
           3.8.2. Notify .............................................67
   4. Procedures .....................................................70
      4.1. Procedures to Support the M3UA-User .......................70
           4.1.1. Receipt of Primitives from the M3UA-User ...........70
      4.2. Receipt of Primitives from the Layer Management ...........71
           4.2.1. Receipt of M3UA Peer Management Messages ...........72
      4.3. AS and ASP/IPSP State Maintenance .........................73
           4.3.1. ASP/IPSP States ....................................74
           4.3.2. AS States ..........................................76
           4.3.3. M3UA Management Procedures for Primitives ..........78
           4.3.4. ASPM Procedures for Peer-to-Peer Messages ..........79
                  4.3.4.1. ASP Up Procedures .........................79
                  4.3.4.2. ASP-Down Procedures .......................81
                  4.3.4.3. ASP Active Procedures .....................82
                  4.3.4.4. ASP Inactive Procedures ...................86
                  4.3.4.5. Notify Procedures .........................88
                  4.3.4.6. Heartbeat Procedures ......................89
      4.4. Routing Key Management Procedures [Optional] ..............90
           4.4.1. Registration .......................................90
           4.4.2. Deregistration .....................................92
           4.4.3. IPSP Considerations (REG/DEREG) ....................93
      4.5. Procedures to Support the Availability or
           Congestion Status of SS7 Destination ......................93
           4.5.1. At an SGP ..........................................93
           4.5.2. At an ASP ..........................................94
                  4.5.2.1. Single SG Configurations ..................94
                  4.5.2.2. Multiple SG Configurations ................94
           4.5.3. ASP Auditing .......................................94
      4.6. MTP3 Restart ..............................................96
      4.7. NIF Not Available .........................................97
      4.8. M3UA Version Control ......................................97
      4.9. M3UA Termination ..........................................97
   5. Examples of M3UA Procedures ....................................98
      5.1. Establishment of Association and Traffic between
           SGPs and ASPs .............................................98
           5.1.1. Single ASP in an Application Server ("1+0"
                  sparing), No Registration ..........................98
                  5.1.1.1. Single ASP in an Application
                           Server ("1+0" Sparing), No Registration ...98
                  5.1.1.2. Single ASP in Application Server
                           ("1+0" Sparing), Dynamic Registration .....99
                  5.1.1.3. Single ASP in Multiple
                           Application Servers (Each with "1+0"
                           Sparing), Dynamic Registration (Case 1
                           - Multiple Registration Requests) ........100
                  5.1.1.4. Single ASP in Multiple
                           Application Servers (each with "1+0"
                           sparing), Dynamic Registration (Case 2
                           - Single Registration Request) ...........101
           5.1.2. Two ASPs in Application Server ("1+1" Sparing) ....102
           5.1.3. Two ASPs in an Application Server ("1+1"
                  Sparing, Loadsharing Case) ........................103
           5.1.4. Three ASPs in an Application Server ("n+k"
                  Sparing, Loadsharing Case) ........................104
      5.2. ASP Traffic Failover Examples ............................105
           5.2.1. 1+1 Sparing, Withdrawal of ASP, Backup Override ...105
           5.2.2. 1+1 Sparing, Backup Override ......................105
           5.2.3. n+k Sparing, Loadsharing Case, Withdrawal of ASP ..106
      5.3. Normal Withdrawal of an ASP from an Application Server ...106
      5.4. Auditing Examples ........................................107

Part 1 is a wrap ๐Ÿงš Next up is Section 1, the Introduction, and it's where the real fun starts ๐Ÿ’–

1. Introduction โœจ

okay bestie, so this memo defines a protocol for carrying any SS7 MTP3-User signalling (think ISUP and SCCP messages ๐Ÿ“ž) over IP, using the Stream Control Transmission Protocol [18] ๐Ÿ’…. It also makes room for protocol elements that keep MTP3-User peers working seamlessly across the SS7 and IP worlds ๐Ÿซถ. This protocol is meant to run between a Signalling Gateway (SG) and a Media Gateway Controller (MGC) or an IP-resident Database [12], or between two IP-based applications ๐Ÿฆ‹.

1.1. Scope

so the vibe here is that we need Switched Circuit Network (SCN) signalling delivered from an SS7 Signalling Gateway (SG) to an MGC or IP-resident Database, as described in the Framework Architecture for Signalling Transport [12] ๐ŸŒธ. The delivery mechanism should meet these criteria:

  • Support for transferring all SS7 MTP3-User Part messages (e.g., ISUP [1,2,3], SCCP [4,5,6], TUP [13], etc.)
  • Support for seamless operation of MTP3-User protocol peers
  • Support for managing SCTP transport associations and traffic between an SG and one or more MGCs or IP-resident Databases
  • Support for MGC or IP-resident database process failover and load sharing
  • Support for asynchronous reporting of status changes to management

In simple transport terms, the SG will terminate SS7 MTP2 and MTP3 protocol layers [7,8,9] and deliver ISUP, SCCP, and/or any other MTP3-User protocol messages, plus certain MTP network management events, over SCTP transport associations to MTP3-User peers in MGCs or IP-resident databases ๐Ÿš€.

1.2. Terminology

this part is the glossary, and it's lowkey important, so pay attention ๐Ÿงš

  • Application Server (AS) - A logical entity serving a specific Routing Key. An example of an Application Server is a virtual switch element handling all call processing for a signalling relation, identified by an SS7 DPC/OPC. Another example is a virtual database element, handling all HLR transactions for a particular SS7 SIO/DPC/OPC combination. The AS contains a set of one or more unique Application Server Processes, of which one or more is normally actively processing traffic. Note that there is a 1:1 relationship between an AS and a Routing Key. ๐Ÿ‘‘
  • Application Server Process (ASP) - A process instance of an Application Server. An Application Server Process serves as an active or backup process of an Application Server (e.g., part of a distributed virtual switch or database). Examples of ASPs are processes (or process instances) of MGCs, IP SCPs, or IP HLRs. An ASP contains an SCTP endpoint and may be configured to process signalling traffic within more than one Application Server. ๐Ÿ’–
  • Association - An association refers to an SCTP association. The association provides the transport for the delivery of MTP3-User protocol data units and M3UA adaptation layer peer messages. ๐ŸŽ€
  • IP Server Process (IPSP) - A process instance of an IP-based application. An IPSP is essentially the same as an ASP, except that it uses M3UA in a point-to-point fashion. Conceptually, an IPSP does not use the services of a Signalling Gateway node. ๐Ÿฆ‹
  • Failover - The capability to reroute signalling traffic as required to an alternate Application Server Process, or group of ASPs, within an Application Server in the event of failure or unavailability of a currently used Application Server Process. Failover also applies upon the return to service of a previously unavailable Application Server Process. ๐Ÿ”ฅ
  • Host - The computing platform that the process (SGP, ASP or IPSP) is running on. ๐Ÿ“
  • Layer Management - Layer Management is a nodal function that handles the inputs and outputs between the M3UA layer and a local management entity. ๐ŸŒˆ
  • Linkset - A number of signalling links that directly interconnect two signalling points, which are used as a module. ๐Ÿ”—
  • MTP - The Message Transfer Part of the SS7 protocol. ๐Ÿ“ก
  • MTP3 - MTP Level 3, the signalling network layer of SS7. ๐Ÿงฉ
  • MTP3-User - Any protocol normally using the services of the SS7 MTP3 (e.g., ISUP, SCCP, TUP, etc.). ๐Ÿ’œ
  • Network Appearance - The Network Appearance is a M3UA local reference shared by SG and AS (typically an integer) that, together with an Signaling Point Code, uniquely identifies an SS7 node by indicating the specific SS7 network to which it belongs. It can be used to distinguish between signalling traffic associated with different networks being sent between the SG and the ASP over a common SCTP association. An example scenario is where an SG appears as an element in multiple separate national SS7 networks and the same Signaling Point Code value may be reused in different networks. ๐ŸŒธ
  • Network Byte Order - Most significant byte first, a.k.a Big Endian. ๐Ÿง 
  • Routing Key - A Routing Key describes a set of SS7 parameters and parameter values that uniquely define the range of signalling traffic to be handled by a particular Application Server. Parameters within the Routing Key cannot extend across more than a single Signalling Point Management Cluster. ๐Ÿ—๏ธ
  • Routing Context - A value that uniquely identifies a Routing Key. Routing Context values are configured either using a configuration management interface, or by using the routing key management procedures defined in this document. โœจ
  • Signaling End Point (SEP) - A node in the SS7 network associated with an originating or terminating local exchange (switch) or a gateway exchange. ๐Ÿ“
  • Signalling Gateway Process (SGP) - A process instance of a Signalling Gateway. It serves as an active, backup, load-sharing, or broadcast process of a Signalling Gateway. ๐Ÿ›ธ
  • Signalling Gateway (SG) - An SG is a signaling agent that receives/sends SCN native signaling at the edge of the IP network [12]. An SG appears to the SS7 network as an SS7 Signalling Point. An SG contains a set of one or more unique Signalling Gateway Processes, of which one or more is normally actively processing traffic. Where an SG contains more than one SGP, the SG is a logical entity, and the contained SGPs are assumed to be coordinated into a single management view to the SS7 network and to the supported Application Servers. ๐ŸŒ‰
  • Signalling Process - A process instance that uses M3UA to communicate with other signalling processes. An ASP, an SGP, and an IPSP are all signalling processes. ๐Ÿซง
  • Signalling Point Management Cluster (SPMC) - The complete set of Application Servers represented to the SS7 network under a single MTP entity (Signalling Point) in one specific Network Appearance. SPMCs are used to aggregate the availability, congestion, and user part status of an MTP entity (Signalling Point) that is distributed in the IP domain, for the purpose of supporting MTP3 management procedures towards the SS7 network. In some cases, the SG itself may also be a member of the SPMC. In this case, the SG availability/congestion/User_Part status should also be taken into account when considering any supporting MTP3 management actions. ๐Ÿงฎ
  • Signaling Transfer Point (STP) - A node in the SS7 network that provides network access and performs message routing, screening and transfer of signaling messages. ๐Ÿšฆ
  • Stream - An SCTP stream; a unidirectional logical channel established from one SCTP endpoint to another associated SCTP endpoint, within which all user messages are delivered in-sequence except for those submitted to the unordered delivery service. ๐ŸŒŠ

1.3. M3UA Overview

the vibes are immaculate and the next part is where it all comes together ๐ŸŒˆ

1.3.1. Protocol Architecture โœจ

Okay bestie, so the framework architecture for SCN signalling transport over IP [12] is giving multiple components ๐Ÿ’…. There's a common signalling transport protocol, plus an adaptation module that gives a particular SCN signalling protocol the services it expects from the layer underneath ๐ŸŽ€.

Within that framework, this document defines an MTP3-User adaptation module ๐Ÿฆ‹. It's suitable for supporting the transfer of messages from any protocol layer that's identified to the MTP Level 3 as an MTP User. The list includes but is not limited to ISDN User Part (ISUP) [1,2,3], Signalling Connection Control Part (SCCP) [4,5,6], and Telephone User Part (TUP) [13]. TCAP [14,15,16] or RANAP [16] messages get transferred transparently by the M3UA protocol as SCCP payload, because they're SCCP-User protocols ๐Ÿซถ.

It is recommended that M3UA use the services of the Stream Control Transmission Protocol (SCTP) [18] as the underlying reliable common signalling transport protocol ๐Ÿ‘‘. Why? Because SCTP has a bunch of features that are seriously iconic:

  • Explicit packet-oriented delivery (not stream-oriented) ๐Ÿ“ฆ
  • Sequenced delivery of user messages within multiple streams, with an option for order-of-arrival delivery of individual user messages โœจ
  • Optional multiplexing of user messages into SCTP datagrams ๐ŸŒธ
  • Network-level fault tolerance through support of multi-homing at either or both ends of an association ๐Ÿ›ก๏ธ
  • Resistance to flooding and masquerade attacks ๐Ÿ’œ
  • Data segmentation to conform to discovered path MTU size ๐Ÿ“

Under certain scenarios, like back-to-back connections without redundancy requirements, the SCTP functions above might not be a requirement. In that case, TCP MAY be used as the underlying common transport protocol ๐Ÿงš. Lowkey a nice fallback!

1.3.2. Services Provided by the M3UA Layer ๐ŸŽ€

The M3UA Layer at an ASP or IPSP provides the equivalent set of primitives at its upper layer to the MTP3-Users, the same ones MTP Level 3 gives its local MTP3-Users at an SS7 SEP ๐Ÿ’–. So the ISUP and/or SCCP layer at an ASP or IPSP is totally unaware that the MTP3 services are being offered remotely from an MTP3 Layer at an SGP, and not by a local MTP3 layer ๐Ÿ™ˆ. The MTP3 layer at an SGP might also be unaware that its local users are actually remote user parts over M3UA ๐Ÿซฃ. Basically, M3UA extends access to the MTP3 layer services to a remote IP-based application ๐ŸŒˆ. The M3UA layer does not itself provide the MTP3 services, though ๐Ÿ’….

Now, when an ASP is connected to more than one SG, the M3UA layer at an ASP should maintain the status of configured SS7 destinations and route messages according to the availability and congestion status of the routes to these destinations via each SG ๐Ÿ”ฅ.

The M3UA layer may also be used for point-to-point signalling between two IP Server Processes (IPSPs) ๐Ÿฆ‹. In this case, the M3UA layer provides the same set of primitives and services at its upper layer as the MTP3 does. But here the expected MTP3 services are not offered remotely from an SGP ๐Ÿ˜ญ. The MTP3 services are still provided, but the procedures to support them are a subset of the MTP3 procedures, because the IPSP-to-IPSP relationship is simplified and point-to-point ๐Ÿงธ.

1.3.2.1. Support for the Transport of MTP3-User Messages ๐Ÿ’Œ

The M3UA layer provides the transport of MTP-TRANSFER primitives across an established SCTP association, either between an SGP and an ASP, or between IPSPs ๐Ÿš€.

At an ASP, if a destination is reachable via multiple SGPs, the M3UA layer must also choose which SGP the message gets routed through, or support load balancing across the SGPs. Either way, the goal is minimizing missequencing ๐ŸŽฏ.

The M3UA layer does not impose a 272-octet signalling information field (SIF) length limit like the one specified by the SS7 MTP Level 2 protocol [7,8,9] ๐Ÿ™…โ€โ™€๏ธ. Larger information blocks can be accommodated directly by M3UA/SCTP, so there's no need for the upper layer segmentation/re-assembly procedure that's specified in recent SCCP or ISUP versions ๐Ÿ’…. However, in the context of an SG, the maximum 272-octet block size must be followed when interworking with an SS7 network that doesn't support the transfer of larger information blocks to the final destination. That avoids potential ISUP or SCCP fragmentation requirements at the SGPs ๐Ÿงฏ. The provisioning and configuration of the SS7 network decides the restriction on the maximum block size. Some configurations (e.g., Broadband MTP [19,20,22]) may permit larger block sizes ๐ŸŒŸ.

1.3.2.2. Native Management Functions ๐Ÿง

The M3UA layer can indicate errors associated with received M3UA messages, and notify local management and/or the peer M3UA, as appropriate ๐Ÿ””.

1.3.2.3. Interworking with MTP3 Network Management Functions ๐Ÿ›ฐ๏ธ

At the SGP, the M3UA layer provides interworking with MTP3 management functions, so the user SCN signalling applications keep running seamlessly across the SS7 and IP domains ๐ŸŒŠ. This includes:

  • providing an indication to MTP3-Users at an ASP that a destination in the SS7 network is not reachable;
  • providing an indication to MTP3-Users at an ASP that a destination in the SS7 network is now reachable;
  • providing an indication to MTP3-Users at an ASP that messages to a destination in the SS7 network are experiencing SS7 congestion;
  • providing an indication to the M3UA layer at an ASP that the routes to a destination in the SS7 network are restricted; and
  • providing an indication to MTP3-Users at an ASP that a MTP3-User peer is unavailable.

The M3UA layer at an ASP keeps track of the state of the routes to remote SS7 destinations. It may also start an audit of the availability and the restricted or congested state of remote SS7 destinations ๐Ÿ•ต๏ธโ€โ™€๏ธ. That information gets requested from the M3UA layer at the SGP.

The M3UA layer at an ASP may also tell the SG that the M3UA layer itself, the ASP, or the ASP's Host is congested ๐Ÿ˜ฎโ€๐Ÿ’จ.

1.3.2.4. Support for the Management of SCTP Associations between the SGP and ASPs ๐Ÿค

The M3UA layer at the SGP keeps track of the availability state of all configured remote ASPs. This is how it manages the SCTP Associations and the traffic between the M3UA peers ๐Ÿ’œ. Also, the active/inactive and congestion state of remote ASPs gets maintained.

The M3UA layer MAY be instructed by local management to establish an SCTP association to a peer M3UA node ๐ŸŽฌ. This can be done using the M-SCTP_ESTABLISH primitives (see Section 1.6.3 for a description of management primitives) to request, indicate, and confirm the establishment of an SCTP association with a peer M3UA node. To avoid redundant SCTP associations between two M3UA peers, one side (client) SHOULD be designated to establish the SCTP association. The other option is M3UA configuration information maintained to detect redundant associations (e.g., via knowledge of the expected local and remote SCTP endpoint addresses) ๐Ÿ”.

Local management MAY request the status of the underlying SCTP associations from the M3UA layer, using the M-SCTP_STATUS request and confirm primitives ๐Ÿ“Š. Also, the M3UA MAY autonomously inform local management of the reason for the release of an SCTP association. That reason is determined either locally within the M3UA layer or by a primitive from the SCTP ๐Ÿ’€.

Also, the M3UA layer MAY inform local management of a change in status of an ASP or AS. This MAY be achieved using the M-ASP_STATUS request or M-AS_STATUS request primitives ๐ŸŒธ.

1.3.2.5. Support for the Management of Connections to Multiple SGPs ๐Ÿงฉ

As shown in Figure 1, an ASP may be connected to multiple SGPs ๐Ÿ—บ๏ธ. In that case, a particular SS7 destination may be reachable via more than one SGP and/or SG, meaning via more than one route. MTP3 users only keep status on a destination and not on a route basis. So the M3UA layer must maintain the status (availability, restriction, and/or congestion of route to destination) of the individual routes. It also has to derive the overall availability or congestion status of the destination from the status of the individual routes, and inform the MTP3 users of this derived status whenever it changes ๐ŸŽ€๐Ÿ’….

1.4. Functional Areas ๐Ÿญ

1.4.1. Signalling Point Code Representation ๐Ÿ“

okay bestie, so picture a Signalling Gateway (SG) as the ultimate social connector ๐Ÿฆ‹. Within an SS7 network, it might be charged with representing a whole set of nodes from the IP domain into the SS7 network, all for routing purposes. The SG is also a signalling point in its own right in the SS7 network, so it can be addressed with an SS7 Point Code for MTP3 Management purposes. That same SG Point Code might also be used to address any local MTP3-Users sitting at the SG, like a local SCCP layer ๐Ÿ’….

An SG can be logically partitioned to operate in multiple SS7 network appearances ๐ŸŒˆ. When that happens, the SG can be addressed with a Point Code in each network appearance, and each one represents a set of nodes in the IP domain into that particular SS7 network. Alias Point Codes [8] may also be used within an SG network appearance โœจ.

When an SG contains more than one SGP, the MTP3 routeset, SPMC, and remote AS/ASP states of each SGP SHOULD be coordinated across all the SGPs ๐Ÿซถ. Rerouting of traffic between the SGPs MAY also be supported ๐Ÿ”ฅ.

Application Servers can be represented under the same Point Code as the SG, under their own individual Point Codes, or grouped with other Application Servers for Point Code preservation purposes ๐ŸŽ€. If you want, one single Point Code can represent the SG and all the Application Servers together. Iconic efficiency ๐Ÿ‘‘.

Now, if an ASP (or a group of ASPs) is reachable from the SS7 network through more than one SG, and each SG has its own Point Code, the ASP(s) will typically be represented by a Point Code that is separate from any SG Point Code ๐Ÿงš. This lets the SS7 network see these SGs as "STPs", each with an ongoing "route" to the same ASP(s). And if the ASP(s) become unavailable from one of the SGs during a failure, MTP3 route management messaging between the SG and the SS7 network keeps things moving. Simple SS7 rerouting through an alternate SG happens without changing the Destination Point Code Address of the SS7 traffic to the ASP(s). No drama, just vibes ๐Ÿ’–.

Where a particular AS can be reached via more than one SGP, the corresponding Routing Keys in those SGPs should be identical ๐Ÿ’œ. (Note: the SGP Routing Key configuration data can be temporarily out of sync during configuration updates, so don't panic if you spot that ๐Ÿ™ˆ.)

                                 +--------+
                                 |        |
                    +------------+  SG 1  +--------------+
        +-------+   |  SS7 links | "STP"  |  IP network  |     ----
        |  SEP  +---+            +--------+              +---/      \
        |   or  |                    |*                      | ASPs  |
        |  STP  +---+            +--------+              +---\      /
        +-------+   |            |        |              |     ----
                    +------------+  SG 2  +--------------+
                                 | "STP"  |
                                 +--------+

Figure 1. Example with mated SGs ๐Ÿฆ‹

Note: SG-to-SG communication (i.e., "C-links") is recommended for carrier grade networks, using an MTP3 linkset or an equivalent, so that traffic can be rerouted between the SGs if there are route failures. Where SGPs are used, inter-SGP communication might be used too. Inter-SGP protocol is outside of the scope of this document ๐ŸŒธ.

Here's an example of a signalling gateway split into two network appearances ๐Ÿ’…:

                                 SG
        +-------+              +---------------+
        |  SEP  +--------------| SS7 Ntwk.|M3UA|              ----
        +-------+   SS7 links  |   "A"    |    |            /      \
                               |__________|    +-----------+  ASPs  |
                               |          |    |            \      /
        +-------+              | SS7 Ntwk.|    |              ----
        |  SEP  +--------------+   "B"    |    |
        +-------+              +---------------+

Figure 2. Example with multiple network โญ

1.4.2. Routing Contexts and Routing Keys ๐Ÿ—๏ธ

1.4.2.1. Overview

The distribution of SS7 messages between the SGP and the Application Servers is decided by the Routing Keys and their associated Routing Contexts ๐ŸŽฏ. A Routing Key is basically a set of SS7 parameters used to filter SS7 messages. The Routing Context parameter is a 4-octet value (an integer) that is tied to that Routing Key in a 1:1 relationship. So the Routing Context can be thought of as an index into a sending node's Message Distribution Table, the one that holds the Routing Key entries ๐Ÿ“’.

The possible SS7 address/routing information that makes up a Routing Key entry includes, for example, the OPC, DPC, and SI found in the MTP3 routing label ๐Ÿท๏ธ. Some example Routing Keys are: the DPC alone, the DPC/OPC combination, or the DPC/OPC/SI combination. The exact information used to define an M3UA Routing Key depends on the application and the network, and none of those examples are mandated, so you're free to choose ๐ŸŒˆ.

An Application Server Process may be set up to process signalling traffic for more than one Application Server, all over a single SCTP Association ๐Ÿงš. In ASP Active and ASP Inactive management messages, the signalling traffic to be started or stopped is told apart by the Routing Context parameter. At an ASP, the Routing Context parameter uniquely identifies the range of signalling traffic tied to each Application Server that the ASP is configured to receive ๐Ÿ’–.

1.4.2.2. Routing Key Limitations

Routing Keys SHOULD be unique, in the sense that each received SS7 signalling message SHOULD have a full or partial match to a single routing result ๐Ÿ”. A partial match example would be a default Routing Key, which becomes the result when no other Routing Keys include the message. It is not necessary for the parameter range values within a particular Routing Key to be contiguous ๐Ÿ™Œ.

1.4.2.3. Managing Routing Contexts and Routing Keys

There are two ways to provision a Routing Key at an SGP ๐ŸŽ€. A Routing Key may be configured statically, using an implementation-dependent management interface, or dynamically, using the M3UA Routing Key registration procedure.

When a management interface is used to configure Routing Keys, the message distribution function within the SGP is not limited to the set of parameters defined in this document. Other implementation-dependent distribution algorithms may be used ๐Ÿ› ๏ธ.

1.4.2.4. Message Distribution at the SGP

To direct messages received from the SS7 MTP3 network to the right IP destination, the SGP must perform a message distribution function using information from the received MTP3-User message ๐Ÿšฆ.

To support this message distribution, the SGP might, for example, maintain the equivalent of a network address translation table. That table maps incoming SS7 message information to an Application Server for a particular application and range of traffic. This could be done by comparing elements of the incoming SS7 message with the Routing Keys currently defined in the SGP ๐Ÿ”.

Those Routing Keys could, in turn, map directly to an Application Server that is enabled by one or more ASPs ๐Ÿ’œ. These ASPs give the SGP dynamic status information about their availability, traffic-handling capability, and congestion, using the various management messages defined in the M3UA protocol ๐Ÿ“ก.

The list of ASPs in an AS is assumed to be dynamic. It takes into account the availability, traffic-handling capability, and congestion status of each ASP in the list, plus configuration changes and possible failover mechanisms ๐ŸŒŠ.

Normally, one or more ASPs are active (i.e., currently processing traffic) in the AS. But in certain failure and transition cases, there may be no active ASP available at all ๐Ÿ˜ฌ. Broadcast, loadsharing, and backup scenarios are all supported ๐ŸŽ‰.

When there's no matching Routing Key entry for an incoming SS7 message, a default treatment MAY be specified ๐Ÿ•ต๏ธ. Possible solutions are to provide a default Application Server at the SGP that directs all unallocated traffic to a (set of) default ASPs, or to drop the message and send a notification to layer management. The treatment of unallocated traffic is implementation dependent ๐Ÿคทโ€โ™€๏ธ.

1.4.2.5. Message Distribution at the ASP

The ASP must choose an SGP to direct a message to the SS7 network ๐Ÿ›ฃ๏ธ. This is done by looking at the Destination Point Code (and possibly other elements of the outgoing message, such as the SLS value). The ASP must also take into account whether the related Routing Context is active or not (see Section 4.3.4.3) ๐Ÿ‘€.

Implementation Note: Where more than one route (or SGP) is possible for routing to the SS7 network, the ASP could, for example, maintain a dynamic table of available SGP routes for the SS7 destinations. That table would take into account the SS7 destination availability/restricted/congestion status received from the SGP(s), the availability status of the individual SGPs, configuration changes, and failover mechanisms. There is, however, no M3UA messaging to manage the status of an SGP (e.g., SGP-Up/Down/Active/Inactive messaging) ๐Ÿ’….

Whenever an SCTP association to an SGP exists, the SGP is assumed to be ready for the purposes of responding to M3UA ASPSM messages (refer to Section 3) โœจ.

1.4.3. SS7 and M3UA Interworking ๐Ÿค

In the case of SS7 and M3UA interworking, the M3UA adaptation layer is designed to extend the MTP3-defined user primitives ๐ŸŒท.

1.4.3.1. Signalling Gateway SS7 Layers

The SG is responsible for terminating MTP Level 3 of the SS7 protocol, and for offering an IP-based extension to its users ๐Ÿง .

From an SS7 perspective, the Signalling Gateway is expected to transmit and receive SS7 Message Signalling Units (MSUs) over a standard SS7 network interface, using the SS7 Message Transfer Part (MTP) [7,8,9] ๐Ÿ“ถ.

MTP Level 2 signalling links are not the only option for a standard SS7 network interface. ATM-based High Speed Links can also be used, with the services of the Signalling ATM Adaptation Layer (SAAL) [19,20] โšก.

Note: IP-based interfaces can also be present, using the services of the MTP2-User Adaptation Layer (M2UA) [24] or M2PA [25] ๐ŸŒ.

These could be terminated at a Signalling Transfer Point (STP) or a Signalling End Point (SEP). Using the services of MTP3, the SG could be capable of communicating with remote SS7 SEPs in a quasi-associated fashion, where STPs may be present in the SS7 path between the SEP and the SG ๐Ÿงšโ€โ™€๏ธ.

1.4.3.2. SS7 and M3UA Interworking at the SG

The SGP provides functional interworking of transport functions between the SS7 network and the IP network. It does this by also supporting the M3UA adaptation layer ๐ŸŽ€. It allows MTP3-User signalling messages to be transferred to and from an IP-based Application Server Process, wherever the peer MTP3-User protocol layer exists ๐Ÿ’ซ.

For SS7 user part management, the MTP3-User protocols at ASPs are required to receive indications of SS7 signalling point availability, SS7 network congestion, and remote User Part unavailability, just as they would be expected to in an SS7 SEP node ๐Ÿซง. To make this happen, the MTP-PAUSE, MTP-RESUME, and MTP-STATUS indication primitives received at the MTP3 upper layer interface at the SG need to be propagated to the remote MTP3-User lower layer interface at the ASP ๐Ÿฆ‹.

MTP3 management messages (such as TFPs or TFAs received from the SS7 network) MUST NOT be encapsulated as Data message Payload Data and sent either from SG to ASP or from ASP to SG ๐Ÿšซ. The SG MUST terminate these messages and generate M3UA messages, as appropriate ๐ŸŒˆ.


1.4.3.3. Application Server

okay so a cluster of application servers is in charge of giving overall support for one or more SS7 upper layers ๐Ÿ’–. From the SS7 side, a Signalling Point Management Cluster (SPMC) gives complete support for the upper layer service for a given point code โœจ.

As an example, an SPMC doing MGC work could give complete support for ISUP (and any other MTP3 user located at the point code of the SPMC) for a given point code ๐ŸŽ€.

In the case where an ASP is connected to more than one SGP, the M3UA layer must maintain the status of configured SS7 destinations and route messages according to the availability/congestion/restricted status of the routes to those SS7 destinations ๐Ÿฆ‹.

1.4.3.4. IPSP Considerations

Since IPSPs use M3UA in a point-to-point way, there's no concept of routing messages beyond the remote end ๐Ÿ’…. So SS7 and M3UA interworking is not necessary for this model ๐ŸŒธ.

1.4.4. Redundancy Models

1.4.4.1 Application Server Redundancy

All MTP3-User messages (e.g., ISUP, SCCP) that match a provisioned Routing Key at an SGP get mapped to an Application Server ๐Ÿ“.

The Application Server is the set of all ASPs associated with a specific Routing Key ๐Ÿงš. Each ASP in this set may be active, inactive, or unavailable. Active ASPs handle traffic, and inactive ASPs might be used when active ASPs become unavailable ๐Ÿ’œ.

The failover model supports an "n+k" redundancy model, where "n" ASPs is the minimum number of redundant ASPs required to handle traffic and "k" ASPs are available to take over for a failed or unavailable ASP ๐Ÿ‘‘. Traffic SHOULD be sent after "n" ASPs are active. "k" ASPs MAY be either active at the same time as "n" or kept inactive until needed due to a failed or unavailable ASP โœจ.

A "1+1" active/backup redundancy is a subset of this model ๐Ÿซถ. A simplex "1+0" model is also supported as a subset, with no ASP redundancy ๐Ÿ™ˆ.

1.4.5. Flow Control

Local Management at an ASP may wish to stop traffic across an SCTP association to temporarily remove the association from service or to perform testing and maintenance activity ๐Ÿ”ฅ. The function could optionally be used to control the start of traffic on to a newly available SCTP association ๐ŸŒˆ.

1.4.6. Congestion Management

The M3UA layer is informed of local and IP network congestion by means of an implementation-dependent function (e.g., an implementation-dependent indication from the SCTP of IP network congestion) ๐ŸŒธ.

At an ASP or IPSP, the M3UA layer indicates IP network congestion to local MTP3-Users by means of an MTP-STATUS primitive, as per current MTP3 procedures, so they can invoke appropriate upper-layer responses ๐Ÿ’–.

When an SG determines that the transport of SS7 messages to a Signalling Point Management Cluster (SPMC) is encountering IP network congestion, the SG MAY trigger SS7 MTP3 Transfer Controlled management messages to originating SS7 nodes, per the congestion procedures of the relevant MTP3 standard. The triggering of SS7 MTP3 Management messages from an SG is an implementation-dependent function ๐Ÿฆ‹.

The M3UA layer at an ASP or IPSP MAY indicate local congestion to an M3UA peer with an SCON message. When an SG receives a congestion message (SCON) from an ASP and the SG determines that an SPMC is now encountering congestion, it MAY trigger SS7 MTP3 Transfer Controlled management messages to concerned SS7 destinations according to the congestion procedures of the relevant MTP3 standard ๐Ÿšจ.

1.4.7. SCTP Stream Mapping

The M3UA layer at both the SGP and ASP also supports assigning signalling traffic into streams within an SCTP association ๐Ÿงœ. Traffic that requires sequencing SHOULD be assigned to the same stream. To make that happen, MTP3-User traffic may be assigned to individual streams based on, for example, the SLS value in the MTP3 Routing Label, subject of course to the maximum number of streams supported by the underlying SCTP association ๐ŸŽ€.

The following rules apply (see Section 3.1.2) ๐Ÿ’…:

  1. The DATA message MUST NOT be sent on stream 0.
  2. The ASPSM, MGMT, RKM classes SHOULD be sent on stream 0 (other than BEAT, BEAT ACK and NTFY messages).
  3. The SSNM, ASPTM classes and BEAT, BEAT ACK and NTFY messages can be sent on any stream.

1.4.8. SCTP Client/Server Model

It is recommended that the SGP and ASP be able to support both client and server operation ๐ŸŒŸ. The peer endpoints using M3UA SHOULD be configured so that one always takes on the role of client and the other the role of server for initiating SCTP associations. The default orientation would be for the SGP to take on the role of server while the ASP is the client ๐Ÿญ. In this case, ASPs SHOULD initiate the SCTP association to the SGP ๐Ÿซถ.

In the case of IPSP to IPSP communication, the peer endpoints using M3UA SHOULD be configured so that one always takes on the role of client and the other the role of server for initiating SCTP associations ๐Ÿงš.

The SCTP and TCP Registered User Port Number Assignment for M3UA is 2905 ๐ŸŽ€.

1.5. Sample Configuration

1.5.1. Example 1: ISUP Message Transport

      ********   SS7   *****************   IP   ********
      * SEP  *---------*      SGP      *--------* ASP  *
      ********         *****************        ********

      +------+         +---------------+        +------+
      | ISUP |         |     (NIF)     |        | ISUP |
      +------+         +------+ +------+        +------+
      | MTP3 |         | MTP3 | | M3UA |        | M3UA |
      +------|         +------+-+------+        +------+
      | MTP2 |         | MTP2 | | SCTP |        | SCTP |
      +------+         +------+ +------+        +------+
      |  L1  |         |  L1  | |  IP  |        |  IP  |
      +------+         +------+ +------+        +------+
          |_______________|         |______________|

      SEP - SS7 Signalling End Point
      SCTP - Stream Control Transmission Protocol
      NIF - Nodal Interworking Function

In this example, the SGP provides an implementation-dependent nodal interworking function (NIF) that lets the MGC swap SS7 signalling messages with the SS7-based SEP ๐Ÿ›ธ. The NIF within the SGP is the interface between MTP3 and M3UA inside the SGP. This nodal interworking function has no visible peer protocol with either the MGC or SEP. It also gives network status information to one or both sides of the network ๐ŸŒˆ.

For internal SGP modeling purposes, at the NIF level, SS7 signalling messages destined for the MGC arrive as MTP-TRANSFER indication primitives from the MTP Level 3 upper layer interface. They get translated to MTP-TRANSFER request primitives and sent to the local M3UA-resident message distribution function for ongoing routing to the final IP destination ๐Ÿ’ซ. Messages received from the local M3UA network address translation and mapping function as MTP-TRANSFER indication primitives are sent to the MTP Level 3 upper-layer interface as MTP-TRANSFER request primitives, for ongoing MTP Level 3 routing to an SS7 SEP ๐Ÿฆ‹. For the purposes of providing SS7 network status information, the NIF also delivers MTP-PAUSE, MTP-RESUME, and MTP-STATUS indication primitives, received from the MTP Level 3 upper-layer interface, to the local M3UA-resident management function ๐Ÿ”ฅ. As an implementation and network option, restricted destinations are communicated from MTP network management to the local M3UA-resident management function too ๐ŸŒธ.

1.5.2. Example 2: SCCP Transport between IPSPs

               ********    IP    ********
               * IPSP *          * IPSP *
               ********          ********

               +------+          +------+
               |SCCP- |          |SCCP- |
               | User |          | User |
               +------+          +------+
               | SCCP |          | SCCP |
               +------+          +------+
               | M3UA |          | M3UA |
               +------+          +------+
               | SCTP |          | SCTP |
               +------+          +------+
               |  IP  |          |  IP  |
               +------+          +------+
                   |________________|

This example shows an architecture where no Signalling Gateway is used ๐Ÿ“. Here, SCCP messages are exchanged directly between two IP-resident IPSPs, each with a resident SCCP-User protocol instance, such as RANAP or TCAP ๐Ÿ’–. SS7 network interworking is not required, so there's no MTP3 network management status information for the SCCP and SCCP-User protocols to consider ๐Ÿง. Any MTP-PAUSE, MTP-RESUME, or MTP-STATUS indications from the M3UA layer to the SCCP layer should consider the status of the SCTP Association and underlying IP network, and any congestion information received from the remote site โœจ.

1.5.3. Example 3: SGP Resident SCCP Layer, with Remote ASP โœจ

         ********   SS7   *****************   IP   ********
         * SEP  *---------*               *--------*      *
         *  or  *         *      SGP      *        * ASP  *
         * STP  *         *               *        *      *
         ********         *****************        ********

         +------+         +---------------+        +------+
         | SCCP-|         |     SCCP      |        | SCCP-|
         | User |         +---------------+        | User |
         +------+           |   _____   |          +------+
         | SCCP |           |  |     |  |          | SCCP |
         +------+         +------+-+------+        +------+
         | MTP3 |         | MTP3 | | M3UA |        | M3UA |
         +------|         +------+ +------+        +------+
         | MTP2 |         | MTP2 | | SCTP |        | SCTP |
         +------+         +------+ +------+        +------+
         |  L1  |         |  L1  | |  IP  |        |  IP  |
         +------+         +------+ +------+        +------+
             |_______________|         |______________|

                 STP - SS7 Signalling Transfer Point

okay so in this one the SGP gets its own SCCP layer ๐Ÿงš and that layer can do the SCCP Global Title Translation (GTT) thing for messages that are logically addressed to the SG SCCP. no cap, it's giving very "the SGP is the main character" energy ๐Ÿ‘‘. If the GTT result is an SS7 DPC or DPC/SSN address of an SCCP peer sitting in the IP domain, the resulting MTP-TRANSFER request primitive gets sent to the local M3UA-resident network address translation and mapping function, which keeps routing it to the final IP destination ๐Ÿ’–

it works the other way too ๐Ÿฆ‹ The SCCP instance in an SGP can do the SCCP GTT service for messages sent to it from SCCP peers in the IP domain. In that case, MTP-TRANSFER indication primitives go from the local M3UA-resident network address translation and mapping function up to the SCCP for GTT. If the GTT result is the address of an SCCP peer in the SS7 network, the resulting MTP-TRANSFER request primitive is handed to the MTP3 so it can be delivered to an SS7-resident node ๐ŸŒธ

and here's a plot twist ๐Ÿ˜ญ The SCCP GTT at the SGP could yield the address of an SCCP peer in the IP domain, and then that MTP-TRANSFER request primitive would get sent right back down to the M3UA layer for delivery to an IP destination. wild, I know.

for internal SGP modeling purposes, this can be done with an implementation-dependent nodal interworking function inside the SGP. It effectively sits below the SCCP and routes MTP-TRANSFER request/indication messages to and from both the MTP3 and the M3UA layer, based on the SS7 DPC or DPC/SI address information. This nodal interworking function has no visible peer protocol with either the ASP or the SEP, so nobody else can see it ๐Ÿ™ˆ

last thing, and this is the important part ๐Ÿ’… The services and interface provided by the M3UA layer are the same as in Example 1, and the functions happening in the SCCP entity are transparent to the M3UA layer. The SCCP protocol functions are not reproduced in the M3UA protocol. so M3UA stays in its lane, periodt ๐ŸŽ€


1.6. Definition of M3UA Boundaries ๐Ÿฆ‹

okay this section is all about where M3UA's boundaries are ๐Ÿงš They are SCTP, Layer Management, and the MTP3-User. Here's how it looks:

        +-----------+
        | MTP3-User |
        +-----------+
              |
              |
        +-----------+     +------------+
        |    M3UA   |-----| Layer Mgmt |
        +-----------+     +------------+
              |
              |
        +-----------+
        |    SCTP   |
        +-----------+

1.6.1. Definition of the Boundary between M3UA and an MTP3-User ๐Ÿ’œ

this one comes from ITU Q.701 [7], so the boundary primitives are:

   MTP-TRANSFER request
   MTP-TRANSFER indication
   MTP-PAUSE indication
   MTP-RESUME indication
   MTP-STATUS indication

1.6.2. Definition of the Boundary between M3UA and SCTP ๐ŸŒˆ

for the upper-layer primitives that SCTP provides, check out Reference [18], Section 10. it's the example you need ๐Ÿซถ

1.6.3. Definition of the Boundary between M3UA and Layer Management โœจ

this is the big list of primitives between M3UA and Layer Management. Every one has a direction and a purpose, so I've kept the exact wording ๐Ÿ’…

   M-SCTP_ESTABLISH request
   Direction: LM -> M3UA
   Purpose: LM requests that ASP establish an SCTP association with its
   peer.

   M-SCTP_ESTABLISH confirm
   Direction: M3UA -> LM
   Purpose: ASP confirms to LM that it has established an SCTP
   association with its peer.

   M-SCTP_ESTABLISH indication
   Direction: M3UA -> LM
   Purpose: M3UA informs LM that a remote ASP has established an SCTP
   association.

   M-SCTP_RELEASE request
   Direction: LM -> M3UA
   Purpose: LM requests that ASP release an SCTP association with its
   peer.

   M-SCTP_RELEASE confirm
   Direction: M3UA -> LM
   Purpose: ASP confirms to LM that it has released SCTP association
   with its peer.

   M-SCTP_RELEASE indication
   Direction: M3UA -> LM
   Purpose: M3UA informs LM that a remote ASP has released an SCTP
   Association or that the SCTP association has failed.

   M-SCTP_RESTART indication
   Direction: M3UA -> LM
   Purpose: M3UA informs LM that an SCTP restart indication has been
   received.

   M-SCTP_STATUS request
   Direction: LM -> M3UA
   Purpose: LM requests that M3UA report the status of an SCTP
   association.

   M-SCTP_STATUS confirm
   Direction: M3UA -> LM
   Purpose: M3UA responds with the status of an SCTP association.

   M-SCTP STATUS indication
   Direction: M3UA -> LM
   Purpose: M3UA reports the status of an SCTP association.

   M-ASP_STATUS request
   Direction: LM -> M3UA
   Purpose: LM requests that M3UA report the status of a local or remote
   ASP.

   M-ASP_STATUS confirm
   Direction: M3UA -> LM
   Purpose: M3UA reports the status of local or remote ASP.

   M-AS_STATUS request
   Direction: LM -> M3UA
   Purpose: LM requests that M3UA report the status of an AS.

   M-AS_STATUS confirm
   Direction: M3UA -> LM
   Purpose: M3UA reports the status of an AS.

   M-NOTIFY indication
   Direction: M3UA -> LM
   Purpose: M3UA reports that it has received a Notify message
   from its peer.

   M-ERROR indication
   Direction: M3UA -> LM
   Purpose: M3UA reports that it has received an Error message from
   its peer or that a local operation has been unsuccessful.

   M-ASP_UP request
   Direction: LM -> M3UA
   Purpose: LM requests that ASP start its operation and send an ASP Up
   message to its peer.

   M-ASP_UP confirm
   Direction: M3UA -> LM
   Purpose: ASP reports that it has received an ASP UP Ack message from
   its peer.

   M-ASP_UP indication
   Direction: M3UA -> LM
   Purpose: M3UA reports that it has successfully processed an incoming
   ASP Up message from its peer.

   M-ASP_DOWN request
   Direction: LM -> M3UA
   Purpose: LM requests that ASP stop its operation and send an ASP Down
   message to its peer.

   M-ASP_DOWN confirm
   Direction: M3UA -> LM
   Purpose: ASP reports that it has received an ASP Down Ack message
   from its peer.

   M-ASP_DOWN indication
   Direction: M3UA -> LM
   Purpose: M3UA reports that it has successfully processed an incoming
   ASP Down message from its peer, or the SCTP association has
   been lost/reset.

   M-ASP_ACTIVE request
   Direction: LM -> M3UA
   Purpose: LM requests that ASP send an ASP Active message to its peer.

   M-ASP_ACTIVE confirm
   Direction: M3UA -> LM
   Purpose: ASP reports that it has received an ASP Active
   Ack message from its peer.

   M-ASP_ACTIVE indication
   Direction: M3UA -> LM
   Purpose: M3UA reports that it has successfully processed an incoming
   ASP Active message from its peer.

   M-ASP_INACTIVE request
   Direction: LM -> M3UA
   Purpose: LM requests that ASP send an ASP Inactive message to its
   peer.

   M-ASP_INACTIVE confirm
   Direction: LM -> M3UA
   Purpose: ASP reports that it has received an ASP Inactive
   Ack message from its peer.

   M-ASP_INACTIVE indication
   Direction: M3UA -> LM
   Purpose: M3UA reports that it has successfully processed an incoming
   ASP Inactive message from its peer.

   M-AS_ACTIVE indication
   Direction: M3UA -> LM
   Purpose: M3UA reports that an AS has moved to the AS-ACTIVE state.

   M-AS_INACTIVE indication
   Direction: M3UA -> LM
   Purpose: M3UA reports that an AS has moved to the AS-INACTIVE state.

   M-AS_DOWN indication
   Direction: M3UA -> LM
   Purpose: M3UA reports that an AS has moved to the AS-DOWN state.

if dynamic registration of RK is supported by the M3UA layer, the layer MAY support the following additional primitives ๐Ÿ”ฅ

   M-RK_REG request
   Direction: LM -> M3UA
   Purpose: LM requests that ASP register RK(s) with its peer by sending
   an REG REQ message

   M-RK_REG confirm
   Direction: M3UA -> LM
   Purpose: ASP reports that it has received REG RSP message with a
   registration status of successful from its peer.

   M-RK_REG indication
   Direction: M3UA -> LM
   Purpose: M3UA informs LM that it has successfully processed an
   incoming REG REQ message.

   M-RK_DEREG request
   Direction: LM -> M3UA
   Purpose: LM requests that ASP deregister RK(s) with its peer by
   sending a DEREG REQ message.

   M-RK_DEREG confirm
   Direction: M3UA -> LM
   Purpose: ASP reports that it has received DEREG REQ message with a
   deregistration status of successful from its peer.

   M-RK_DEREG indication
   Direction: M3UA -> LM
   Purpose: M3UA informs LM that it has successfully processed an
   incoming DEREG REQ from its peer.

2. Conventions ๐ŸŽ€

okay so the keywords here are the ones you need to know ๐Ÿงš In this document, the keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, NOT RECOMMENDED, MAY, and OPTIONAL are to be interpreted as described in [21]. they're important, bestie ๐Ÿ’–

3. M3UA Protocol Elements ๐Ÿฆ‹

okay so the general M3UA message format is a Common Message Header, followed by zero or more parameters as defined by the Message Type. For forward compatibility, all Message Types may have attached parameters even if none are specified in this version. that's a very "plan for the future" move ๐ŸŒธ

3.1. Common Message Header ๐Ÿ’œ

the protocol messages for MTP3-User Adaptation require a message header that has the adaptation layer version, the message type, and the message length. here's the layout ๐Ÿซถ

   0                   1                   2                   3
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Version    |   Reserved    | Message Class | Message Type  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Message Length                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   \                                                               \
   /                                                               /

All fields in an M3UA message MUST be transmitted in network byte order, unless otherwise stated. this one is a hard rule, no exceptions ๐Ÿ˜ญ

3.1.1. M3UA Protocol Version: 8 bits (unsigned integer) ๐ŸŒˆ

the version field has the version of the M3UA adaptation layer. the supported versions are:

      1      Release 1.0

3.1.2. Message Classes and Types ๐Ÿ’…

okay so the Message Class is an 8-bit unsigned integer, and these are the valid classes ๐ŸŽ€

Message Class: 8 bits (unsigned integer)

0     Management (MGMT) Messages
1     Transfer Messages
2     SS7 Signalling Network Management (SSNM) Messages
3     ASP State Maintenance (ASPSM) Messages
4     ASP Traffic Maintenance (ASPTM) Messages
5     Reserved for Other SIGTRAN Adaptation Layers
6     Reserved for Other SIGTRAN Adaptation Layers
7     Reserved for Other SIGTRAN Adaptation Layers
8     Reserved for Other SIGTRAN Adaptation Layers
9     Routing Key Management (RKM) Messages
10 to 127 Reserved by the IETF
128 to 255 Reserved for IETF-Defined Message Class extensions

Next up is the Message Type, also an 8-bit unsigned integer ๐Ÿฆ‹ Every class has its own list of types, so the same number can mean something different depending on the class. Lowkey tricky, but it's giving organization โœจ

Management (MGMT) Messages (see Section 3.8)

0        Error (ERR)
1        Notify (NTFY)
2 to 127    Reserved by the IETF
128 to 255    Reserved for IETF-Defined MGMT extensions

Transfer Messages (see Section 3.3)

0        Reserved
1        Payload Data (DATA)
2 to 127    Reserved by the IETF
128 to 255    Reserved for IETF-Defined Transfer extensions

SS7 Signalling Network Management (SSNM) Messages (see Section
3.4)

0        Reserved
1        Destination Unavailable (DUNA)
2        Destination Available (DAVA)
3        Destination State Audit (DAUD)
4        Signalling Congestion (SCON)
5        Destination User Part Unavailable (DUPU)
6        Destination Restricted (DRST)
7 to 127    Reserved by the IETF
128 to 255    Reserved for IETF-Defined SSNM extensions

ASP State Maintenance (ASPSM) Messages (see Section 3.5)

0        Reserved
1        ASP Up (ASPUP)
2        ASP Down (ASPDN)
3        Heartbeat (BEAT)
4        ASP Up Acknowledgement (ASPUP ACK)
5        ASP Down Acknowledgement (ASPDN ACK)
6        Heartbeat Acknowledgement (BEAT ACK)

7 to 127    Reserved by the IETF
128 to 255    Reserved for IETF-Defined ASPSM extensions

ASP Traffic Maintenance (ASPTM) Messages (see Section 3.7)

0        Reserved
1        ASP Active (ASPAC)
2        ASP Inactive (ASPIA)
3        ASP Active Acknowledgement (ASPAC ACK)
4        ASP Inactive Acknowledgement (ASPIA ACK)
5 to 127    Reserved by the IETF
128 to 255    Reserved for IETF-Defined ASPTM extensions

Routing Key Management (RKM) Messages (see Section 3.6)

0        Reserved
1        Registration Request (REG REQ)
2        Registration Response (REG RSP)
3        Deregistration Request (DEREG REQ)
4        Deregistration Response (DEREG RSP)
5 to 127    Reserved by the IETF
128 to 255    Reserved for IETF-Defined RKM extensions

3.1.3. Reserved: 8 Bits ๐ŸŒธ

the Reserved field SHOULD be set to all '0's and ignored by the receiver. so basically: fill it with zeros, and if you're receiving it, just don't worry about what's in there ๐Ÿ™ˆ

3.1.4. Message Length: 32-Bits (Unsigned Integer) ๐Ÿงš

the Message Length tells you how long the whole message is in octets, and that includes the Common Header too โœจ The Message Length MUST include parameter padding octets, if there are any. And here's a bonus tip from the spec itself ๐Ÿซถ

Note: A receiver SHOULD accept the message whether or not the final parameter padding is included in the message length.

3.2. Variable-Length Parameter Format ๐ŸŽ€

M3UA messages are built out of a Common Header, followed by zero or more variable-length parameters, and which parameters show up depends on the message type ๐Ÿ’– Every parameter in a message uses a Tag Length-Value (TLV) layout, which looks like this:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Parameter Tag        |       Parameter Length        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   \                                                               \
   /                       Parameter Value                         /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

when a message has more than one parameter, the parameters can show up in any order, unless an order is explicitly mandated. A receiver SHOULD accept the parameters in any order ๐Ÿ‘‘

Unless it's explicitly stated or shown in a message format diagram, only one parameter of the same type is allowed in a message. one per type, bestie ๐Ÿ’…

Parameter Tag: 16 bits (unsigned integer) ๐Ÿฆ‹

the Tag field is a 16-bit identifier for the type of parameter. It can be anywhere from 0 to 65534. Common parameters used by adaptation layers live in the range 0x00 to 0x3f, and M3UA-specific parameters have Tags in the range 0x0200 to 0x02ff. Here are the parameter Tags that are defined ๐ŸŒˆ

Common Parameters. These TLV parameters are shared across the different adaptation layers:

Parameter Name                     Parameter ID
==============                     ============
Reserved                              0x0000
Not Used in M3UA                      0x0001
Not Used in M3UA                      0x0002
Not Used in M3UA                      0x0003
INFO String                           0x0004
Not Used in M3UA                      0x0005
Routing Context                       0x0006
Diagnostic Information                0x0007
Not Used in M3UA                      0x0008
Heartbeat Data                        0x0009
Not Used in M3UA                      0x000a
Traffic Mode Type                     0x000b
Error Code                            0x000c
Status                                0x000d
Not Used in M3UA                      0x000e
Not Used in M3UA                      0x000f
Not Used in M3UA                      0x0010
ASP Identifier                        0x0011
Affected Point Code                   0x0012
Correlation ID                        0x0013

M3UA-Specific parameters. These TLV parameters are specific to the M3UA protocol ๐Ÿ“

Network Appearance                    0x0200
Reserved                              0x0201
Reserved                              0x0202
Reserved                              0x0203
User/Cause                            0x0204
Congestion Indications                0x0205
Concerned Destination                 0x0206
Routing Key                           0x0207
Registration Result                   0x0208
Deregistration Result                 0x0209
Local Routing Key Identifier          0x020a
Destination Point Code                0x020b
Service Indicators                    0x020c
Reserved                              0x020d
Originating Point Code List           0x020e
Reserved                              0x020f
Protocol Data                         0x0210
Reserved                              0x0211
Registration Status                   0x0212
Deregistration Status                 0x0213
Reserved by the IETF             0x0214 to 0xffff

The value 65535 is reserved for IETF-defined extensions. Values other than the ones defined in the specific parameter descriptions are reserved for use by the IETF. And if you want to use a value marked "Reserved by the IETF", you need an RFC first. no shortcuts, periodt โœจ

Parameter Length: 16 bits (unsigned integer) ๐Ÿ’œ

the Parameter Length field holds the size of the parameter in octets, and that counts the Parameter Tag, the Parameter Length and the Parameter Value fields. So a parameter with an empty Parameter Value has a Length of 4 โœจ The Parameter Length does not include any padding octets. If a parameter has subparameters, its Parameter Length covers every octet of each subparameter, including the subparameter padding octets (if there are any) ๐Ÿซถ

Parameter Value: variable length ๐ŸŒธ

the Parameter Value field is where the actual information for the parameter lives ๐Ÿ’–

The total length of a parameter (Tag, Parameter Length and Value fields included) MUST be a multiple of 4 octets. If it isn't, the sender pads the parameter at the end (after the Parameter Value field) with all zero octets. The padding is not counted in the parameter length field. A sender MUST NOT pad with more than 3 octets. And the receiver MUST ignore the padding octets ๐Ÿ™ˆ

3.3. Transfer Messages ๐Ÿฆ‹

this section covers the Transfer messages and what their parameter contents look like ๐Ÿงš

3.3.1. Payload Data Message (DATA) โœจ

okay so the DATA message is where the SS7 MTP3-User protocol data lives ๐Ÿ’– It's an MTP-TRANSFER primitive, and it carries the complete MTP3 Routing Label too, no cap ๐ŸŽ€ It holds these variable-length parameters:

        Network Appearance       Optional
        Routing Context          Conditional
        Protocol Data            Mandatory
        Correlation Id           Optional

bestie, the following format MUST be used for the Data Message ๐Ÿซถ no skipping, periodt:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        Tag = 0x0200           |          Length = 8           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Network Appearance                      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        Tag = 0x0006           |          Length = 8           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Routing Context                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        Tag = 0x0210           |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   \                                                               \
   /                        Protocol Data                          /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        Tag = 0x0013           |          Length = 8           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Correlation Id                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Network Appearance: 32 bits (unsigned integer)

Network Appearance is the SS7 network context for the message ๐ŸŒธ It quietly tells you the SS7 Point Code format in use, the SS7 Network Indicator value, and which MTP3 and possibly MTP3-User protocol type/variant/version is running inside that specific SS7 network. If an SG only works within one SS7 network, or each SCTP association is dedicated to one network context, you don't need this parameter at all ๐Ÿฆ‹ In other cases, it can be set up to show up so the receiver can use it.

The Network Appearance value is of local significance only, coordinated between the SGP and ASP ๐Ÿ’… So if an ASP is connected to more than one SGP, the same SS7 network context might be identified by different Network Appearance values, depending on which SGP a message is transmitted/received from ๐Ÿ™ˆ

Where the optional Network Appearance parameter is present, it MUST be the first parameter in the message, as it defines the format of the Protocol Data field.

IMPLEMENTATION NOTE: For simplicity of configuration, it may be desirable to use the same NA value across all nodes sharing a particular network context. โœจ

Routing Context: 32 bits (unsigned integer)

The Routing Context parameter holds the Routing Context value tied to the DATA message ๐Ÿงš If a Routing Key hasn't been coordinated between the SGP and ASP, sending Routing Context isn't required. But when multiple Routing Keys and Routing Contexts are used across a common association, the Routing Context MUST be sent to identify the traffic flow, which helps with the internal distribution of Data messages ๐Ÿ’œ

Protocol Data: variable length

This one is the main event ๐Ÿ‘‘ It contains the original SS7 MTP3 message, including the Service Information Octet and Routing Label. The Protocol Data parameter contains the following fields:

  • Service Indicator
  • Network Indicator
  • Message Priority
  • Destination Point Code
  • Originating Point Code
  • Signalling Link Selection Code (SLS)
  • User Protocol Data, which includes
    • MTP3-User protocol elements (e.g., ISUP, SCCP, or TUP parameters)

The Protocol Data parameter is encoded as follows:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Originating Point Code                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Destination Point Code                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       SI      |       NI      |      MP       |      SLS      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   \                                                               \
   /                     User Protocol Data                        /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Originating Point Code: 32 bits (unsigned integer)

Destination Point Code: 32 bits (unsigned integer)

The Originating and Destination Point Code fields contains the OPC and DPC from the routing label of the original SS7 message in Network Byte Order, justified to the least significant bit. Unused bits are coded `0'.

Service Indicator: 8 bits (unsigned integer)

The Service Indicator field contains the SI field from the original SS7 message, justified to the least significant bit. Unused bits are coded `0'. ๐ŸŒˆ

Network Indicator: 8 bits (unsigned integer)

The Network Indicator contains the NI field from the original SS7 message, justified to the least significant bit. Unused bits are coded `0'.

Message Priority: 8 bits (unsigned integer)

The Message Priority field contains the MP bits (if any) from the original SS7 message, covering both ANSI-style and TTC-style [26] message priority bits. The MP bits are aligned to the least significant bit. Unused bits are coded `0'. ๐Ÿ’…

Signalling Link Selection: 8 bits (unsigned integer)

The Signalling Link Selection field contains the SLS bits from the routing label of the original SS7 message, justified to the least significant bit and in Network Byte Order. Unused bits are coded `0'. โœจ

User Protocol Data: variable-length octet string

The User Protocol Data field contains an octet string of MTP-User information from the original SS7 message, starting with the first octet of the original SS7 message following the Routing Label [7][8][26]. ๐ŸŽ€

Correlation Id: 32 bits (unsigned integer)

The Correlation Id parameter uniquely identifies the MSU carried in the Protocol Data within an AS. ๐ŸŒˆ This Correlation Id parameter is assigned by the sending M3UA. It's the ID that keeps each message traceable, so it's literally iconic ๐Ÿฆ‹


3.4. SS7 Signalling Network Management (SSNM) Messages โœจ

3.4.1. Destination Unavailable (DUNA)

okay so the DUNA message ๐Ÿซถ gets sent from an SGP in an SG to all the concerned ASPs to say "hey, the SG figured out one or more SS7 destinations are unreachable" ๐Ÿ’€. An SGP also sends it in response when an ASP messages an unreachable SS7 destination, so it's giving "response" energy ๐Ÿ™ˆ. As an implementation option, the SG can suppress later "response" DUNA messages about a certain unreachable SS7 destination for a certain period, so the remote side gets time to react โณ. If there's no alternate route through another SG, the MTP3-User at the ASP is expected to stop traffic to the affected destination via the SG, following the defined MTP3-User procedures ๐Ÿšซ.

The DUNA message contains the following parameters:

      Network Appearance      Optional
      Routing Context         Conditional
      Affected Point Code     Mandatory
      INFO String             Optional

The format for DUNA Message parameters is as follows:

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |         Tag = 0x0200          |          Length = 8           |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                      Network Appearance                       |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |        Tag = 0x0006           |             Length            |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     \                                                               \
     /                       Routing Context                         /
     \                                                               \
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |         Tag = 0x0012          |             Length            |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     Mask      |                 Affected PC 1                 |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     \                                                               \
     /                              ...                              /
     \                                                               \
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     Mask      |                 Affected PC n                 |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |          Tag = 0x0004         |             Length            |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     \                                                               \
     /                          INFO String                          /
     \                                                               \
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Network Appearance: 32-bit unsigned integer ๐ŸŒธ

The description of Network Appearance in Section 3.3.1 applies, with the exception that Network Appearance does not have to be the first parameter in this message.

Routing Context: n x 32 bits (unsigned integer) ๐Ÿ“

The conditional Routing Context parameter carries the Routing Context values associated with the DUNA message. If a Routing Key hasn't been coordinated between the SGP and ASP, sending Routing Context isn't required ๐Ÿ™…โ€โ™€๏ธ. But when multiple Routing Keys and Routing Contexts are used across a common association, the Routing Context(s) MUST be sent. That's how the traffic flows the DUNA applies to get identified, which helps with outgoing traffic management and with passing MTP-PAUSE indications to the right MTP3-Users at the receiver ๐Ÿงš.

Affected Point Code: n x 32 bits ๐ŸŽ€

The Affected Point Code parameter holds a list of Affected Destination Point Code fields. Each one is a three-octet parameter, so it can fit 14-, 16-, and 24-bit binary formatted SS7 Point Codes ๐Ÿ’…. Affected Point Codes shorter than 24 bits get padded on the left out to the 24-bit boundary. The encoding for ANSI and ITU Point Code examples is shown below.

ANSI 24-bit Point Code:

        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |     Mask      |    Network    |    Cluster    |     Member    |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       |MSB-----------------------------------------LSB|

ITU 14-bit Point Code:

        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |     Mask      |0 0 0 0 0 0 0 0 0 0|Zone |     Region    | SP  |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                                            |MSB--------------------LSB|

It is optional to send an Affected Point Code parameter with more than one Affected PC, but it is mandatory to receive it. Including multiple Affected PCs can be useful when receiving an MTP3 management message or a linkset event simultaneously affects the availability status of a list of destinations at an SG ๐Ÿ“‹.

Mask: 8 bits (unsigned integer) ๐Ÿฆ‹

The Mask field can be used to identify a contiguous range of Affected Destination Point Codes. Spotting a contiguous range of Affected DPCs is handy when an MTP3 management message or a linkset event hits the availability of a whole series of destinations at an SG at once ๐ŸŒˆ.

The Mask parameter is an integer that represents a bit mask you can apply to the related Affected PC field. The bit mask says how many bits of the Affected PC field are significant and which ones are effectively "wildcarded" ๐ŸŽญ. For example, a mask of "8" means the last eight bits of the PC are "wildcarded". For an ANSI 24-bit Affected PC, that's the same as saying every PC in an ANSI Cluster is unavailable ๐Ÿ˜ญ. A mask of "3" means the last three bits of the PC are "wildcarded". For a 14-bit ITU Affected PC, that's the same as signaling that an ITU Region is unavailable ๐ŸŒ. A mask value equal to (or greater than) the number of bits in the PC means the entire network appearance is affected. That's how network isolation gets communicated to the ASP ๐Ÿšจ.

INFO String: variable length ๐Ÿ’ฌ

The optional INFO String parameter can carry any meaningful UTF-8 [10] character string along with the message. The INFO String parameter length is anywhere from 0 to 255 octets. No procedures are presently identified for its use, but the INFO String MAY be used for debugging purposes ๐Ÿ›. An INFO String with a zero-length parameter is not considered an error. (A zero length parameter is one where the Length field in the TLV will be set to 4.) โœจ

3.4.2. Destination Available (DAVA)

The DAVA message is sent from an SGP to all concerned ASPs to say the SG has figured out one or more SS7 destinations are reachable again (and not restricted) ๐Ÿฅณ. It can also be sent in response to a DAUD message, if that makes sense. If the ASP M3UA layer previously had no routes to the affected destinations, the ASP MTP3-User protocol gets informed and may now resume traffic to the affected destination ๐ŸŽ‰. The ASP M3UA layer then routes MTP3-user traffic through the SG that started the DAVA message ๐Ÿ›ฃ๏ธ.

The DAVA message contains the following parameters:

      Network Appearance       Optional
      Routing Context          Conditional
      Affected Point Code      Mandatory
      INFO String              Optional

The format and description of the Network Appearance, Routing Context, Affected Point Code, and INFO String parameters are the same as for the DUNA message (See Section 3.4.1) ๐Ÿ’–.

3.4.3. Destination State Audit (DAUD)

The DAUD message MAY be sent from the ASP to the SGP to audit the availability/congestion state of SS7 routes from the SG to one or more affected destinations ๐Ÿ”.

The DAUD message contains the following parameters:

      Network Appearance      Optional
      Routing Context         Conditional
      Affected Point Code     Mandatory
      INFO String             Optional

The format and description of DAUD Message parameters are the same as for the DUNA message (See Section 3.4.1) ๐Ÿซถ.

It is recommended that during normal operation (traffic handling) the mask field of the Affected Point Code parameter in the DAUD message be kept to a zero value, in order to avoid SG overloading ๐Ÿ™.

3.4.4. Signalling Congestion (SCON) ๐Ÿšฆ

okay so SCON is the message an SGP sends to all the concerned ASPs to say "heads up, the SS7 network is congested to one or more destinations" ๐Ÿšฆ. It can also be the reply to a DATA or DAUD message, whichever one fits. For some MTP variants (ANSI MTP is the example) it can go out whenever the SS7 congestion level changes โœจ. And an ASP's M3UA layer can send SCON to its M3UA peer to say its own congestion level changed ๐Ÿ’…. That's the one spot where the MAY is a real MAY, capitals and everything ๐ŸŽ€.

IMPLEMENTATION NOTE: an M3UA node can keep a timer for how long a congestion notice stays valid, if it wants one ๐Ÿ•ฐ๏ธ. It's super useful when the peer never says the congestion has cleared ๐Ÿ™ˆ.

The SCON message has these parameters:

   Network Appearance       Optional
   Routing Context          Conditional
   Affected Point Code      Mandatory
   Concerned Destination    Optional
   Congestion Indications   Optional
   INFO String              Optional

Here's how the SCON parameters are laid out ๐Ÿงฉ:

   0                   1                   2                   3
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |         Tag = 0x0200          |           Length = 8          |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                       Network Appearance                      |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |        Tag = 0x0006           |             Length            |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  \                                                               \
  /                       Routing Context                         /
  \                                                               \
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |         Tag = 0x0012          |             Length            |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |      Mask     |                 Affected PC 1                 |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  \                                                               \
  /                              ...                              /
  \                                                               \
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |      Mask     |                 Affected PC n                 |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |         Tag = 0x0206          |             Length = 8        |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |    reserved   |                 Concerned DPC                 |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |         Tag = 0x0205          |             Length = 8        |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                   Reserved                    |  Cong.  Level  |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |            Tag = 0x0004       |             Length            |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  \                                                               \
  /                         INFO String                           /
  \                                                               \
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The Network Appearance, Routing Context, Affected Point Code and INFO String parameters work the same as in the DUNA message (see Section 3.4.1) โœจ. The Affected Point Code parameter can flag congestion for multiple destinations or whole ranges of them ๐ŸŒˆ.

Concerned Destination: 32 bits ๐ŸŽฏ

The Concerned Destination parameter is optional, and it's only used when SCON goes from an ASP to the SGP ๐Ÿ’œ. It holds the point code of whoever sent the message that set off the SCON. It has one Concerned Destination Point Code field, which is three octets wide, so it fits 14-, 16- and 24-bit binary SS7 Point Codes ๐Ÿง . A Concerned Point Code shorter than 24 bits gets padded on the left out to the 24-bit boundary. Any resulting Transfer Controlled (TFC) message from the SG goes to the Concerned Point Code, and it uses the single Affected DPC in the SCON message to fill in the (affected) Destination field of the TFC message ๐Ÿ’….

Congested Indications: 32 bits ๐Ÿšจ

The Congestion Indications parameter is optional and holds a Congestion Level field ๐Ÿ“Š. It's there for national MTP networks that have several congestion thresholds, like ANSI MTP3 ๐Ÿ‡บ๐Ÿ‡ธ. For MTP congestion methods without multiple levels (the ITU international method is one), the parameter just doesn't get included ๐Ÿ™…โ€โ™€๏ธ.

Congestion Level field: 8 bits (unsigned integer) ๐ŸŒก๏ธ

The Congestion Level field applies to all of the Affected DPC(s) in the Affected Destinations parameter, and it's one of these values:

   0     No Congestion or Undefined
   1     Congestion Level 1
   2     Congestion Level 2
   3     Congestion Level 3

The congestion levels are defined in the congestion method in the appropriate national MTP recommendations [7,8] ๐Ÿ“š.


3.4.5. Destination User Part Unavailable (DUPU) ๐Ÿ™…โ€โ™€๏ธ

The DUPU message is how an SGP lets the concerned ASPs know that a remote MTP3-User Part (ISUP or SCCP, for example) on an SS7 node is unavailable ๐Ÿ˜ญ.

The DUPU message has these parameters:

   Network Appearance       Optional
   Routing Context          Conditional
   Affected Point Code      Mandatory
   User/Cause               Mandatory
   INFO String              Optional

Here's the DUPU layout ๐Ÿงฉ:

  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |         Tag = 0x0200          |             Length = 8        |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                      Network Appearance                       |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |        Tag = 0x0006           |             Length            |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 \                                                               \
 /                       Routing Context                         /
 \                                                               \
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |         Tag = 0x0012          |          Length = 8           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |   Mask = 0    |                  Affected PC                  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |         Tag = 0x0204          |          Length = 8           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |             Cause             |            User               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |         Tag = 0x0004          |             Length            |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 \                                                               \
 /                          INFO String                          /
 \                                                               \
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

User/Cause: 32 bits ๐Ÿ”

The Unavailability Cause and MTP3-User Identity fields, which go with the Affected PC in the Affected Point Code parameter, are encoded like this:

Unavailability Cause field: 16 bits (unsigned integer) โš ๏ธ

The Unavailability Cause parameter says why the MTP3-User is unavailable. The valid values are in the table below. They match the values in the SS7 MTP3 User Part Unavailable message. Depending on the MTP3 protocol used in the Network Appearance, extra values might be used too, and the specification of the relevant MTP3 protocol variant/version recommendation is the final word ๐Ÿ“–.

   0         Unknown
   1         Unequipped Remote User
   2         Inaccessible Remote User

MTP3-User Identity field: 16 bits (unsigned integer) ๐Ÿ†”

The MTP3-User Identity says which specific MTP3-User is unavailable (ISUP, SCCP, and so on) ๐Ÿ’โ€โ™€๏ธ. Some valid values are listed below. They line up with the SS7 MTP3 User Part Unavailable message and the Service Indicator. Depending on the MTP3 protocol variant/version used in the Network Appearance, extra values might be used, and the relevant MTP3 protocol variant/version recommendation is the final word โœจ.

    0 to 2   Reserved
       3     SCCP
       4     TUP
       5     ISUP
    6 to 8   Reserved
       9     Broadband ISUP
      10     Satellite ISUP
      11     Reserved
      12     AAL type 2 Signalling
      13     Bearer Independent Call Control (BICC)
      14     Gateway Control Protocol
      15     Reserved

The Affected Point Code parameter works the same as in the DUNA message (see Section 3.4.1.), with two differences: the Mask field isn't used, and only one Affected DPC is included ๐Ÿ™ˆ. Ranges and lists of Affected DPCs can't be signalled in a DUPU message, but that matches how UPU works in the SS7 network ๐Ÿซถ. When an SGP gets a UPU from the SS7 network, its Affected Destinations parameter only has one destination in it ๐ŸŽฏ.

The Network Appearance, Routing Context and INFO String parameters work the same as in the DUNA message (see Section 3.4.1) ๐Ÿ’–.

3.4.6. Destination Restricted (DRST) ๐Ÿšซโœจ

okay bestie, DRST is the message the SGP can optionally send to all the concerned ASPs ๐Ÿซถ to say "heads up, the SG has decided one or more SS7 destinations are now restricted from where it sits" ๐Ÿ’…. It can also show up as a reply to a DAUD message, if that makes sense for the situation ๐Ÿฆ‹.

So what happens next? The M3UA layer at the ASP is expected to send traffic to the affected destination through an alternate SG that has a route of equal priority ๐ŸŒธ, but ONLY if that alternate route actually exists and is available. No cap, that "only if" is doing a lot of work ๐Ÿ˜ญ. And if the ASP currently thinks the affected destination is unavailable, the MTP3-User SHOULD be told that traffic to that destination can be resumed ๐Ÿ’–. In that case, the M3UA layer SHOULD route the traffic through the SG that sent the DRST ๐Ÿงš.

Also, sending this message is optional for the SG ๐ŸŽ€, and acting on what's in it is optional for the ASP too ๐ŸŒˆ. It's meant for the "STP" case from Section 1.4.1 ๐Ÿ’œ.

The DRST message has these parameters:

   Network Appearance       Optional
   Routing Context          Conditional
   Affected Point Code      Mandatory
   INFO String              Optional

The Network Appearance, Routing Context, Affected Point Code, and INFO String parameters work the exact same way as in the DUNA message (see Section 3.4.1) โœจ. Literally just go look there, it's giving copy-paste energy ๐Ÿ™ˆ.

3.5. ASP State Maintenance (ASPSM) Messages ๐ŸŒท

3.5.1. ASP Up ๐Ÿ†™

okay so the ASP Up message tells a remote M3UA peer that the adaptation layer is ready to receive any ASPSM/ASPTM messages for all the Routing Keys the ASP is set up to serve ๐Ÿฆ‹. Main character energy ๐Ÿ‘‘.

The ASP Up message has these parameters:

   ASP Identifier                Optional
   INFO String                   Optional

Here's how the ASP Up message parameters are laid out:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0011          |           Length = 8          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         ASP Identifier                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0004          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   \                                                               \
   /                          INFO String                          /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

ASP Identifier: 32-bit unsigned integer

The optional ASP Identifier is a unique value that only has to make sense locally ๐Ÿงฉ, meaning it just needs to be unique among the ASPs that support an AS. The SGP SHOULD save the ASP Identifier so it can be used with the Notify message if needed (see Section 3.8.2) ๐Ÿ’….

The optional INFO String parameter works the same as in the DUNA message (see Section 3.4.1) ๐ŸŽ€.

3.5.2. ASP Up Acknowledgement (ASP Up Ack) โœ…

so the ASP Up Ack message acknowledges an ASP Up message that came in from a remote M3UA peer ๐Ÿซถ.

The ASP Up Ack message has these parameters:

    ASP Identifier                Optional
    INFO String                   Optional

Layout for the ASP Up Ack message parameters:

  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |         Tag = 0x0011          |           Length = 8          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                         ASP Identifier                        |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |         Tag =0x0004           |             Length            |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 \                                                               \
 /                          INFO String                          /
 \                                                               \
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The optional ASP Identifier is especially handy for IPSP communication ๐ŸŒˆ. In that case, the IPSP answering the ASP Up message MAY include its own ASP Identifier value ๐Ÿงš.

The optional INFO String is the same as in the DUNA message (see Section 3.4.1) ๐Ÿ’œ. The INFO String in an ASP Up Ack message is totally independent from the INFO String in the ASP Up message (so it does NOT have to echo back what it got) ๐Ÿ™ˆ.

3.5.3. ASP Down ๐Ÿ›‘

the ASP Down message tells a remote M3UA peer that the adaptation layer is NOT ready to receive DATA, SSNM, RKM, or ASPTM messages ๐Ÿ˜ญ. Hard pass for now ๐Ÿ’€.

The ASP Down message has this parameter:

   INFO String    Optional

Layout for the ASP Down message parameters:

  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |         Tag =0x0004           |            Length             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 \                                                               \
 /                         INFO String                           /
 \                                                               \
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The format and description of the optional INFO String parameter are the same as for the DUNA message (see Section 3.4.1) ๐ŸŽ€.

3.5.4. ASP Down Acknowledgement (ASP Down Ack) ๐Ÿซง

the ASP Down Ack message acknowledges an ASP Down message received from a remote M3UA peer ๐Ÿ’–.

The ASP Down Ack message has this parameter:

   INFO String     Optional

Layout for the ASP Down Ack message parameters:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0004          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   \                                                               \
   /                         INFO String                           /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The format and description of the optional INFO String parameter are the same as for the DUNA message (See Section 3.4.1) ๐ŸŒธ.

The INFO String in an ASP Down Ack message is independent from the INFO String in the ASP Down message (so it does not have to echo back the INFO String it received) ๐Ÿฆ‹.

3.5.5. Heartbeat (BEAT) ๐Ÿ’“

the BEAT message is optionally used to make sure the M3UA peers are still around for each other ๐Ÿซถ. It's recommended when M3UA runs over a transport layer other than SCTP, since SCTP has its own heartbeat ๐Ÿงš.

The BEAT message has this parameter:

   Heartbeat Data         Optional

Layout for the BEAT message:

  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |         Tag = 0x0009          |            Length             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 \                                                               \
 /                       Heartbeat Data                          /
 \                                                               \
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The Heartbeat Data contents are defined by the sending node ๐Ÿ“. The Heartbeat Data could include, for example, a Heartbeat Sequence Number and/or Timestamp โญ. The receiver of a BEAT message does NOT process this field, since it only matters to the sender ๐Ÿ™ˆ. The receiver MUST respond with a BEAT Ack message ๐Ÿ’….

3.5.6. Heartbeat Acknowledgement (BEAT Ack) ๐Ÿ’Œ

the BEAT Ack message gets sent in response to a received BEAT message ๐Ÿซถ. It includes all the parameters of the received BEAT message, totally unchanged ๐Ÿ’–.

3.6. Routing Key Management (RKM) Messages [Optional] ๐Ÿ”‘

3.6.1. Registration Request (REG REQ) ๐ŸŽ€

okay so the REG REQ message is how an ASP tells a remote M3UA peer, "hey, I'd like to register one or more Routing Keys with you" ๐Ÿ’… Typically an ASP sends this to an SGP and then expects a REG RSP back, which comes with an associated Routing Context value ๐Ÿฆ‹

The REG REQ message has just one parameter, and it's giving mandatory vibes:

Routing Key           Mandatory

One or more Routing Key parameters MAY be included. Here's the format for the REG REQ message โœจ

  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |          Tag = 0x0207         |            Length             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 \                                                               \
 /                         Routing Key 1                         /
 \                                                               \
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 \                                                               \
 /                              ...                              /
 \                                                               \
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |          Tag = 0x0207         |            Length             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 \                                                               \
 /                         Routing Key n                         /
 \                                                               \
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Routing Key: variable length ๐ŸŒธ

The Routing Key parameter is mandatory. The sender expects the receiver to create a Routing Key entry and assign a unique Routing Context value to it, if that entry doesn't already exist ๐Ÿซถ

The Routing Key parameter may be present multiple times in the same message. That's how you register a whole bunch of Routing Keys in one go ๐Ÿงš

Here's the format of the Routing Key parameter:

  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                       Local-RK-Identifier                     |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                   Routing Context (optional)                  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                  Traffic Mode Type (optional)                 |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                     Destination Point Code                    |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                  Network Appearance (optional)                |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                  Service Indicators (optional)                |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |              Originating Point Code List (optional)           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 \                                                               \
 /                              ...                              /
 \                                                               \
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                     Destination Point Code                    |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                  Service Indicators (optional)                |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |              Originating Point Code List (optional)           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Note: The Destination Point Code, Service Indicators, and Originating Point Code List parameters MAY be repeated as a grouping within the Routing Key parameter, in the structure shown above. ๐Ÿฆ‹

Local-RK-Identifier: 32-bit unsigned integer ๐Ÿ”ฅ

The mandatory Local-RK-Identifier field is how the registration request gets its own unique ID. The ASP picks the value and uses it to match up the REG RSP with the original request, so it's basically the receipt number ๐Ÿงพ The Identifier value must remain unique until the REG RSP message is received.

The format of the Local-RK-Identifier field is:

  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |         Tag = 0x020a          |         Length = 8            |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                  Local-RK-Identifier value                    |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Traffic Mode Type: 32-bit (unsigned integer) ๐Ÿ’œ

The optional Traffic Mode Type parameter tells you the traffic mode the ASP(s) are operating in within an Application Server. Its format is:

  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |         Tag = 0x000b          |         Length = 8            |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                       Traffic Mode Type                       |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The valid values for Traffic Mode Type are in this table:

      1     Override
      2     Loadshare
      3     Broadcast

Destination Point Code ๐Ÿ“

The Destination Point Code parameter is mandatory. It identifies the Destination Point Code of incoming SS7 traffic that the ASP is registering for. For an alias point code configuration, the DPC parameter gets repeated for each point code. The format is the same as the Affected Destination parameter in the DUNA message (see Section 3.4.1), so it's giving consistency โœจ Its format is:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x020b          |         Length = 8            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Mask = 0   |            Destination Point Code             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Network Appearance ๐ŸŒˆ

The optional Network Appearance parameter identifies the SS7 network context for the Routing Key. It has the same format as in the DATA message (see Section 3.3.1), except it doesn't have to be the first parameter in the message.

Here's the main drama ๐Ÿ‘‘ If Network Appearance isn't specified and the Routing Key applies to all Network Appearances, then this Routing Key MUST be the only one registered for the association. That means Routing Context is implied, and DATA and SSNM messages get discriminated on Network Appearance instead of on Routing Context. And if Network Appearance isn't specified but there's only one Network Appearance, then Network Appearance is implied. Its format is:

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |         Tag = 0x0200          |         Length = 8            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                     Network Appearance                        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Service Indicators (SI): n X 8-bit integers ๐Ÿฆ‹

The optional SI [7,8] field contains one or more Service Indicators from the values described in the MTP3-User Identity field of the DUPU message. If the SI parameter is absent from the Routing Key, that means any SI value is used, except of course MTP management ๐Ÿ™ˆ If an SI parameter doesn't contain a multiple of four SIs, the parameter is padded out to 32-byte alignment.

The SI format is:

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |         Tag = 0x020c          |             Length            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |      SI #1    |     SI #2     |    SI #3      |    SI #4      |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    /                              ...                              /
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |      SI #n    |             0 Padding, if necessary           |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

OPC List ๐Ÿ’…

The Originating Point Code List parameter contains one or more SS7 OPC entries, and its format is the same as the Destination Point Code parameter. If the OPC List parameter is absent from the Routing Key, that means any OPC value is used ๐Ÿงš

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |         Tag = 0x020e          |             Length            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |      Mask     |          Origination Point Code #1            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |      Mask     |          Origination Point Code #2            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    /                              ...                              /
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |      Mask     |          Origination Point Code #n            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

3.6.2. Registration Response (REG RSP) ๐Ÿ’–

Okay so the REG RSP message is the reply to a REG REQ that comes in from a remote M3UA peer ๐Ÿ’… It tells you whether each registration slayed or flopped, and if it worked, it hands you back a unique Routing Context value to use in the later Traffic Management stuff โœจ

The REG RSP message contains the following parameter:

Registration Result   Mandatory

One or more Registration Result parameters MUST be included ๐ŸŽ€ The format for the REG RSP message is as follows:

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          Tag = 0x0208         |              Length           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                    Registration Result 1                      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      \                                                               \
      /                              ...                              /
      \                                                               \
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           Tag = 0x0208        |            Length             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                    Registration Result n                      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Registration Results ๐ŸŒธ

The Registration Result parameter holds the registration result for one single Routing Key from a REG REQ message ๐Ÿฆ‹ The number of results in a single REG RSP message MUST be anywhere from one to the total number of number of Routing Key parameters found in the corresponding REG REQ message. If you're using multiple REG RSP messages to answer one REG REQ message, a specific result SHOULD be in only one REG RSP message ๐Ÿงš Each result is laid out like this:

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |         Tag = 0x020a        |          Length = 8             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                  Local-RK-Identifier value                    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           Tag = 0x0212      |          Length = 8             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      Registration Status                      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           Tag = 0x0006      |          Length = 8             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                        Routing Context                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Local-RK-Identifier: 32-bit integer ๐Ÿ“

The Local-RK-Identifier is the same value as the matching Routing Key parameter in the REG REQ message, so you can match it right back up (See Section 3.6.1) ๐Ÿซถ

Registration Status: 32-bit integer โœจ

This is where the result of the registration lives. The Registration Status field tells you whether it succeeded or, if it didn't, exactly why ๐Ÿ’€ Its values may be:

  0           Successfully Registered
  1           Error - Unknown
  2           Error - Invalid DPC
  3           Error - Invalid Network Appearance
  4           Error - Invalid Routing Key
  5           Error - Permission Denied
  6           Error - Cannot Support Unique Routing
  7           Error - Routing Key not Currently Provisioned
  8           Error - Insufficient Resources
  9           Error - Unsupported RK parameter Field
  10          Error - Unsupported/Invalid Traffic Handling Mode
  11          Error - Routing Key Change Refused
  12          Error - Routing Key Already Registered

Routing Context: 32-bit integer ๐Ÿ‘‘

If the registration worked, the Routing Context field holds the Routing Context value for that Routing Key. If it didn't work, it's set to "0" ๐Ÿฅบ

3.6.3. Deregistration Request (DEREG REQ) ๐Ÿฆ‹

Okay, the DEREG REQ message is what an ASP sends to a remote M3UA peer when it wants to deregister a certain Routing Key ๐ŸŒˆ Usually an ASP sends this to an SGP, and it expects a DEREG RSP message back with the matching Routing Context value ๐Ÿ’œ

The DEREG REQ message contains the following parameters:

      Routing Context       Mandatory

The format for the DEREG REQ message is as follows:

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |         Tag = 0x0006          |            Length             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      \                                                               \
      /                       Routing Context                         /
      \                                                               \
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Routing Context: n X 32-bit integers ๐ŸŒท

The Routing Context parameter holds a list of integers that index the Application Server traffic the sending ASP is currently registered to receive from the SGP, but now wants to deregister from ๐Ÿซง

3.6.4. Deregistration Response (DEREG RSP) ๐ŸŒŸ

The DEREG RSP message is the reply to a DEREG REQ message from a remote M3UA peer ๐Ÿ’–

The DEREG RSP message contains the following parameter:

      Deregistration Result    Mandatory

One or more Deregistration Result parameters MUST be included ๐ŸŽ€ The format for the DEREG RSP message is as follows:

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          Tag = 0x0209         |               Length          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                   Deregistration Result 1                     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      \                                                               \
      /                              ...                              /
      \                                                               \
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           Tag = 0x0209        |            Length             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                   Deregistration Result n                     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Deregistration Results ๐ŸŒธ

The Deregistration Result parameter holds the deregistration status for one single Routing Context from a DEREG REQ message. The number of results in a single DEREG RSP message MAY be anywhere from one to the total number of number of Routing Context values found in the corresponding DEREG REQ message ๐Ÿงš

If you're using multiple DEREG RSP messages to answer one DEREG REQ message, a specific result SHOULD be in only one DEREG RSP message ๐Ÿฆ‹ Each result is laid out like this:

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |         Tag = 0x0006          |          Length = 8           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                        Routing Context                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |         Tag = 0x0213          |          Length = 8           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                     Deregistration Status                     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Routing Context: 32-bit integer ๐Ÿ“

The Routing Context field holds the Routing Context value of the matching Routing Key you want to deregister, the same one that was in the DEREG REQ message ๐Ÿซถ

Deregistration Status: 32-bit integer โœจ

The Deregistration Result Status field tells you whether the deregistration worked or, if it didn't, the reason it failed ๐Ÿ’… Its values may be:

   0           Successfully Deregistered
   1           Error - Unknown
   2           Error - Invalid Routing Context
   3           Error - Permission Denied
   4           Error - Not Registered
   5           Error - ASP Currently Active for Routing Context

3.7. ASP Traffic Maintenance (ASPTM) Messages โœจ

3.7.1. ASP Active โœจ

okay so the ASP Active message is how an ASP tells its remote M3UA buddy "hey, I'm ready to handle signalling traffic for this Application Server" ๐Ÿ’… it only changes the ASP state for the Routing Keys that the Routing Contexts point at (if there are any). main character energy ๐ŸŽ€

The ASP Active message has these parameters:

Traffic Mode Type     Optional
Routing Context       Optional
INFO String           Optional

Here's what it looks like on the wire ๐Ÿฆ‹

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |         Tag = 0x000b          |          Length = 8           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      Traffic Mode Type                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |         Tag = 0x0006          |            Length             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      \                                                               \
      /                       Routing Context                         /
      \                                                               \
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |         Tag = 0x0004          |             Length            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      \                                                               \
      /                          INFO String                          /
      \                                                               \
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Traffic Mode Type: 32-bit (unsigned integer) ๐ŸŒธ

The Traffic Mode Type parameter tells everyone which traffic mode the ASP is running in within an AS. The valid values are in this little table:

1         Override
2         Loadshare
3         Broadcast

Within one Routing Context, Override, Loadshare, and Broadcast SHOULD NOT be mixed. ngl this is a "don't do the messy thing" moment ๐Ÿ™ˆ

Override means the ASP takes over all the traffic in an Application Server (aka primary/backup vibes), and it overrides any ASPs that are already active in that AS ๐Ÿ‘‘ Loadshare means the ASP shares the traffic distribution with the other active ASPs โญ Broadcast means the ASP gets the same messages as every other active ASP ๐Ÿซถ

Routing Context: n X 32-bit integers ๐Ÿงš

The optional Routing Context parameter is a list of integers that index the Application Server traffic the sending ASP is configured or registered to receive.

There's a one-to-one relationship between each index entry and an SGP Routing Key or AS Name. An AS can only show up in one Network Appearance, so the Network Appearance parameter is not required in the ASP Active message. iykyk ๐Ÿ’œ

An Application Server Process can be configured to handle traffic for more than one logical Application Server. From the ASP's point of view, a Routing Context is the range of signalling traffic it's currently set up to receive from the SGP. For example, an ASP could support signalling for multiple MTP3-Users, each identified by separate SS7 DPC/OPC/SI ranges. obsessed with how flexible this is ๐Ÿ˜ญโœจ

The optional INFO String parameter has the same format and description as the one in the DUNA message (see Section 3.4.1). ๐Ÿ“

3.7.2. ASP Active Acknowledgement (ASP Active Ack) ๐ŸŽ€

The ASP Active Ack message is how you acknowledge an ASP Active message that came in from a remote M3UA peer. it's giving "got it, bestie" ๐Ÿซถ

The ASP Active Ack message has these parameters:

Traffic Mode Type     Optional
Routing Context       Optional
INFO String           Optional

Here's the format ๐Ÿฆ‹

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |           Tag = 0x000b        |          Length = 8           |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                      Traffic Mode Type                        |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |            Tag = 0x0006       |            Length             |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     \                                                               \
     /                       Routing Context                         /
     \                                                               \
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |           Tag = 0x0004        |             Length            |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     \                                                               \
     /                          INFO String                          /
     \                                                               \
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The optional INFO String parameter has the same format and description as the DUNA message (see Section 3.4.1). โœจ

The INFO String in an ASP Active Ack message is independent from the INFO String in the ASP Active message. So it doesn't have to echo back whatever INFO String it received ๐Ÿ’–

The format of the Traffic Mode Type and Routing Context parameters is the same as for the ASP Active message. (See Section 3.7.1.) ๐ŸŒˆ

3.7.3. ASP Inactive ๐Ÿ’€

The ASP Inactive message is how an ASP tells its remote M3UA peer "I'm no longer an active ASP you should be using from your list of ASPs" ๐Ÿ™ˆ It only changes the ASP state for the Routing Keys that the Routing Contexts point at, if there are any.

The ASP Inactive message has these parameters:

Routing Context         Optional
INFO String             Optional

Format time ๐Ÿงš

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |         Tag = 0x0006          |            Length             |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    \                                                               \
    /                       Routing Context                         /
    \                                                               \
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |         Tag = 0x0004          |            Length             |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    \                                                               \
    /                          INFO String                          /
    \                                                               \
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The optional Routing Context and INFO String parameters have the same format and description as the ASP Active message (see Section 3.5.5.) ๐Ÿ“

3.7.4. ASP Inactive Acknowledgement (ASP Inactive Ack) ๐ŸŒธ

The ASP Inactive Ack message is used to acknowledge an ASP Inactive message received from a remote M3UA peer. bestie says "noted" ๐Ÿ’…

The ASP Inactive Ack message has these parameters:

Routing Context       Optional
INFO String           Optional

Here's the format ๐Ÿฆ‹

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |         Tag = 0x0006          |            Length             |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    \                                                               \
    /                       Routing Context                         /
    \                                                               \
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |         Tag = 0x0004          |             Length            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    \                                                               \
    /                          INFO String                          /
    \                                                               \
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The optional INFO String parameter has the same format and description as the DUNA message (see Section 3.4.1). โœจ

The INFO String in an ASP Inactive Ack message is independent from the INFO String in the ASP Inactive message. It doesn't have to echo back the INFO String it received ๐Ÿ’–

The format of the Routing Context parameter is the same as for the ASP Inactive message. (see Section 3.7.3.) ๐ŸŒˆ


3.8. Management (MGMT) Messages ๐Ÿงš

3.8.1. Error

okay so the Error message is how you tell your peer "hey, that thing you just sent me was wrong" ๐Ÿ™ˆ it gets sent when something weird shows up in an incoming message, like the message type doesn't fit the current state or a parameter value is invalid. one big rule: Error messages MUST NOT be generated in response to other Error messages ๐Ÿ’€ no error ping-pong, bestie ๐Ÿซถ

the Error message carries these parameters:

   Error Code                 Mandatory
   Routing Context            Mandatory*
   Network Appearance         Mandatory*
   Affected Point Code        Mandatory*
   Diagnostic Information     Conditional

   * Only mandatory for specific Error Codes.

and here's how the format looks ๐Ÿฆ‹

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Tag = 0x000c         |          Length = 8           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          Error Code                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Tag = 0x0006         |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   \                                                               \
   /                        Routing Context                        /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Tag - 0x0012         |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Mask      |             Affected Point Code  1            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   \                                                               \
   /                                ...                            /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Mask      |             Affected Point Code  n            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           Tag = 0x0200        |           Length = 8          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      Network Appearance                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Tag = 0x0007         |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   \                                                               \
   /                     Diagnostic Information                    /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Error Code: 32 bits (unsigned integer) ๐ŸŽ€

the Error Code parameter tells you why the Error message exists โœจ the value is one of these:

   0x01      Invalid Version
   0x02      Not Used in M3UA
   0x03      Unsupported Message Class
   0x04      Unsupported Message Type
   0x05      Unsupported Traffic Mode Type
   0x06      Unexpected Message
   0x07      Protocol Error
   0x08      Not Used in M3UA
   0x09      Invalid Stream Identifier
   0x0a      Not Used in M3UA
   0x0b      Not Used in M3UA
   0x0c      Not Used in M3UA
   0x0d      Refused - Management Blocking
   0x0e      ASP Identifier Required
   0x0f      Invalid ASP Identifier
   0x10      Not Used in M3UA
   0x11      Invalid Parameter Value
   0x12      Parameter Field Error
   0x13      Unexpected Parameter
   0x14      Destination Status Unknown
   0x15      Invalid Network Appearance
   0x16      Missing Parameter
   0x17      Not Used in M3UA
   0x18      Not Used in M3UA
   0x19      Invalid Routing Context
   0x1a      No Configured AS for ASP

now let's go through each error, it's giving encyclopedia but make it cute ๐Ÿ“š๐Ÿ’–

Invalid Version ๐ŸŒธ this one fires when a message with a version that isn't supported shows up. the receiver fires back an Error message saying which version it supports, and also pings layer management so everyone's in the loop.

Unsupported Message Class ๐Ÿ“ this is for a message with a Message Class that's unexpected or unsupported. for this one, the Diagnostic Information parameter MUST be included with the first 40 octets of the offending message. yes, the first 40, no more, no less ๐Ÿ’…

Unsupported Message Type ๐Ÿงš same vibe as the class one. a message with an unexpected or unsupported Message Type gets this error, and the Diagnostic Information parameter MUST include the first 40 octets of the offending message.

Unsupported Traffic Mode Type ๐Ÿ‘‘ an SGP sends this when an ASP sends an ASP Active message with a Traffic Mode Type it doesn't support, or one that doesn't match the mode currently configured for the Application Server. example: the SGP didn't support loadsharing ๐Ÿ™ˆ

Unexpected Message ๐Ÿฆ‹ this one MAY be sent when a defined and recognized message shows up but isn't expected in the current state. ngl, sometimes the ASP can just silently discard the message and skip the Error message entirely ๐Ÿคซ for example, an ASP that gets a DATA message from an SGP while it's in the ASP-INACTIVE state silently discards it. if the Unexpected message had Routing Contexts in it, those Routing Contexts SHOULD be included in the Error message.

Protocol Error ๐Ÿ’€ for any protocol anomaly. like, a parameter that's syntactically correct but just doesn't make sense right now.

Invalid Stream Identifier ๐ŸŒˆ this fires if a message arrives on an unexpected SCTP stream. for instance, a Management message showing up on a stream other than "0" is a no-go ๐Ÿ™…โ€โ™€๏ธ

Refused - Management Blocking ๐Ÿ”ฅ sent when an ASP Up or ASP Active message gets refused for management reasons, like a management lockout. if it's a response to an ASP Active message, the Routing Context(s) from that ASP Active message SHOULD be included in the Error message.

ASP Identifier Required ๐ŸŽ€ an SGP sends this in response to an ASP Up message that doesn't have an ASP Identifier parameter, when the SGP needs one. the ASP SHOULD resend the ASP Up message with an ASP Identifier, bestie ๐Ÿ’–

Invalid ASP Identifier ๐Ÿ’… an SGP sends this when the ASP Identifier in an ASP Up message is invalid, meaning it isn't unique. not it ๐Ÿ˜ญ

Invalid Parameter Value โœจ fires when a message has a parameter with an invalid value. the example is a DUPU message showing up with a Mask value other than "0" ๐Ÿ™ˆ

Parameter Field Error ๐ŸŒธ would be sent if a message has a parameter with the wrong length field. oops ๐Ÿงš

Unexpected Parameter ๐Ÿ“ would be sent if a message has an invalid parameter in it. invalid parameter, invalid vibes ๐Ÿ’€

Destination Status Unknown ๐Ÿฆ‹ this one MAY be sent when a DAUD shows up at an SG asking about the availability or congestion status of a destination, and the SG doesn't want to share that info. maybe the sender isn't authorized to know, for example ๐Ÿ”’ for this error, the invalid or unauthorized Point Code(s) MUST be included, along with the Network Appearance and/or Routing Context linked to those Point Code(s).

Invalid Network Appearance ๐Ÿ‘‘ an SGP sends this if an ASP sends a message with an invalid, unconfigured Network Appearance value. the invalid (unconfigured) Network Appearance MUST be put in the Network Appearance parameter, so the sender knows exactly what went wrong ๐Ÿซถ

Missing Parameter โญ fires when a mandatory parameter is missing from a message. it also fires when a conditional parameter is missing but the received message actually needs it, so it's a double threat ๐Ÿ’…

Invalid Routing Context ๐ŸŒˆ sent if a message comes from a peer with an invalid, unconfigured Routing Context value. the invalid Routing Context(s) MUST be included in the Error message ๐ŸŽ€

No Configured AS for ASP ๐Ÿงš this fires if a message comes from a peer with no Routing Context parameter, and the configuration data doesn't say which Application Servers are being referenced. no config, no vibes ๐Ÿ˜ญ

Diagnostic Information: variable length ๐Ÿ’œ

the optional Diagnostic Information can be literally any info that's relevant to the error, so it helps figure out what went wrong ๐Ÿ” it SHOULD contain the offending message. and here's the good news: a Diagnostic Information parameter with zero length is not an error ๐Ÿ™Œ (it just means the Length field in the TLV gets set to 4).

3.8.2. Notify ๐Ÿ“ฃ

okay so Notify is how an M3UA peer gets an autonomous heads-up about M3UA events, no asking required ๐Ÿซถ it's literally giving "hey, something just happened" ๐Ÿ’…

The Notify message contains these parameters:

   Status                     Mandatory
   ASP Identifier             Conditional
   Routing Context            Optional
   INFO String                Optional

the format for Notify looks like this, bestie ๐Ÿฆ‹:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        Tag = 0x000d           |          Length = 8           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        Status Type            |       Status Information      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        Tag = 0x0011           |             Length = 8        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        ASP Identifier                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        Tag = 0x0006           |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   \                                                               \
   /                       Routing Context                         /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0004          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   \                                                               \
   /                          INFO String                          /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Status Type is a 16-bit unsigned integer that tells you what kind of Notify you're looking at โœจ The valid values are:

   1     Application Server State Change (AS-State_Change)
   2     Other

Status Information is also a 16-bit unsigned integer, and it gets more specific based on the Status Type ๐Ÿ” If the Status Type is AS-State_Change, these Status Information values are used:

   1    Reserved
   2    Application Server Inactive (AS-INACTIVE)
   3    Application Server Active (AS-ACTIVE)
   4    Application Server Pending (AS-PENDING)

These notifications get sent from an SGP to an ASP whenever an Application Server changes status, and the value reflects the new state of that AS ๐ŸŒธ

If the Status Type is Other, then these Status Information values are defined:

   1    Insufficient ASP Resources Active in AS
   2    Alternate ASP Active
   3    ASP Failure

these ones aren't about the SGP reporting a state change of an ASP or AS, so they're a whole different vibe ๐Ÿ™ˆ For Insufficient ASP Resources, the SGP is telling an ASP_INACTIVE ASP in the AS that another ASP is needed to handle the AS's load (Loadsharing or Broadcast mode). For Alternate ASP Active, an ASP finds out that an alternate ASP has moved to the ASP-ACTIVE state in Override mode. The ASP Identifier (if available) of that Alternate ASP MUST be placed in the message ๐Ÿ’œ And for ASP Failure, the SGP is letting the ASPs in the AS know that one of them has failed. The ASP Identifier (if available) of the failed ASP MUST be placed in the message too ๐Ÿ˜ญ

The conditional ASP Identifier works exactly like it does in the ASP Up message (see Section 3.5.1), and the Routing Context and Info String parameters are the same as in the ASP Active message (See Section 3.7.1) ๐ŸŽ€


4. Procedures ๐Ÿ› ๏ธ

okay this section is where the M3UA layer figures out what to do when it gets poked by local primitives from other layers, or when a message shows up from its peer M3UA layer ๐Ÿ‘€ Main character energy, honestly ๐Ÿ‘‘

4.1. Procedures to Support the M3UA-User

4.1.1. Receipt of Primitives from the M3UA-User

So when an MTP-TRANSFER request primitive comes in from an upper layer at an ASP/IPSP (or from the nodal interworking function at an SGP), the M3UA layer sends a matching DATA message (see Section 3) to its M3UA peer ๐Ÿ“จ The peer then passes an MTP-TRANSFER indication primitive up to its own upper layer ๐Ÿฆ‹

The M3UA message distribution function (see Section 1.4.2.1) figures out which Application Server (AS) the message belongs to by comparing the info in the MTP-TRANSFER request primitive with a provisioned Routing Key ๐Ÿ”‘

Next, an ASP in the ASP-ACTIVE state gets picked from the ASP list in the AS table, and a DATA message gets built and sent over the matching SCTP association ๐Ÿ’Œ If more than one ASP is in the ASP-ACTIVE state (aka the traffic is being loadshared across them), one of those ASPs gets selected from the list. If the ASPs are in Broadcast Mode, every active ASP gets selected, and the message goes to each one ๐ŸŒˆ The selection algorithm is up to the implementation, and it could be something like round robin, or based on the SLS or ISUP CIC ๐Ÿงš Choosing the right one is serious business, because it depends on the application's assumptions and how well the ASP-ACTIVE ASPs coordinate their state in the AS ๐Ÿค“

On top of that, the message has to go out on the right SCTP stream, again making sure the message sequencing needs of the signalling application are met ๐ŸŒธ DATA messages MUST be sent on an SCTP stream other than stream '0' ๐Ÿšซ

When there's no Routing Key match (or only a partial match) for an incoming SS7 message, a default treatment MAY be specified ๐Ÿคทโ€โ™€๏ธ The options are to set up a default Application Server at the SGP that sends all the unallocated traffic to a (set of) default ASP(s), or to drop the message and notify Layer Management with an M-ERROR indication primitive ๐Ÿ’€ How unallocated traffic gets treated is up to the implementation โœจ

4.2. Receipt of Primitives from the Layer Management

when the local Layer Management sends primitives, the M3UA layer takes the requested action and sends back an appropriate response primitive ๐Ÿซถ

An M-SCTP_ESTABLISH request primitive from Layer Management at an ASP or IPSP kicks off the setup of an SCTP association ๐Ÿš€ The M3UA layer then tries to establish an SCTP association with the remote M3UA peer by sending an SCTP-ASSOCIATE primitive down to the local SCTP layer.

Once an SCTP association is successfully up, SCTP sends an SCTP-COMMUNICATION_UP notification primitive to the local M3UA layer ๐ŸŽ‰ At the SGP or IPSP that started the request, M3UA sends an M-SCTP_ESTABLISH confirm primitive to Layer Management when setup is done. At the peer M3UA layer, an M-SCTP_ESTABLISH indication primitive goes up to Layer Management when an incoming association finishes setting up successfully ๐Ÿ’–

An M-SCTP_RELEASE request primitive from Layer Management starts the teardown of an SCTP association ๐Ÿงน The M3UA layer does a graceful shutdown by sending an SCTP-SHUTDOWN primitive to the SCTP layer. When the graceful shutdown is finished, SCTP sends back an SCTP-SHUTDOWN_COMPLETE notification primitive to the local M3UA layer ๐Ÿฆ‹ At the M3UA layer that started the request, M3UA sends an M-SCTP_RELEASE confirm primitive to Layer Management once the shutdown completes. At the peer M3UA layer, an M-SCTP_RELEASE indication primitive goes up to Layer Management after an abort or a successful shutdown ๐Ÿฅ€

An M-SCTP_STATUS request primitive lets Layer Management ask for the local status of a particular SCTP association ๐Ÿ” M3UA just maps it to an SCTP-STATUS primitive for SCTP. When SCTP responds, M3UA turns that association status info into an M-SCTP_STATUS confirm primitive. No peer protocol gets involved here, bestie ๐Ÿ™…โ€โ™€๏ธ

Similar LM-to-M3UA-to-SCTP and/or SCTP-to-M3UA-to-LM primitive mappings can be described for the other SCTP Upper Layer primitives in RFC2960 [18], like 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 ๐Ÿ“š Or, for modeling purposes, you can treat these SCTP Upper Layer primitives (and Status too) as a Layer Management interaction directly with the SCTP Layer ๐Ÿง 

M-NOTIFY indication and M-ERROR indication primitives tell Layer Management about the notification or error info inside a received M3UA Notify or Error message, respectively ๐Ÿ“ฌ They can also be generated from local M3UA events ๐ŸŒŸ

An M-ASP_STATUS request primitive lets Layer Management check the status of a particular local or remote ASP ๐Ÿ”Ž M3UA replies with that status in an M-ASP_STATUS confirm primitive. No M3UA peer protocol is invoked ๐Ÿ™ƒ

An M-AS_STATUS request lets Layer Management check the status of a particular AS ๐Ÿ“Š M3UA responds with an M-AS_STATUS confirm primitive, and again no M3UA peer protocol is invoked ๐Ÿ’…

M-ASP_UP, M-ASP_DOWN, M-ASP_ACTIVE, and M-ASP_INACTIVE request primitives let Layer Management at an ASP start state changes ๐Ÿ”„ When it works, M3UA sends back a matching confirm primitive to Layer Management. If it doesn't work, an Error indication primitive comes back in the primitive ๐Ÿ˜ฌ These requests result in outgoing ASP Up, ASP Down, ASP Active, and ASP Inactive messages going to the remote M3UA peer at an SGP or IPSP ๐Ÿ“ค

4.2.1. Receipt of M3UA Peer Management Messages

okay, so when ASP Up, ASP Down, ASP Active, and ASP Inactive messages from a peer M3UA successfully change state, the M3UA layer MAY invoke the matching M-ASP_UP, M-ASP_DOWN, M-ASP_ACTIVE, M-ASP_INACTIVE, M-AS_ACTIVE, M-AS_INACTIVE, and M-AS_DOWN indication primitives up to Layer Management ๐ŸŽ€

M-NOTIFY indication and M-ERROR indication primitives tell Layer Management about the notification or error info in a received M3UA Notify or Error message ๐Ÿ“ฉ These indications can also be generated from local M3UA events too โœจ

Now the delivery rules, which are super important ๐Ÿง All non-Transfer and non-SSNM messages, except BEAT and BEAT Ack, SHOULD be sent with sequenced delivery to make sure ordering is kept ๐Ÿ”ข ASPTM messages MAY be sent on one of the streams that carry the data traffic for the Routing Context(s), to minimize the chance of message loss ๐Ÿ’œ BEAT and BEAT Ack messages MAY be sent using out-of-order delivery, and they MAY be sent on any stream ๐Ÿฆ‹

4.3. AS and ASP/IPSP State Maintenance โœจ

okay so the M3UA layer on the SGP keeps track of the state of each remote ASP ๐Ÿ’… in every Application Server that ASP is set up to get traffic from. That state info is what the M3UA message distribution function uses as input ๐ŸŽ€. Same vibe for IPSPs in point-to-point setups: the M3UA layer in an IPSP keeps tabs on the remote IPSPs ๐Ÿฆ‹

There are two IPSP models, and they're giving very different energy ๐Ÿ‘‘

  1. IPSP Single Exchange (SE) model. Only a single exchange of ASPTM and ASPSM messages is needed to change the IPSP states ๐ŸŒธ. That just means one set of requests from one end plus acknowledgements from the other end is enough โœจ. The RK must define both sides of the traffic flow. Either IPSP can start each exchange of ASPTM or ASPSM messages ๐Ÿซถ. For this exchange, the initiating IPSP follows the procedures in Section 4.3.1.
  2. IPSP Double Exchange (DE) model. A double exchange of ASPTM and ASPSM messages is normally needed ๐Ÿ’œ (a single ASPSM exchange is optional, as a simplification). Either IPSP can start each exchange of ASPTM or ASPSM messages ๐ŸŒˆ. The RKs define the traffic that gets sent to the peer, just like in the AS-SG model ๐Ÿ’–. So two different RKs are usually used, one installed on each peer ๐Ÿ“

When you use double exchanges for ASPSM messages, managing the connection in each direction is considered independent ๐Ÿ™ˆ. So a connection from IPSP-A to IPSP-B is handled separately from one from IPSP-B to IPSP-A. That means it could happen that only one direction gets activated or closed, while the other stays in whatever state it was already in ๐Ÿ˜ญ

When you use a single exchange of ASPSM, which is the simplification ๐Ÿงš, only the activation phase (ASPTM messages) is independent for each direction. In this case, sending ASPSM from IPSP-A or IPSP-B could affect the whole communication, the same way it's defined in the standard SG-AS communication ๐Ÿ’€

Because of these differences, there should be an agreement on how ASPSM messages are handled before you start DE-IPSP communication ๐Ÿ”ฅ

In order to ensure interoperability, an M3UA implementation supporting IPSP communication MUST support the IPSP SE model and MAY implement the IPSP DE model. Non-negotiable, bestie ๐Ÿ‘‘

In Section 4.3.1, the ASP/IPSP states get explained โœจ.

In Section 4.3.2, only the SGP-ASP scenario is described ๐Ÿฆ‹. All of the procedures about an AS served by ASPs also apply to ASes served by IPSPs, so you're not missing anything ๐Ÿ’–.

In Section 4.3.3, only the Management procedures for the SGP-ASP scenario are described ๐ŸŒธ. The matching Management procedures for IPSPs are directly implied ๐Ÿซถ.

The remaining sections contain specific IPSP Considerations subsections ๐Ÿ’….

4.3.1. ASP/IPSP States

The state of each remote ASP/IPSP, in each AS it is configured to operate in, is kept in the peer M3UA layer (so in the SGP or the peer IPSP, respectively) ๐ŸŽ€. The state of a particular ASP/IPSP in a particular AS changes because of events ๐Ÿฆ‹. The events include:

  • Receipt of messages from the peer M3UA layer at the ASP/IPSP ๐Ÿ’œ
  • Receipt of some messages from the peer M3UA layer at other ASPs/IPSPs in the AS (e.g., ASP Active message indicating "Override") ๐Ÿ‘‘
  • Receipt of indications from the SCTP layer; and ๐ŸŒˆ
  • Local Management intervention. ๐Ÿงš

The ASP/C-IPSP/D-IPSP state transition diagram is shown in Figure 3 โœจ. The possible states of an ASP/D-IPSP/C-IPSP are:

ASP-DOWN: The remote M3UA peer at the ASP/IPSP is unavailable, and/or the related SCTP association is down ๐Ÿ˜ญ. All ASPs/IPSPs start out in this state ๐ŸŒธ. An ASP/IPSP in this state SHOULD NOT be sent any M3UA messages, except for Heartbeat, ASP Down Ack, and Error messages ๐Ÿ™ˆ.

ASP-INACTIVE: The remote M3UA peer at the ASP/IPSP is available (and the related SCTP association is up), but application traffic is stopped ๐Ÿซถ. In this state, the ASP/IPSP SHOULD NOT be sent any DATA or SSNM messages for the AS it is inactive in ๐Ÿ’….

ASP-ACTIVE: The remote M3UA peer at the ASP/IPSP is available and application traffic is active (for a particular Routing Context or set of Routing Contexts) ๐Ÿ”ฅ.

SCTP CDI: The SCTP CDI is the local SCTP layer's Communication Down Indication to the Upper Layer Protocol (M3UA) on an SGP ๐Ÿ’€. The local SCTP layer sends this indication when it detects that connectivity to the ASP's peer SCTP layer is lost ๐Ÿ’”. SCTP CDI is understood as either a SHUTDOWN_COMPLETE notification or a COMMUNICATION_LOST notification from the SCTP layer ๐Ÿ“.

SCTP RI: The local SCTP layer's Restart indication to the upper-layer protocol (M3UA) on an SG ๐ŸŒˆ. The local SCTP sends this indication when it detects a restart from the peer SCTP layer โœจ.

Here's the state diagram, bestie, check out the arrows ๐Ÿฆ‹:

                                      +--------------+
                                      |              |
               +----------------------|  ASP-ACTIVE  |
               |   Other ASP/ +-------|              |
               |   IPSP in AS |       +--------------+
               |    Overrides |           ^     |
               |              |    ASPAC/ |     | ASPIA/
               |              |[ASPAC-Ack]|     | [ASPIA-Ack]
               |              |           |     v
               |              |       +--------------+
               |              |       |              |
               |              +------>| ASP-INACTIVE |
               |                      |              |
               |                      +--------------+
               |                          ^     |
        ASPDN/ |                          |     | ASPDN /
   [ASPDN-Ack/]|                   ASPUP/ |     | [ASPDN-Ack /]
     SCTP CDI/ |              [ASPUP-Ack] |     | SCTP CDI/
     SCTP RI   |                          |     | SCTP RI
               |                          |     v
               |                      +--------------+
               |                      |              |
               +--------------------->|   ASP-DOWN   |
                                      |              |
                                      +--------------+

              Figure 3: ASP State Transition Diagram, per AS

The transitions show up as a result of receiving ASP*M messages or other events ๐Ÿ’œ. Some transitions have messages in brackets ๐Ÿ‘‘. That means the transition can be different for a given node depending on its role: whether it's generating the ASP*M request message (ASPUP, ASPAC, ASPIA or ASPDN) or just receiving it ๐ŸŒธ. In a peer-to-peer architecture (IPSP), that role can switch between the peers ๐Ÿ”„.

The transitions not in brackets are valid for tracking the states of ASPs and IPSPs that send an ASP*M request message at the peer node ๐Ÿซถ.

The transitions in brackets can be used by an ASP, or by the IPSP that receives an ASP*M request, to track the peer SGP/IPSP states, respectively ๐Ÿ’…. There may be an SGP per AS state machine at ASPs ๐Ÿฆ‹.

The transitions in brackets can be used for the IPSP DE model communication (DE-IPSPs) too ๐ŸŒˆ. They're related to the special cases where just one ASP*M message exchange is needed, like so ๐Ÿ“:

  • ASPSM messages. When ASPSM messages are exchanged using only a single exchange (one request and one acknowledgement) ๐Ÿงš. Example (see Section 5.6.2): whenever a DE-IPSP takes the leading role to start communication with a peer DE-IPSP, it sends an ASP Up message to that peer DE-IPSP โœจ. The peer MAY consider the initiating DE-IPSP to be in ASP-INACTIVE state, since it already sent a message, and answer back with ASP Up Ack ๐Ÿ”ฅ. When the initiating DE-IPSP receives this answer, it also MAY consider the peer to be in ASP-INACTIVE state, since the peer did respond ๐Ÿ’–. So a second ASP Up message exchange started by the peer DE-IPSP could be avoided ๐Ÿ™ˆ. In this case, receiving ASP Up Ack turns into a state change ๐Ÿ’œ.
  • ASPTM messages. When sending ASPTM messages to activate or deactivate all the traffic independently of routing keys, by not specifying any RC, a single exchange could be sufficient ๐ŸŽ€.

4.3.2. AS States

okay so the state of the AS lives in the M3UA layer on the SGPs ๐Ÿ’… and it changes whenever something happens, like:

  • ASP state transitions
  • Recovery timer triggers

the AS can be in one of these states ๐Ÿฆ‹

AS-DOWN ๐Ÿ’€: the Application Server is unavailable, which basically means every related ASP is in ASP-DOWN state for this AS. it starts out here, and it also goes back here when it gets removed from a configuration ๐Ÿ˜ญ

AS-INACTIVE ๐ŸŽ€: the Application Server is available but no application traffic is flowing yet. one or more related ASPs are in ASP-INACTIVE state, and/or the number of related ASPs in ASP-ACTIVE state hasn't reached n (n is the number of ASPs required to be in ASP-ACTIVE state before AS can transition to AS-ACTIVE; n = 1 for Override Traffic Mode) for this AS. the recovery timer T(r) is either not running or has already expired โฑ๏ธ

AS-ACTIVE ๐Ÿ‘‘: the Application Server is available and application traffic is active. it gets here after being in AS-INACTIVE and collecting n ASPs in ASP-ACTIVE state (n is the number of ASPs required to be in ASP-ACTIVE state before AS can transition to AS-ACTIVE; n = 1 for Override Traffic Mode), or after reaching AS-ACTIVE and keeping one or more ASPs in ASP-ACTIVE state. when one ASP is considered enough to handle traffic (smooth start), the AS in AS-INACTIVE MAY reach the AS-ACTIVE as soon as the first ASP moves to the ASP-ACTIVE state โœจ

AS-PENDING ๐Ÿฅบ: an active ASP has moved 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 moves to the AS-ACTIVE state and all the queued messages get sent to the ASP ๐Ÿซถ

if T(r) expires before an ASP becomes ASP-ACTIVE and the SGP has no alternative, the SGP may stop queuing messages and discard all previously queued messages. the AS will move to the AS-INACTIVE state if at least one ASP is in ASP-INACTIVE; otherwise, it will move to AS-DOWN state ๐Ÿ˜ค

Figure 4 shows an example AS state machine for the case where the AS/ASP data is preconfigured and is an n+k redundancy model. in other cases where the AS/ASP configuration data is created dynamically, there would be differences in the state machine, especially at creation of the AS ๐Ÿงš

        +----------+          IA2AC              +-------------+
        |    AS-   |---------------------------->|     AS-     |
        | INACTIVE |                             |   ACTIVE    |
        |          |<-----------                 |             |
        +----------+            \                +-------------+
           ^   |                 \                    ^   |
           |   | IA2DN            \ PN2IA             |   | AC2PN
           |   |                   \                  |   |
     DN2IA |   |                    \          PN2AC  |   |
           |   v                     \                |   v
        +----------+                  \          +-------------+
        |          |                   ----------|             |
        | AS-DOWN  |                             | AS-PENDING  |
        |          |                  PN2DN      |  (queueing) |
        |          |<----------------------------|             |
        +----------+                             +-------------+

                Figure 4: AS State Transition Diagram

here's what each transition means ๐Ÿ”ฅ

  • DN2IA: one ASP moves from ASP-DOWN to ASP-INACTIVE state.
  • IA2DN: the last ASP in ASP-INACTIVE moves to ASP-DOWN, causing all the ASPs to be in ASP-DOWN state.
  • IA2AC: one ASP moves to ASP-ACTIVE, causing the number of ASPs in the ASP-ACTIVE state to be n. in a special case of smooth start, this transition MAY be done when the first ASP moves to ASP-ACTIVE state.
  • AC2PN: the last ASP in ASP-ACTIVE state moves to ASP-INACTIVE or ASP-DOWN states, causing the number of ASPs in ASP-ACTIVE to drop below 1.
  • PN2AC: one ASP moves to ASP-ACTIVE.
  • PN2IA: T(r) expiry; an ASP is in ASP-INACTIVE state but no ASPs are in ASP-ACTIVE state.
  • PN2DN: T(r) expiry; all the ASPs are in ASP-DOWN state.

an AS becomes AS-ACTIVE right after n ASPs reach the ASP-ACTIVE state during the startup phase (except for smooth start). once the traffic is flowing, an AS keeps the AS-ACTIVE state until the last ASP turns to a state other than ASP-ACTIVE, which avoids unnecessary traffic disturbances as long as there are ASPs available (this assumes that the system will not always be exposed to the maximum load) ๐Ÿ’–

there are other cases where the AS/ASP configuration data is created dynamically. in those cases there would be differences in the state machine, especially at 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 nth successful REG REQ from an ASP belonging to that AS. another example is where the AS/ASP configuration data is not created until the nth ASP successfully enters the ASP-ACTIVE state. in this latter case, the AS-ACTIVE state is entered directly ๐ŸŒˆ


4.3.3. M3UA Management Procedures for Primitives

before an SCTP association is established, the ASP state at both the SGP and ASP is assumed to be ASP-DOWN ๐ŸŒธ

once the SCTP association is established (see Section 4.2), and assuming the local M3UA-User is ready, the local M3UA ASP Maintenance (ASPM) function will kick off 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 M3UA layer later gets an SCTP-COMMUNICATION_DOWN or SCTP-RESTART indication primitive from the underlying SCTP layer, it informs Layer Management by invoking the M-SCTP_STATUS indication primitive. the ASP state moves to ASP-DOWN. at an ASP, the MTP3-User gets told about any affected SS7 destinations being unavailable through MTP-PAUSE indication primitives ๐Ÿ˜ญ

in the case of SCTP-COMMUNICATION_DOWN, the SCTP client MAY try to re-establish the SCTP Association. this MAY be done by the M3UA layer automatically, or Layer Management MAY reestablish using the M-SCTP_ESTABLISH request primitive ๐Ÿ”„

in the case of an SCTP-RESTART indication at an ASP, the ASP is now considered to be in the ASP-DOWN state by its M3UA peer. if the ASP wants to recover, it has to begin 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, which tells the SGP that the ASP M3UA 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 M3UA management function.

when an ASP Up message is received at an SGP and, internally, the remote ASP is in the ASP-DOWN state and isn't considered locked out for local management reasons, the SGP marks the remote ASP as ASP-INACTIVE and informs Layer Management with an M-ASP_Up indication primitive. if the SGP knows, 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 of ๐ŸŽ€

alternatively, the SGP may move the ASP into a pool of Inactive ASPs available for future configuration within Application Servers, 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 lockout) the SGP cannot respond with an ASP Up Ack message, the SGP responds to an ASP Up message with an Error message with the 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 doesn't get 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 M3UA messages (e.g., ASP Active or REG REQ). if the SGP receives any other M3UA 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, along with an Error message ("Unexpected Message"). on top of that, the remote ASP state changes to ASP-INACTIVE in all relevant Application Servers, and all registered Routing Keys are considered deregistered ๐Ÿ˜ณ

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 ๐Ÿ’œ

if the ASP receives an unexpected ASP Up Ack message, the ASP should consider itself in the ASP-INACTIVE state. if the ASP was not in the ASP-INACTIVE state, it SHOULD send an Error message and then initiate procedures to return itself to its previous state ๐Ÿ”

4.3.4.1.1. M3UA Version Control and ASP Up

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. see Section 4.8 for more on this issue ๐ŸŽ€

4.3.4.1.2. IPSP Considerations (ASP Up)

an IPSP may be considered in the ASP-INACTIVE state after an ASP Up or ASP Up Ack has been received from it. an IPSP can be considered in the ASP-DOWN state after an ASP Down or ASP Down Ack has been received from it. the IPSP may inform Layer Management of the change in state of the remote IPSP using M-ASP_UP or M-ASP_DN indication or confirmation primitives ๐Ÿฆ‹

alternatively, when using the IPSP DE model, an interchange of ASP Up messages from each end MUST be performed. four messages are needed for completion ๐Ÿ‘‘

if for any local reason (e.g., management lockout) an IPSP cannot respond to an ASP Up message with an ASP Up Ack message, it responds to the ASP Up message with an Error message with the reason "Refused Management Blocking" and leaves the remote IPSP in the ASP-DOWN state ๐Ÿฅน

4.3.4.2. ASP-Down Procedures โœจ

Okay bestie, so this is where the ASP tells an SGP "um, I'm done, take me off the list" ๐Ÿ’… It sends an ASP Down message to an SGP when it wants to be removed from service in every Application Server it belongs to, and it stops receiving any DATA, SSNM, or ASPTM messages ๐Ÿฆ‹ This action MAY be kicked off at the ASP by an M-ASP_DOWN request primitive from Layer Management, or MAY be triggered automatically by an M3UA management function ๐ŸŒธ

Whether the ASP gets permanently removed from any AS is a configuration management thing, not a this-message thing ๐ŸŽ€ Now, if the ASP used the Registration procedures (see Section 4.4.1) to join Application Servers and didn't deregister from all of them before sending the ASP Down message, the SGP MUST consider the ASP Deregistered in every Application Server it's still a member of ๐Ÿ”ฅ No cap, that's a big one!

The SGP marks the ASP as ASP-DOWN, tells Layer Management with an M-ASP_Down indication primitive, and sends back 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 ๐Ÿ’– Like, no skipping the ack, periodt!

At the ASP, the ASP Down Ack it receives is not acknowledged ๐Ÿ™ˆ Layer Management gets 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 to be in the ASP-DOWN state ๐Ÿงš

If the ASP was previously in the ASP-ACTIVE or ASP-INACTIVE state, the ASP should then start procedures to get itself back to that previous state ๐Ÿ‘‘

When the ASP sends an ASP Down message, it starts timer T(ack) โฐ If the ASP doesn't get a response to its ASP Down message within T(ack), the ASP MAY restart T(ack) and resend ASP Down messages until it finally gets 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 that method, when T(ack) expires, you get an M-ASP_DOWN confirm primitive carrying a negative indication ๐Ÿ˜ญ Iconic behaviour, honestly ๐ŸŒˆ

4.3.4.3. ASP Active Procedures ๐Ÿงš

Okay so, anytime after the ASP has gotten an ASP Up Ack message from the SGP or IPSP, the ASP MAY send an ASP Active message to the SGP to say "hey, I'm ready to start processing traffic!" ๐Ÿ’… This can be kicked off by an M-ASP_ACTIVE request primitive from Layer Management, or an M3UA management function can start it automatically. ๐Ÿฆ‹ If an ASP wants to handle traffic for more than one Application Server over the same SCTP association, the ASP Active message(s) SHOULD contain a list of one or more Routing Contexts, so everyone knows which Application Servers that ASP Active message is for. โœจ The ASP doesn't have to put every Routing Context it cares about into one message, so it's not required to ask to become active in all of them at once. Multiple ASP Active messages MAY be used to activate the Application Servers independently, or in sets. ๐ŸŒˆ

If an ASP Active message doesn't have a Routing Context parameter, the receiver must know, through configuration data, which Application Server(s) the ASP belongs to. ๐Ÿค”

For each Application Server where the ASP can be successfully activated, the SGP or IPSP replies with one or more ASP Active Ack messages. These include the associated Routing Context(s) and reflect any Traffic Mode Type value in the related ASP Active message. ๐ŸŽ€ The Routing Context parameter MUST be included in the ASP Active Ack message(s) if the received ASP Active message had any Routing Contexts. Depending on the Traffic Mode Type request in the ASP Active message (or local configuration data if there's no request), the SGP moves the ASP into the correct ASP traffic state within the Application Server(s). Layer Management gets told with an M-ASP_Active indication. ๐Ÿ‘‘ If the SGP or IPSP gets any Data messages before an ASP Active message shows up, it MAY discard them. Once it sends an ASP Active Ack message, the SGP or IPSP is ready to send and receive traffic for those Routing Context(s). ๐Ÿ’– The ASP SHOULD NOT send Data or SSNM messages for the related Routing Context(s) before it receives an ASP Active Ack message, or it risks losing messages. ๐Ÿ˜ญ

Multiple ASP Active Ack messages MAY be used in response to an ASP Active message with several Routing Contexts. This lets the SGP or IPSP acknowledge different (sets of) Routing Contexts independently. ๐Ÿซถ

The ASP Active message gets answered in the following ways, depending on whether the RC parameter is there and whether it's needed:

  • If the RC parameter is included in the ASP Active message and the corresponding RK has already been defined (through static configuration or dynamic registration), the peer node MUST respond with an ASP Active Ack message. If the SGP answers an ASP Active message with an Error message for some local reason (e.g., management lockout), the reason is "Refused Management Blocking". ๐Ÿ”’
  • If the RC parameter is included in the ASP Active message and a corresponding RK has NOT been defined yet (through static configuration or dynamic registration), the peer MUST respond with an ERROR message with the Error Code "No configured AS for ASP". ๐Ÿ™…โ€โ™€๏ธ
  • If (1) the RC parameter is not included in the ASP Active message, (2) there are RKs defined (through static configuration or dynamic registration), and (3) RC is not mandatory, the peer node SHOULD respond with an ASP Active Ack message and activate all the RKs it has defined for that specific ASP. โœจ
  • If (!) the RC parameter is not included in the ASP Active message, (2) there are RKs defined (through static configuration or dynamic registration), (3) and RC is mandatory, the peer node MUST respond with an ERROR message with the Error Code "Missing Parameter". ๐Ÿ’€
  • If (1) the RC parameter is not included in the ASP Active message, (2) there are RKs defined (through static configuration or dynamic registration) and (3) RC is not mandatory, the peer node MUST respond with an ASP Active Ack message if it is ready to handle traffic. Otherwise, it sends an ERROR message with the Error Code "No Configured AS for ASP" (meaning it's not ready to become active). ๐ŸŒธ
  • If the RC parameter is not included in the ASP Active message and there are no RKs defined, the peer node SHOULD respond with an ERROR message with the Error Code "Invalid Routing Context". ๐Ÿ™ˆ

No matter what the RC looks like, 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 APS-ACTIVE state. ๐Ÿ’œ

At the ASP, the ASP Active Ack message that comes in does not get acknowledged. Layer Management gets informed with an M-ASP_ACTIVE confirm primitive. ๐Ÿฆ‹ It's totally possible for the ASP to receive Data messages before the ASP Active Ack message, because the ASP Active Ack and Data messages from an SG or IPSP can be sent on different SCTP streams. Message loss is possible too, since the ASP doesn't consider itself in the ASP-ACTIVE state until it receives the ASP Active Ack message. ๐Ÿ˜ฌ

When the ASP sends an ASP Active message, it starts the timer T(ack). If no response to an ASP Active message arrives within T(ack), the ASP MAY restart T(ack) and resend ASP Active messages until it gets 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 control of Layer Management. In that 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 M3UA layer: Override, Loadshare and Broadcast. ๐ŸŒˆ When it's included, the Traffic Mode Type parameter in the ASP Active message says which traffic handling mode to use for a particular Application Server. If the SGP decides the mode in an ASP Active message is unsupported or doesn't match the mode configured for the AS, it responds with an Error message ("Unsupported / Invalid Traffic Handling Mode"). ๐Ÿšซ If the traffic handling mode of the Application Server isn't already known from configuration data, the traffic handling mode in the first ASP Active message that moves the Application Server state to AS-ACTIVE MAY be used to set the mode. ๐ŸŽ€

For an Override mode AS, when an SGP receives an ASP Active message, all traffic for the AS gets (re)directed to the ASP that sent it. ๐Ÿ‘‘ Any previously active ASP in the AS is now in the state ASP-INACTIVE and SHOULD no longer receive traffic from the SGP within the AS. The SGP or IPSP then MUST send a Notify message ("Alternate ASP_Active") to the previously active ASP in the AS, and SHOULD stop traffic to and from that ASP. ๐Ÿ™…โ€โ™€๏ธ The ASP that gets this Notify MUST consider itself to be in the ASP-INACTIVE state now, unless it already knows that through inter-ASP communication with the Overriding ASP. ๐Ÿซถ

For a Loadshare mode AS, when an SGP or IPSP receives an ASP Active message, traffic gets directed to the ASP that sent it, along with all the other ASPs that are currently active in the AS. ๐ŸŒธ The algorithm the SGP uses to loadshare traffic across all the active ASPs in an AS is implementation dependent. For example, it could be round-robin, or based on information in the Data message (e.g., the SLS, SCCP SSN, or ISUP CIC value). ๐Ÿง  An SGP or IPSP that gets an ASP Active message for the first ASP in a Loadshare AS MAY choose not to direct traffic to that newly active ASP until it figures out there are enough resources for the expected load (e.g., until there are "n" ASPs in state ASP-ACTIVE in the AS). In that case, the SGP or IPSP SHOULD withhold the Notify (AS-ACTIVE) until there are enough resources. โณ

For the n+k redundancy case, the ASPs in that AS should coordinate among themselves on how many ASPs are active in the AS, and should start sending traffic only after n ASPs are active. ๐Ÿค All ASPs within a loadsharing mode AS must be able to process any Data message received for the AS, so they can handle any failover or rebalancing of the offered load. ๐Ÿ”ฅ

For a Broadcast mode AS, when an SGP or IPSP receives an ASP Active message, traffic gets directed to the ASP that sent it, along with all the other ASPs that are currently active in the AS. ๐Ÿ“ฃ The algorithm the SGP uses to broadcast traffic across all the active ASPs is a simple broadcast algorithm: every message is sent to each of the active ASPs. ๐ŸŒˆ

At startup or restart, an SGP or IPSP that gets an ASP Active message for the first ASP in a Loadshare AS SHOULD NOT direct traffic to that newly active ASP until it determines there are sufficient resources for the expected load (e.g., until there are "n" ASPs in state ASP-ACTIVE in the AS). In that case, the SGP or IPSP SHOULD withhold the Notify (AS-ACTIVE) until there are sufficient resources. ๐Ÿ“

An SGP or IPSP that gets an ASP Active message for the first ASP in a Broadcast AS MAY choose not to direct traffic to that newly active ASP until it determines there are sufficient resources for the expected load (e.g., until there are "n" ASPs in state ASP-ACTIVE in the AS). In that case, the SGP or IPSP SHOULD withhold the Notify (AS-ACTIVE) until there are sufficient resources. โœจ

For the n+k redundancy case, the ASPs in that AS should coordinate among themselves on how many ASPs are active in the AS, and should start sending traffic only after n ASPs are active. ๐Ÿซถ

Whenever an ASP in a Broadcast mode AS becomes ASP-ACTIVE, the SGP MUST tag the first DATA message broadcast in each traffic flow with a unique Correlation Id parameter. ๐Ÿฆ‹ The point of this Id is to let the newly active ASP line up its processing of each traffic flow with the other ASPs in the broadcast group. Synchronization, bestie! ๐Ÿ’–

4.3.4.3.1. IPSP Considerations (ASP Active) ๐ŸŒท

Either of the IPSPs can start the communication. When an IPSP receives an ASP Active, it should mark the peer as ASP-ACTIVE and send back an ASP Active Ack message. An ASP that receives an ASP Active Ack message may mark the peer as ASP-Active, if it isn't already in the ASP-ACTIVE state. ๐Ÿ’…

Alternatively, when using the IPSP DE model, an interchange of ASP Active messages from each end MUST be performed. Four messages are needed to complete it. ๐ŸŽ€๐Ÿ’œ

4.3.4.4. ASP Inactive Procedures โœจ

okay so this is the part where an ASP says "bestie, I'm stepping out of the traffic" ๐Ÿ’… When an ASP wants to stop receiving traffic within an AS, or it wants to start the deactivation process, it sends an ASP Inactive message to the SGP or IPSP ๐Ÿฆ‹

An ASP Inactive message MUST always be responded to by the peer (other messages can sneak in the middle, that's lowkey normal ๐Ÿ™ˆ). The reply depends on what's inside the message:

  • If the received ASP Inactive message contains an RC parameter and the corresponding RK is defined (by either static configuration or dynamic registration), the SGP/IPSP MUST respond with an ASP Inactive Ack message ๐Ÿ’–
  • If the received ASP Inactive message contains an RC parameter that is not defined (by either static configuration or dynamic registration), the SGP/IPSP MUST respond with an ERROR message with the Error Code "Invalid Routing Context" ๐Ÿ’€
  • If the received ASP Inactive message does not contain an RC parameter and the RK is defined (by either static configuration or dynamic registration), the SGP/IPSP must turn the ASP/IPSP to ASP-INACTIVE state in all the ASes it serves and MUST respond with an ASP Inactive Ack message โœจ
  • If the received ASP Inactive message does not contain an RC parameter and the RK is not defined (by either static configuration or dynamic registration), the SGP/IPSP MUST respond with an ERROR message with the Error Code "No configured AS for ASP" ๐Ÿ˜ญ

The ASP can start sending an ASP Inactive message in one of two ways. It MAY be initiated by an M-ASP_INACTIVE request primitive from Layer Management, or it MAY be triggered automatically by an M3UA management function ๐Ÿงš If the ASP is handling traffic for more than one Application Server over a shared SCTP association, the ASP Inactive message carries one or more Routing Contexts so everyone knows which Application Servers it applies to ๐Ÿซถ

If an ASP Inactive message has no Routing Context parameter, the receiver has to know from its configuration data which Application Servers the ASP belongs to, and then it moves the ASP to the ASP-INACTIVE state in all of them ๐Ÿ’œ

Now for Override mode ASes ๐Ÿ‘‘ In this case another ASP has already taken over the traffic with an ASP Active ("Override") message. So the SGP already sees the ASP that's sending ASP Inactive as being in ASP-INACTIVE state. The ASP still gets an ASP Inactive Ack message, but only after the SGP makes sure all traffic has stopped going to that ASP ๐Ÿ›‘

For Loadshare mode ASes, the SGP moves the ASP to ASP-INACTIVE, and the AS traffic gets reallocated across the remaining ASPs that are in ASP-ACTIVE, following whatever loadsharing algorithm the AS is using ๐Ÿ” A Notify message ("Insufficient ASP resources active in AS") MAY be sent to all inactive ASPs if needed. The ASP gets its ASP Inactive Ack message once all traffic has been halted, and Layer Management gets told with an M-ASP_INACTIVE indication primitive ๐ŸŒธ

Broadcast mode ASes work similarly ๐Ÿ“ก The SGP moves the ASP to ASP-INACTIVE, and the AS traffic is broadcast only to the remaining ASPs in ASP-ACTIVE. A Notify message ("Insufficient ASP resources active in AS") MAY be sent to all inactive ASPs, if required. The ASP Inactive Ack message goes out after all traffic is halted, and Layer Management is informed with an M-ASP_INACTIVE indication primitive ๐Ÿ“

If one ASP Inactive message has multiple Routing Contexts, the SGP or IPSP MAY send multiple ASP Inactive Ack messages in reply. That way it can acknowledge different sets of Routing Contexts independently ๐ŸŽ€ The SGP or IPSP also sends an Error message ("Invalid Routing Context") for each invalid or unconfigured Routing Context value it gets 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. The ASP is already marked as ASP-INACTIVE at the SGP, so this is just a formality ๐Ÿ’…

On the ASP side, the ASP Inactive Ack message it receives is not acknowledged itself ๐Ÿ™ƒ Layer Management is informed with an M-ASP_INACTIVE confirm primitive. If the ASP gets an ASP Inactive Ack without having sent an ASP Inactive message, the ASP should now consider itself to be in the ASP-INACTIVE state. And if the ASP was previously in ASP-ACTIVE, it should then start the procedures to return itself to its previous state ๐Ÿ”„

When the ASP sends an ASP Inactive message, it starts the timer T(ack) โฐ If no response shows up within T(ack), the ASP MAY restart T(ack) and resend ASP Inactive messages until it finally gets an ASP Inactive Ack message. T(ack) is provisionable, with a default of 2 seconds. Or, if you prefer, retransmission of ASP Inactive messages MAY be put under the control of Layer Management instead. In that method, when T(ack) expires, you get an M-ASP_Inactive confirm primitive carrying a negative indication โŒ

Last bit of this section ๐Ÿง If no other ASPs in the Application Server are in the ASP-ACTIVE state, the SGP MUST send a Notify message ("AS-Pending") to all ASPs in the AS that are in the ASP-INACTIVE state. The SGP SHOULD start buffering the incoming messages for T(r) seconds, and after that, messages MAY be discarded. T(r) is configurable by the network operator. If the SGP gets an ASP Active message from an ASP in the AS before T(r) expires, the buffered traffic is directed to that ASP and the timer is cancelled โœจ If T(r) does expire, the AS moves to the AS-INACTIVE state ๐Ÿ’ค

4.3.4.4.1. IPSP Considerations (ASP Inactive)

An IPSP may be considered to be in the ASP-INACTIVE state by a remote IPSP after it has received an ASP Inactive or ASP Inactive Ack message from it ๐Ÿ‘€

Alternatively, when using the IPSP DE model, an interchange of ASP Inactive messages MUST be performed from each end. Four messages are needed to complete it ๐Ÿซถ (yes, four. count them with me ๐Ÿ”ข)

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. It carries the 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 happened because of an ASP failure or because of receipt of an ASP State management (ASPSM) / ASP Traffic Management (ASPTM) message ๐Ÿง  In the second case, the Notify message MUST be sent after any related acknowledgement messages (e.g., ASP Up Ack, ASP Down Ack, ASP Active Ack, or ASP Inactive Ack) ๐Ÿ™Œ

When an ASP moves from ASP-DOWN to ASP-INACTIVE within a particular AS, a Notify message SHOULD be sent by the ASP-UP receptor, after it sends the ASP-UP-ACK. The point is to tell the ASP what the current AS state is ๐Ÿ—บ๏ธ

If an SGP sends a Notify message ("AS-PENDING") and it now has no ASPs active to service the traffic, or if a Notify ("Insufficient ASP resources active in AS") message is sent in Loadshare or Broadcast mode, the Notify message does not explicitly compel the receiving ASP(s) to become active. The ASPs stay in control of what traffic action gets taken, and when ๐ŸŽ›๏ธ

If a Notify message doesn't contain a Routing Context parameter, the receiver must know, from configuration data, which Application Servers the ASP is a member of, and then take the appropriate action in each AS ๐Ÿ’…

4.3.4.5.1. IPSP Considerations (NTFY)

Notify works the same way as in the SG-AS case ๐Ÿค One of the IPSPs can send this message to any remote IPSP that is not in the ASP-DOWN state ๐Ÿฆ‹

4.3.4.6. Heartbeat Procedures ๐Ÿ’“

The optional Heartbeat procedures MAY be used when operating over transport layers that don't have their own heartbeat mechanism for detecting loss of the transport association (that is, anything other than SCTP) ๐Ÿงšโ€โ™€๏ธ Either M3UA peer may optionally send Heartbeat messages periodically, subject to a provisionable timer, T(beat). When an M3UA peer receives a Heartbeat message, it MUST respond with a Heartbeat Ack message ๐Ÿ’–

If no Heartbeat Ack message (or any other M3UA message) arrives from the M3UA peer within 2*T(beat), the remote M3UA peer is considered unavailable ๐Ÿ˜ฑ Transmission of Heartbeat messages stops, and the signalling process SHOULD attempt to re-establish communication if it is configured as the client for the disconnected M3UA peer ๐Ÿ“ž

The Heartbeat message may optionally carry an opaque Heartbeat Data parameter, and it MUST be echoed back unchanged in the related Heartbeat Ack message ๐Ÿ” When the sender looks at what came back in the Heartbeat Ack message, it MAY choose to consider the remote M3UA peer unavailable ๐Ÿคทโ€โ™€๏ธ The contents and format of the Heartbeat Data parameter are implementation-dependent, and they're 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 timestamp mechanism (to evaluate delays) โฑ๏ธ

Note: Heartbeat-related events are not shown in Figure 3 "ASP state transition diagram". ๐Ÿ“

4.4. Routing Key Management Procedures [Optional] ๐Ÿ”‘

4.4.1. Registration โœจ

okay so an ASP MAY dynamically register with an SGP as an ASP within an Application Server by sending a REG REQ message ๐Ÿ’… The Routing Key parameter in that REG REQ message is where the details for the Routing Key live, bestie ๐Ÿ—๏ธ

The SGP checks the Routing Key parameter it got and compares it to the Routing Keys it already has set up ๐Ÿ‘€ If the Routing Key matches an existing SGP Routing Key entry and the ASP isn't already on the list of ASPs for that Application Server, the SGP MAY let the ASP join the AS ๐ŸŽ€ Or, if the Routing Key doesn't exist yet and the data is valid and unique, an SGP that supports dynamic configuration MAY make a brand new Routing Key and Application Server and add the ASP to it ๐ŸŒฑ Either way, the SGP sends back a Registration Response message to the ASP with the same Local-RK-Identifier from the first request, plus a Registration Result of Successfully Registered โœจ It also includes a unique Routing Context value for the SGP Routing Key. How the SGP picks that Routing Context value is up to the implementation, but it must be guaranteed to be unique for each Application Server or Routing Key the SGP supports ๐Ÿ”‘

If the SGP doesn't support the registration procedure, it sends an Error message to the ASP with the error code Unsupported Message Class ๐Ÿ™…โ€โ™€๏ธ

If the SGP decides the Routing Key data is invalid, or has invalid parameter values, it sends back a Registration Response message with a Registration Result of Error Invalid Routing Key, Error - Invalid DPC, or Error - Invalid Network Appearance, whichever one fits ๐Ÿ’€

Now this one is a little tricky ๐Ÿง  If the SGP sees that the requested RK partly matches an existing RK, but not exactly, AND an incoming signalling message at the SGP could match both the requested RK and the existing one, the SGP sends a Registration Response message to the ASP with a Registration Status of Error - "Cannot Support Unique Routing". An incoming signalling message received at an SGP should not match against more than one Routing Key ๐Ÿšซ

If the SGP sees that the received RK was already registered, fully and exactly, either statically or dynamically, by the sending ASP, it sends a Registration Response message with a Registration Result of Error - Routing Key Already Registered ๐Ÿ™ˆ This error applies whether the sending ASP/IPSP is in ASP-ACTIVE or ASP-INACTIVE for the matching AS. For this error code, the RC field in the Registration Response message MUST be filled in with the actual RC value the SGP has for the RK named in the Registration Request message ๐Ÿซถ

An ASP MAY ask to change an existing Routing Key by including a Routing Context parameter in a Registration Request message ๐Ÿ”„ When the SGP gets a Registration Request with a Routing Context, and it figures out that the Routing Context applies to an existing Routing Key, the SGP MAY update that existing Routing Key to match the new info in the Routing Key parameter. If the SGP doesn't support this re-registration procedure, or the RC doesn't exist, the answer is a ERR Routing Key Change Refused Registration Response. Otherwise the answer is a Registration Response of Successfully Registered ๐ŸŒธ

If the SGP doesn't authorize an otherwise valid registration request, it sends a REG RSP message to the ASP with the Registration Result Error - Permission Denied ๐Ÿšช

If an SGP finds that a received Routing Key doesn't exist, and the SGP doesn't support dynamic configuration, it sends a Registration Response message with a Registration Result of Error - Routing Key not Currently Provisioned ๐Ÿ“ญ

If an SGP finds that a received Routing Key doesn't exist, the SGP supports dynamic configuration, but it doesn't have the room to add new Routing Key and Application Server entries, it sends a Registration Response with a Registration Result of Error - Insufficient Resources ๐Ÿ“ฆ

If an SGP finds that a received Routing Key doesn't exist, and the SGP supports dynamic configuration but needs the Routing Key to be manually provisioned at the SGP first, it sends a Registration Response with a Registration Result of Error - Routing Key not Currently Provisioned ๐Ÿ› ๏ธ

If an SGP finds that one or more of the Routing Key parameters aren't supported for creating new Routing Key entries, it sends a Registration Response with a Registration Result of Error - Unsupported RK parameter field ๐Ÿ™…

A Registration Response of Error - Unsupported Traffic Handling Mode comes back if the Routing Key in the REG REQ has a Traffic Handling Mode that doesn't match the mode currently set up for the matching Application Server ๐Ÿšฆ

An ASP MAY register several Routing Keys at once by putting a bunch of Routing Key parameters into one REG REQ message ๐Ÿ“ The SGP MAY answer each registration request in one REG RSP message, with the success or failure result for each Routing Key in its own Registration Result parameter. Or the SGP MAY answer with several REG RSP messages, each holding one or more Registration Result parameters ๐Ÿงš The ASP uses the Local-RK-Identifier parameter to match up requests and responses, so it doesn't get lost โœจ

Once an ASP is successfully registered in an AS, the SGP can now send related SS7 Signalling Network Management messaging ๐Ÿ“ก, unless that already started when the ASP moved to the ASP-INACTIVE state ๐Ÿ’œ


4.4.2. Deregistration ๐Ÿ‘‹

An ASP MAY dynamically deregister with an SGP as an ASP within an Application Server by sending a DEREG REQ message. The Routing Context parameter in that DEREG REQ message says which Routing Keys to deregister ๐Ÿ—‘๏ธ An ASP SHOULD move to the ASP-INACTIVE state for an Application Server before it tries to deregister the Routing Key (so, deregister after you get an ASP Inactive Ack ๐Ÿ™Œ). Also, an ASP SHOULD deregister from every Application Server it belongs to before it tries to move to the ASP-Down state ๐Ÿซถ

The SGP checks the Routing Context parameter it got and makes sure the ASP is actually registered in the Application Server(s) for those Routing Contexts. If that checks out, the ASP gets deregistered as an ASP in the related Application Server โœ…

Deregistering doesn't automatically mean the Routing Key and Application Server config gets deleted at the SG ๐Ÿงผ

Other ASPs might still be hanging out in the Application Server, so in that case the Routing Key data SHOULD NOT be deleted ๐Ÿšซ If a Deregistration leaves an Application Server with no ASPs left, an SG MAY delete the Routing Key data ๐Ÿ’…

The SGP confirms the deregistration request by sending a DEREG RSP message back to the ASP that asked. The result is in the Deregistration Result parameter, which says whether it worked or didn't, and why ๐Ÿ“

An ASP MAY deregister several Routing Contexts at once by including a bunch of Routing Contexts in one DEREG REQ message ๐ŸŒˆ The SGP MAY answer each deregistration request in one DEREG RSP message, with the success or failure result for each Routing Context in its own Deregistration Result parameter ๐Ÿ’–


4.4.3. IPSP Considerations (REG/DEREG) ๐Ÿฆ‹

The Registration and Deregistration procedures work the same way in the IPSP cases as they do in the AS-SG cases ๐Ÿค An IPSP may register an RK in the remote IPSP. An IPSP is responsible for deregistering the RKs that it has registered ๐Ÿงพ


4.5. Procedures to Support the Availability or Congestion Status of SS7 Destination ๐Ÿšฆ

4.5.1. At an SGP ๐Ÿ“ก

When the nodal interworking function at an SGP sends the SGP M3UA layer an MTP-PAUSE, MTP-RESUME or MTP-STATUS indication primitive, the SGP M3UA layer sends a matching SS7 Signalling Network Management (SSNM) DUNA, DAVA, SCON, or DUPU message (see Section 3.4) to the M3UA peers at the concerned ASPs ๐Ÿ’Œ The M3UA layer must fill in the various fields of the SSNM messages so they match the info in the primitives ๐ŸŽฏ

The SGP M3UA layer decides which concerned ASPs to tell based on the specific SS7 network the primitive indication is about ๐Ÿ—บ๏ธ That way, all ASPs set up to send and receive traffic within a particular Network Appearance get the news. If the SGP operates within a single SS7 Network Appearance, then every ASP gets informed ๐Ÿซถ

For the special case where an ASP becomes active for an AS, but destinations that usually work for that AS are inaccessible, restricted, or congested, the SG MAY send DUNA, DRST, or SCON messages for those inaccessible, restricted, or congested destinations to the newly active ASP ๐Ÿ™…โ€โ™€๏ธ This stops the ASP from sending traffic to destinations it might not otherwise know are down, restricted, or congested. For the newly activating ASP that the SGP got an ASP Active message from, these DUNA, DRST, and SCON messages MAY be sent before the ASP Active Ack that finishes the activation procedure ๐Ÿงš

DUNA, DAVA, SCON, and DRST messages may be sent one after another and get processed by the receiver in the order they were sent โฉ

Sequencing isn't required for the DUPU or DAUD messages, which MAY be sent unsequenced ๐ŸŒ€

4.5.2. At an ASP ๐ŸŽ€

4.5.2.1. Single SG Configurations ๐ŸŒŸ

At an ASP, when the M3UA layer gets an SS7 Signalling Network Management (SSNM) message from the remote M3UA Peer, it sends the matching primitive indications up to the resident M3UA-Users. Local management is informed too ๐Ÿ“ฃ

If a local event causes SS7 destinations to become unavailable or congested, the M3UA layer at the ASP SHOULD pass up indications in the primitives to the M3UA User, just like it got the equivalent SSNM messages ๐Ÿ’ซ For example, losing an SCTP association to an SGP can make a set of SS7 destinations unavailable. In that case, MTP-PAUSE indication primitives to the M3UA User are the right move ๐Ÿ™Œ

4.5.2.2. Multiple SG Configurations ๐Ÿฆ‹

At an ASP, when the M3UA layer gets a Signalling Network Management message from the remote M3UA Peer, it updates the status of the affected route(s) through the originating SG ๐Ÿ›ฃ๏ธ It also figures out whether the overall availability or congestion status of the affected destination(s) has changed. If it has, the M3UA layer sends the appropriate primitive indications to the resident M3UA-Users. Local management is informed as well ๐Ÿ’œ

Implementation Note: To pull this off, the M3UA layer at an ASP keeps track of route status via the SG, much like an MTP3 layer keeps track of route-set status ๐Ÿง โœจ

4.5.3. ASP Auditing ๐Ÿ”โœจ

Okay so an ASP can optionally start an audit to ask an SGP how an SS7 destination (or a whole bunch of them) is doing, like availability and, if the national congestion method with multiple congestion levels and message priorities is in use, congestion status too ๐Ÿ’…. The ASP sends a Destination Audit (DAUD) message to the SGP asking for the current availability and congestion status of one or more SS7 Destination Point Codes ๐Ÿงš.

The DAUD message MAY be sent unsequenced ๐ŸŽ€. The DAUD MAY be sent by the ASP in these cases:

  • Periodic. A Timer that was originally set when a DUNA, SCON, or DRST message came in has expired, and no later DAVA, DUNA, SCON, or DRST message has updated the availability/congestion status of the affected Destination Point Codes. The Timer gets reset when a DAUD goes out. In this case, the DAUD goes to the SGP that originally sent the SSNM message ๐Ÿ•ฐ๏ธ.
  • Isolation. The ASP is newly ASP-ACTIVE or has been cut off from an SGP for a long stretch. The ASP MAY request the availability/congestion status of one or more SS7 destinations it expects to talk to ๐Ÿฆ‹.
Implementation Note: In the first case above, the auditing procedure must not be invoked when a received SCON message has a congestion level value of "no congestion" or "undefined" (i.e., congestion Level = "0") ๐Ÿ™ˆ.

The SGP SHOULD respond to a DAUD message with the MTP3 availability/congestion status of the routeset linked to each Destination Point Code in the DAUD message ๐Ÿ’–. Each requested SS7 destination's status shows up in a DUNA message (if unavailable), a DAVA message (if available), or a DRST (if restricted, and the SGP supports this feature in national networks) ๐ŸŒธ. For national networks, the SGP SHOULD also send a SCON message (if the destination is congested) before the DAVA or DRST ๐ŸŒˆ.

Where the SGP doesn't keep track of the congestion status of the SS7 destination, the response to a DAUD should always be only a DAVA, DRST, or DUNA message, whichever fits ๐Ÿซถ.

Any DUNA or DAVA message sent in response to a DAUD MAY contain a list of Affected Point Codes ๐Ÿ“.

An SG MAY refuse to share the availability or congestion status of a destination if, for example, the ASP isn't authorized to know it ๐Ÿ”’. The SG MAY respond with an Error Message (Error Code = "Destination Status Unknown") ๐Ÿ’€.

An SG SHOULD respond with a DUNA message when a DAUD comes in with an unknown Signalling Point Code ๐Ÿ‘‘.


4.6. MTP3 Restart ๐Ÿ”„

When the MTP3 in the SG goes through an MTP restart, event communication SHOULD be handled like this ๐Ÿ’œ:

When the SG finds out about SS7 network isolation, the SGPs send an indication to all concerned available ASPs (i.e., ASPs in the ASP-ACTIVE state), using DUNA messages for the concerned destinations ๐Ÿ˜ญ.

When the SG has finished the MTP Restart procedure, the M3UA layers at the SGPs tell all concerned ASPs in the ASP-ACTIVE state about any available or restricted SS7 destinations, using DAVA/DRST messages โœจ. No message is needed for destinations that are still unavailable after the restart procedure ๐Ÿซ .

When the M3UA layer at an ASP gets a DUNA message saying an SS7 destination is unavailable at an SG, MTP Users receive an MTP-PAUSE indication and stop any affected traffic to that destination ๐Ÿ›‘. When M3UA gets a DAVA/DRST message, MTP Users receive an MTP-RESUME indication and can resume traffic to the newly available SS7 destination, as long as the ASP is in the ASP-ACTIVE state towards this SGP ๐ŸŽ‰.

The ASP MAY choose to audit the availability of unavailable destinations by sending DAUD messages ๐Ÿ”Ž. This could happen when, for example, an AS becomes active at an ASP and doesn't have current destination statuses. If MTP restart is in progress at the SG, the SGP returns a DUNA message for that destination, even if it had received an indication that the destination became available or restricted ๐Ÿ™…โ€โ™€๏ธ.

When an ASP becomes active for an AS and the SG is experiencing SS7 network isolation or is performing the MTP Restart procedure for the AS, the SG MAY send a DUNA message for the concerned destinations to the newly active ASP, so the ASP doesn't send traffic ๐Ÿšซ. These messages can be sent after receiving the ASP Active, and before sending the ASP Active Ack, so that the ASP doesn't start traffic to these destinations before the SSNM messages arrive ๐Ÿงฏ. Besides DUNA messages, SCON, DRST, and DAVA can also be sent ๐Ÿ’….

In the IPSP case, MTP restart could be considered if the IPSP also has a connection to an SS7 network ๐ŸŒ. In that case, the same behaviour as described above for the SGP would apply to the restarting IPSP ๐Ÿ”. This would also be true if the IPSPs were seen as exchanging MTP Peer PDUs, instead of MTP primitives between MTP User and MTP Provider ๐Ÿงฉ. In other words, M3UA doesn't provide an equivalent to Traffic Restart Allowed messages, which would signal the end of the restart procedure between peer IPSPs that are also connected to an SS7 network ๐Ÿฅฒ.


4.7. NIF Not Available ๐ŸŒ™

Implementation Note: Even though the NIF is decided to be an implementation dependent function, here are some guidelines that might be handy ๐Ÿง :

  • If an SGP is completely isolated from the NIF, the SGP should send ASP Down Ack to all its connected ASPs. When the SGP gets an ASP Up message while isolated from the NIF, it should respond with an Error ("Refused - Management Blocking") ๐Ÿ™…โ€โ™€๏ธ.
  • If an SGP has a partial failure (where it can keep serving one or more active AS, but because of the failure it can't serve one or more other active AS), the SGP should send ASP Inactive Ack to all its connected ASPs for the affected AS. When the SGP gets an ASP Active message for an affected AS while still partially isolated from the NIF, it should respond with an Error ("Refused - Management Blocking") ๐Ÿšง.
  • If an SG is isolated from the NIF, that means each SGP within the SG should follow the procedure mentioned above ๐Ÿซถ.

4.8. M3UA Version Control ๐Ÿ”ข

If a message with an unsupported version comes in, the receiving end responds with an Error message showing the version the receiving node supports, and it tells Layer Management ๐Ÿ“ฃ.

This is super useful when protocol version upgrades are happening across a network ๐Ÿ†™. A node that's been upgraded to a newer version should still support the older versions used by the other nodes it talks to ๐Ÿค. Because ASPs start the ASP Up procedure, the message with the unsupported version is probably an ASP Up message, so the Error message would usually come from the SGP ๐Ÿ’….


4.9. M3UA Termination ๐Ÿ›‘

Whenever an M3UA node wants to stop talking to its peer node, it MAY use one of these procedures ๐Ÿ‘‹:

  • a) Send the sequence of ASP-INACTIVE, DEREG (optionally whenever dynamic registration is used), and ASP-DOWN messages, then do the SCTP Shutdown procedure after that ๐ŸŽฌ.
  • b) Just do the SCTP Shutdown procedure ๐Ÿ’ซ.

5. Examples of M3UA Procedures ๐ŸŽ€

5.1. Establishment of Association and Traffic between SGPs and ASPs ๐Ÿค

These scenarios show examples of M3UA message flows for setting up traffic between an SGP and an ASP, or between two IPSPs ๐Ÿ“–. In every case, it's assumed the SCTP association is already set up ๐Ÿงš.

5.1.1. Single ASP in an Application Server ("1+0" sparing), No Registration ๐ŸŒท

These scenarios show examples of M3UA message flows for setting up traffic between an SGP and an ASP where only one ASP is configured within an AS (no backup) ๐Ÿ’œ.

5.1.1.1. Single ASP in Application Server ("1+0" Sparing), No Registration ๐Ÿฆ‹

       SGP                             ASP1
        |                               |
        |<-------------ASP Up-----------|
        |-----------ASP Up Ack--------->|
        |                               |
        |-----NTFY(AS-INACTIVE)(RCn)--->|
        |                               |
        |<------- ASP Active(RCn)-------|  RC: Routing Context
        |-----ASP Active Ack (RCn)----->|      (optional)
        |                               |
        |-----NTFY(AS-ACTIVE)(RCn)----->|
        |                               |

Note: If the ASP Active message has an optional Routing Context parameter, the ASP Active message only applies to the specified RC value(s). For an unknown RC value, the SGP responds with an Error message ๐Ÿ™ˆ.

5.1.1.2. Single ASP in Application Server ("1+0" Sparing), Dynamic Registration ๐Ÿ“

This scenario is the same as 5.1.1.1, but with the optional exchange of registration information ๐Ÿซถ. In this case, the Registration is accepted by the SGP ๐ŸŽ‰.

      SGP                             ASP1
       |                               |
       |<------------ASP Up------------|
       |----------ASP Up Ack---------->|
       |                               |
       |                               |
       |<----REGISTER REQ(LRCn,RKn)----|  LRC: Local Routing
       |                               |       Key Id
       |----REGISTER RESP(LRCn,RCn)--->|   RK: Routing Key
       |                               |   RC: Routing Context
       |----NTFY(AS-INACTIVE)(RCn)---->|
       |                               |
       |                               |
       |<------- ASP Active(RCn)-------|
       |-----ASP Active Ack (RCn)----->|
       |                               |
       |-----NTFY(AS-ACTIVE)(RCn)----->|
       |                               |

Note: If the registration attempt fails (e.g., an invalid RKn), the Register Response message will carry an unsuccessful indication, and the ASP won't send an ASP Active message afterwards ๐Ÿ˜ญ.

5.1.1.3. Single ASP in Multiple Application Servers (Each with "1+0" Sparing), Dynamic Registration (Case 1 - Multiple Registration Requests) โœจ

      SGP                             ASP1
       |                               |
       |<------------ASP Up------------|
       |----------ASP Up Ack---------->|
       |                               |
       |<----REGISTER REQ(LRC1,RK1)----|  LRC: Local Routing
       |                               |       Key Id
       |----REGISTER RESP(LRC1,RC1)--->|   RK: Routing Key
       |                               |   RC: Routing Context
       |---NOTIFY(AS-INACTIVE)(RC1)--->|
       |                               |
       |                               |
       |<------- ASP Active(RC1)-------|
       |-----ASP Active Ack (RC1)----->|
       |                               |
       |----NOTIFY(AS-ACTIVE)(RC1)---->|
       |                               |
       ~                               ~
       |                               |
       |<----REGISTER REQ(LRCn,RKn)----|
       |                               |
       |----REGISTER RESP(LRCn,RCn)--->|
       |                               |
       |---NOTIFY(AS-INACTIVE)(RCn)--->|
       |                               |
       |<------- ASP Active(RCn)-------|
       |-----ASP Active Ack (RCn)----->|
       |                               |
       |----NOTIFY(AS-ACTIVE)(RCn)---->|
       |                               |

Okay so ๐Ÿซถ if a registration goes sideways, like the RKn is invalid, the Register Response comes back with an unsuccessful indication ๐Ÿ™… and the ASP just does not send an ASP Active after that. Each LRC/RK pair registration gets judged on its own ๐Ÿ’…, so every pair is its own little moment.

It is not necessary to wait for a Registration Request/Response pair to be followed by an ASP Active before the next Registration Request goes out ๐Ÿฆ‹. The ASP Active message can be sent at any time after the related successful registration, so no rush bestie ๐ŸŒธ

5.1.1.4. Single ASP in Multiple Application Servers (each with "1+0" sparing), Dynamic Registration (Case 2 - Single Registration Request) ๐ŸŽ€

        SGP                             ASP1
         |                               |
         |<------------ASP Up------------|
         |----------ASP Up Ack---------->|
         |                               |
         |                               |
         |<---REGISTER REQ({LRC1,RK1},   |
         |                   ...,        |
         |                 {LRCn,RKn}),--|
         |                               |
         |---REGISTER RESP({LRC1,RC1},-->|
         |                  ...,         |
         |                 (LRCn,RCn})   |
         |                               |
         |--NTFY(AS-INACTIVE)(RC1..RCn)->|
         |                               |
         |                               |
         |<------- ASP Active(RC1)-------|
         |-----ASP Active Ack (RC1)----->|
         |                               |
         |----NOTIFY(AS-ACTIVE)(RC1)---->|
         |                               |
         :                               :
         :                               :
         |                               |
         |<------- ASP Active(RCn)-------|
         |-----ASP Active Ack (RCn)----->|
         |                               |
         |----NOTIFY(AS-ACTIVE)(RCn)---->|
         |                               |

Note: In the case of an unsuccessful registration attempt (e.g., Invalid RKn), the Register Response message will contain an unsuccessful indication, and the ASP will not subsequently send an ASP Active message. Each LRC/RK pair registration is considered independently.

ngl this one's the bundle version ๐Ÿงš The ASP Active message can be sent at any time after the related successful registration, and it's allowed to carry more than one RC ๐Ÿ’œ

5.1.2. Two ASPs in Application Server ("1+1" Sparing) ๐Ÿ‘‘

okay the vibe here is one SGP and two ASPs in the same Application Server ๐Ÿซถ ASP1 is set up to be the ASP-ACTIVE one, and ASP2 is the backup for when ASP1 has comms problems or gets withdrawn from service ๐Ÿ˜ญ ASP2 can be a hot, warm, or cold backup, and which one it is depends on how much call or transaction state the two ASPs share, or can pass along when things fail. The message flow looks the same whether the ASP Active messages say "Override", "Loadshare", or "Broadcast" mode, though this example would typically use Override mode ๐Ÿ“

      SGP                      ASP1                       ASP2
       |                        |                          |
       |<--------ASP Up---------|                          |
       |-------ASP Up Ack------>|                          |
       |                        |                          |
       |--NOTIFY(AS-INACTIVE)-->|                          |
       |                        |                          |
       |<----------------------------ASP Up----------------|
       |----------------------------ASP Up Ack------------>|
       |                        |                          |
       |--------------------------NOTIFY(AS-INACTIVE)----->|
       |                        |                          |
       |                        |                          |
       |<-------ASP Active------|                          |
       |------ASP Active Ack--->|                          |
       |                        |                          |
       |---NOTIFY(AS-ACTIVE)--->|                          |
       |--------------------------NOTIFY(AS-ACTIVE)------->|
       |                        |                          |

5.1.3. Two ASPs in an Application Server ("1+1" Sparing, Loadsharing Case) ๐Ÿ’–

this one is basically the same energy as 5.1.2, except both ASPs get brought up to ASP-ACTIVE and then they split the traffic between them ๐Ÿฆ‹ One ASP is enough to handle the whole load on its own, so it's giving redundancy realness ๐Ÿ”ฅ

      SGP                      ASP1                       ASP2
       |                        |                          |
       |<---------ASP Up--------|                          |
       |--------ASP Up Ack----->|                          |
       |                        |                          |
       |--NOTIFY(AS-INACTIVE)-->|                          |
       |                        |                          |
       |<-----------------------------ASP Up---------------|
       |----------------------------ASP Up Ack------------>|
       |                        |                          |
       |--------------------------NOTIFY(AS-INACTIVE)----->|
       |                        |                          |
       |<--ASP Active (Ldshr)---|                          |
       |-----ASP-Active Ack---->|                          |
       |                        |                          |
       |---NOTIFY (AS-ACTIVE)-->|                          |
       |-----------------------------NOTIFY(AS-ACTIVE)---->|
       |                        |                          |
       |<---------------------------ASP Active (Ldshr)-----|
       |------------------------------ASP Active Ack------>|
       |                        |                          |

5.1.4. Three ASPs in an Application Server ("n+k" Sparing, Loadsharing Case) ๐Ÿงš

this scenario is giving three ASPs in the same Application Server ๐Ÿซถ Two of them get brought to ASP-ACTIVE and then they share the load. In this case you need a minimum of two ASPs to handle the total traffic load, which is the 2+1 sparing setup ๐Ÿ’…

     SGP                 ASP1                ASP2                ASP3
       |                   |                   |                   |
       |<------ASP Up------|                   |                   |
       |-----ASP Up Ack--->|                   |                   |
       |                   |                   |                   |
       |NTFY(AS-INACTIVE)->|                   |                   |
       |                   |                   |                   |
       |<-------------------------ASP Up-------|                   |
       |------------------------ASP Up Ack---->|                   |
       |                   |                   |                   |
       |------------------NOTIFY(AS-INACTIVE)->|                   |
       |                   |                   |                   |
       |<--------------------------------------------ASP Up--------|
       |--------------------------------------------ASP Up Ack---->|
       |                   |                   |                   |
       |--------------------------------------NOTIFY(AS-INACTIVE)->|
       |                   |                   |                   |
       |                   |                   |                   |
       |<--ASP Act (Ldshr)-|                   |                   |
       |----ASP Act Ack--->|                   |                   |
       |                   |                   |                   |
       |                   |                   |                   |
       |<-------------------ASP Act. (Ldshr)---|                   |
       |----------------------ASP Act Ack----->|                   |
       |                   |                   |                   |
       |--NTFY(AS-ACTIVE)->|                   |                   |
       |--------------------NOTIFY(AS-ACTIVE)->|                   |
       |----------------------------------------NOTIFY(AS-ACTIVE)->|
       |                   |                   |                   |
       |                   |                   |                   |

5.2. ASP Traffic Failover Examples ๐Ÿฆ‹

5.2.1. 1+1 Sparing, Withdrawal of ASP, Backup Override โœจ

okay so picking up from the 1+1 setup in Section 5.1.2, ASP1 is leaving the party ๐Ÿฅบ Watch how the SGP tells everyone what's happening:

            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)------------>|

Note: If the SGP M3UA layer detects the loss of the M3UA peer (e.g., M3UA heartbeat loss or detection of SCTP failure), the initial ASP Inactive message exchange (i.e., SGP to ASP1) would not occur. ๐Ÿ’€ so if the connection just dies, the whole polite goodbye gets skipped, no cap.

5.2.2. 1+1 Sparing, Backup Override ๐Ÿ‘‘

following on from the example in Section 5.1.2, ASP2 is like "move over, I'm taking the spotlight" and overrides ASP1 to take over the traffic ๐Ÿ’…

            SGP                      ASP1                       ASP2
             |                        |                          |
             |<----------------------------- ASP Active----------|
             |------------------------------ASP Active Ack------>|
             |----NTFY(Alt ASP-Act)-->|                          |
             |                        |                          |

5.2.3. n+k Sparing, Loadsharing Case, Withdrawal of ASP ๐ŸŽ€

following from the example in Section 5.1.4, ASP1 is stepping out of service, and this time there are three ASPs in the mix, so it's giving busy group chat ๐Ÿฆ‹

     SGP                 ASP1                ASP2                ASP3
       |                   |                   |                   |
       |<----ASP Inact.----|                   |                   |
       |---ASP Inact Ack-->|                   |                   |
       |                   |                   |                   |
       |--NTFY(Ins. ASPs)->|                   |                   |
       |---------------------------------------NOTIFY(Ins. ASPs)-->|
       |                   |                   |                   |
       |                   |                   |                   |
       |<----------------------------------------ASP Act (Ldshr)---|
       |------------------------------------------ASP Act (Ack)--->|
       |                   |                   |                   |
       |-NTFY(AS-ACTIVE)-->|                   |                   |
       |-------------------NOTIFY(AS-ACTIVE)-->|                   |
       |---------------------------------------NOTIFY(AS-ACTIVE)-->|
       |                   |                   |                   |
       |                   |                   |                   |

For the Notify message to be sent, the SG maintains knowledge of the minimum ASP resources required (e.g., if the SG knows that "n+k" = "2+1" for a Loadshare AS and "n" currently equals "1"). so the SG has to know the bare minimum of ASPs it needs to keep things running ๐Ÿง 

Note: If the SGP detects loss of the ASP1 M3UA peer (e.g., M3UA heartbeat loss or detection of SCTP failure), the initial ASP Inactive message exchange (i.e., SGP-ASP1) would not occur. same energy as before: a dead connection means no polite goodbye ๐Ÿ’”


5.3. Normal Withdrawal of an ASP from an Application Server and Teardown of an Association ๐Ÿซถ

okay, so an ASP that has been confirmed in the ASP-INACTIVE state (meaning it got an ASP Inactive Ack) can now move on to the ASP-DOWN state, but only if it's actually leaving service. picking up from Section 5.2.1 or 5.2.3, where ASP1 is now "Inactive" ๐Ÿ“

            SGP                            ASP1
             |                              |
             |<-----ASP Inactive (RCn)------|    RC: Routing Context
             |----ASP Inactive Ack (RCn)--->|
             |                              |
             |<-----DEREGISTER REQ(RCn)-----|    See Notes
             |                              |
             |---DEREGISTER RESP(LRCn,RCn)->|
             |                              |
             :                              :
             |                              |
             |<-----------ASP Down----------|
             |---------ASP Down Ack-------->|
             |                              |

Note: The Deregistration procedure will typically be used if the ASP previously used the Registration procedures for configuration within the Application Server. ASP Inactive and Deregister messages exchanges may contain multiple Routing Contexts. so one exchange can cover a bunch of Routing Contexts at once, which is very efficient bestie ๐Ÿงš

The ASP should be in the ASP-INACTIVE state and should have deregistered in all its Routing Contexts before attempting to move to the ASP-DOWN state. โœจ basically: get inactive, deregister from every Routing Context, and only then head to ASP-DOWN. no skipping steps!


5.4. Auditing Examples ๐Ÿ”

5.4.1. SG State: Uncongested/Available ๐ŸŒธ

          ASP                          SGP
          ---                          ---
           |  -------- DAUD --------->  |
           |  <------ SCON(0) --------  |
           |  <------- DAVA ----------  |

5.4.2. SG State: Congested (Congestion Level=2) / Available ๐ŸŒˆ

          ASP                          SGP
          ---                          ---
           |  -------- DAUD --------->  |
           |  <------ SCON(2) --------  |
           |  <------- DAVA ----------  |

5.4.3. SG State: Unknown/Available ๐Ÿงš

          ASP                          SGP
          ---                          ---
           |  -------- DAUD --------->  |
           |  <------- DAVA ----------  |

5.4.4. SG State: Unavailable ๐Ÿ’€

          ASP                          SGP
          ---                          ---
           |  -------- DAUD --------->  |
           |  <------- DUNA ----------  |

5.5. M3UA/MTP3-User Boundary Examples ๐Ÿ’œ

5.5.1. At an ASP ๐Ÿฆ‹

this section is about how the MTP3 User and the M3UA layer hand stuff back and forth at an ASP. it's the primitive mapping tea โ˜•

5.5.1.1. Support for MTP-TRANSFER Primitives at the ASP

5.5.1.1.1. Support for MTP-TRANSFER Request Primitive

when the MTP3-User on the ASP has data for a remote MTP3-User, it uses the MTP-TRANSFER request primitive. the M3UA layer at the ASP then does the following when it gets that request from its M3UA user:

  • Determine the correct SGP.
  • Determine the correct association to the chosen SGP.
  • Determine the correct stream in the association (e.g., based on SLS).
  • Determine whether to complete the optional fields of the DATA message.
  • Map the MTP-TRANSFER request primitive into the Protocol Data field of a DATA message.
  • Send the DATA message to the remote M3UA peer at the SGP, over the SCTP association.
      SGP                       ASP
       |                         |
       |<-----DATA Message-------|<--MTP-TRANSFER req.
       |                         |

5.5.1.1.2. Support for the MTP-TRANSFER Indication Primitive

when the M3UA layer on the ASP gets a DATA message from its M3UA peer at the remote SGP, it does the following:

  • Evaluate the optional fields of the DATA message, if present.
  • Map the Protocol Data field of a DATA message into the MTP-TRANSFER indication primitive.
  • Pass the MTP-TRANSFER indication primitive to the user part. In case of multiple user parts, the optional fields of the Data message are used to determine the concerned user part.
      SGP                       ASP
       |                         |
       |------Data Message------>|-->MTP-Transfer ind.
       |                         |

5.5.1.1.3. Support for ASP Querying of SS7 Destination States

sometimes stuff like a temporary loss of connectivity to the SGP can make the M3UA layer at the ASP go "wait, who's even available?" and audit the SS7 destination availability and congestion states ๐Ÿ™ˆ Note: there is no primitive for the MTP3-User to request this audit from the M3UA layer, as this is initiated by an internal M3UA management function. so the MTP3 User can't ask for it, the M3UA layer just does it on its own.

      SGP                        ASP
       |                          |
       |<----------DAUD-----------|
       |<----------DAUD-----------|
       |<----------DAUD-----------|
       |                          |
       |                          |

5.5.2. At an SGP ๐Ÿ”ฅ

this section covers the same primitive mapping, but from the SGP's side of the fence ๐Ÿ‘‘

5.5.2.1. Support for MTP-TRANSFER Request Primitive at the SGP

when the M3UA layer at the SGP gets DATA messages from its peer that are headed for the SS7 network, it does the following:

  • Evaluate the optional fields of the DATA message, if present, to determine the Network Appearance.
  • Map the Protocol data field of the DATA message into an MTP-TRANSFER request primitive.
  • Pass the MTP-TRANSFER request primitive to the MTP3 of the concerned Network Appearance.
                       SGP                        ASP
                        |                          |
   <---MTP-TRANSFER req.|<---------DATA -----------|
                        |                          |

5.5.2.2. Support for MTP-TRANSFER Indication Primitive at the SGP

when the MTP3 layer at the SGP has data to pass up to its user parts, it uses the MTP-TRANSFER indication primitive. the M3UA layer at the SGP then does the following when it gets that indication:

  • Determine the correct AS, using the distribution function;
  • Select an ASP in the ASP-ACTIVE state.
  • Determine the correct association to the chosen ASP.
  • Determine the correct stream in the SCTP association (e.g., based on SLS).
  • Determine whether to complete the optional fields of the DATA message.
  • Map the MTP-TRANSFER indication primitive into the Protocol Data field of a DATA message.
  • Send the DATA message to the remote M3UA peer in the ASP, over the SCTP association.
                      SGP                        ASP
                       |                          |
  --MTP-TRANSFER ind.->|-----------DATA --------->|
                       |                          |

5.5.2.3. Support for MTP-PAUSE, MTP-RESUME, MTP-STATUS Indication Primitives ๐Ÿงš

the MTP-PAUSE, MTP-RESUME, and MTP-STATUS indication primitives coming from the MTP3 upper layer interface at the SGP need to be made available to the remote MTP3 User Part lower-layer interface at the concerned ASP(s). basically the SGP has to pass the news along to every ASP that needs it ๐Ÿ“ฃ

5.5.2.3.1. Destination Unavailable ๐Ÿ’€

the MTP3 layer at the SGP generates an MTP-PAUSE indication primitive when it figures out locally that an SS7 destination is unreachable. the M3UA layer maps this primitive to a DUNA message. the SGP M3UA layer decides which concerned ASPs to inform based on internal SS7 network information associated with the MTP-PAUSE indication primitive indication. that's the whole plot ๐ŸŽ€

                SGP                       ASP
                 |                         |
  --MTP-PAUSE ind.-->|---------DUNA----------->|--MTP-PAUSE ind.-->
                 |                         |

5.5.2.3.2. Destination Available ๐Ÿฆ‹

Okay so this is the glow-up of the last one ๐ŸŒธ The MTP3 at the SGP generates an MTP-RESUME indication primitive when it figures out locally that an SS7 destination that was previously unreachable is now reachable โœจ Then M3UA maps that primitive to a DAVA message. The SGP M3UA decides which ASPs need the news based on the internal SS7 network information attached to the MTP-RESUME indication primitive. Main character energy ๐Ÿ‘‘

                     SGP                       ASP
                      |                         |
  --MTP-RESUME ind.-->|-----------DAVA--------->|--MTP-RESUME ind.-->
                      |                         |

5.5.2.3.3. SS7 Network Congestion ๐Ÿšฆ

Now for the congestion moment ๐Ÿ˜ญ The MTP3 layer at the SGP generates an MTP-STATUS indication primitive when it determines locally that the route to an SS7 destination is congested. M3UA maps this primitive to a SCON message, and it figures out which ASP(s) get the SCON message based on the intended Application Server. Very targeted, very iconic ๐Ÿ’…

                     SGP                       ASP
                      |                         |
  --MTP-STATUS ind.-->|-----------SCON--------->|--MTP-STATUS ind.-->
                      |                         |

5.5.2.3.4. Destination User Part Unavailable ๐Ÿ’€

Last one in this bunch ๐Ÿซถ The MTP3 layer at the SGP generates an MTP-STATUS indication primitive when it receives an UPU message from the SS7 network. M3UA maps this primitive to a DUPU message, and it decides which ASP(s) to send the DUPU to based on the intended Application Server. Periodt ๐Ÿ“

                   SGP                       ASP
                    |                         |
  --MTP-STATUS ind.-->|----------DUPU---------->|--MTP-STATUS ind.-->
                    |                         |

5.6. Examples for IPSP Communication ๐Ÿงš

Okay these scenarios show a basic IPSP communication example for the three phases of the connection: establishment, data exchange, and disconnection ๐Ÿ’– It's assumed the SCTP association is already set up. We include both single exchange and double exchange behavior, just for illustration โœจ

5.6.1. Single Exchange ๐ŸŽ€

            IPSP-A                           IPSP-B
              |                                |
              |-------------ASP Up------------>|
              |<----------ASP Up Ack-----------|
              |                                |
              |<------- ASP Active(RCb)--------|  RC: Routing Context
              |-----ASP Active Ack (RCb)------>|      (optional)
              |                                |
              |                                |
              |<=========  DATA (RCb) ========>|
              |                                |
              |<-----ASP Inactive (RCb)--------|  RC: Routing Context
              |----ASP Inactive Ack (RCb)----->|      (optional)
              |                                |
              |<-----------ASP Down------------|
              |---------ASP Down Ack---------->|
              |                                |

Routing Context is agreed on ahead of time to be the same in both directions ๐Ÿซถ

5.6.2. Double Exchange ๐ŸŒˆ

            IPSP-A                           IPSP-B
              |                                |
              |<-------------ASP Up------------|
              |-----------ASP Up Ack---------->|
              |                                |
              |-------------ASP Up------------>|  (optional)
              |<----------ASP Up Ack-----------|  (optional)
              |                                |
              |<------- ASP Active(RCb)--------|  RC: Routing Context
              |-----ASP Active Ack (RCb)------>|      (optional)
              |                                |
              |------- ASP Active(RCa)-------->|  RC: Routing Context
              |<-----ASP Active Ack (RCa)------|      (optional)
              |                                |
              |<=========  DATA (RCa) =========|
              |==========  DATA (RCb) ========>|
              |                                |
              |<-----ASP Inactive (RCb)--------|  RC: Routing Context
              |----ASP Inactive Ack (RCb)----->|
              |                                |
              |------ASP Inactive (RCa)------->|  RC: Routing Context
              |<----ASP Inactive Ack (RCa)-----|
              |                                |
              |<-----------ASP Down------------|
              |---------ASP Down Ack---------->|
              |                                |
              |------------ASP Down----------->|  (optional)
              |<--------ASP Down Ack-----------|  (optional)
              |                                |

Okay so in this approach, only one ASP Up exchange is considered sufficient, because the other peer's response counts as a notice that it's in ASP_UP state ๐Ÿ™ˆ Same vibe for ASP Down: only one ASP Down message is needed, since once an IPSP receives an ASP_Down ack message, it's considered to be in the ASP_Down state and is not allowed to receive ASPSM messages ๐Ÿ’…


6. Security Considerations ๐Ÿ”

Okay this one is serious bestie ๐Ÿ˜ค Implementations MUST follow the normative guidance of RFC3788 [11] on the integration and usage of security mechanisms in SIGTRAN protocols ๐Ÿ›ก๏ธ

7. IANA Considerations ๐Ÿ“‹

Okay so this document has no new actions for IANA ๐ŸŒธ The subsections below are kept for historical purposes, so they're just here as the vintage closet of the doc ๐Ÿงš

7.1. SCTP Payload Protocol Identifier ๐Ÿง

IANA assigned an M3UA value for the Payload Protocol Identifier in the SCTP DATA chunk โœจ This is the value that got registered:

      M3UA    "3"

The SCTP Payload Protocol Identifier value "3" SHOULD be included in each SCTP DATA chunk, to show that SCTP is carrying the M3UA protocol ๐Ÿฆ‹ The value "0" (unspecified) is also allowed, but any other values MUST not be used ๐Ÿ™…โ€โ™€๏ธ SCTP doesn't use this Payload Protocol Identifier directly, but certain network entities MAY use it to figure out what kind of info is in a DATA chunk ๐Ÿ‘€

The User Adaptation peer MAY use the Payload Protocol Identifier to work out some extra info about the data SCTP hands it ๐Ÿ’œ

7.2. M3UA Port Number ๐Ÿ”Œ

IANA registered SCTP (and UDP/TCP) Port Number 2905 for M3UA ๐ŸŽ€ It is recommended that SGPs use this SCTP port number for listening for new connections. SGPs MAY also use statically configured SCTP port numbers instead ๐ŸŒท

7.3. M3UA Protocol Extensions ๐Ÿงฉ

This protocol can also be extended through IANA in three ways:

  • Through definition of additional message classes.
  • Through definition of additional message types.
  • Through definition of additional message parameters.

Defining new message classes, types, and parameters is an integral part of SIGTRAN adaptation layers, so IANA assigns these extensions through an IETF Consensus action as defined in Guidelines for Writing an IANA Considerations Section in RFCs [23] ๐Ÿ“š

The proposed extension must in no way adversely affect the general working of the protocol ๐Ÿซถ

7.3.1. IETF-Defined Message Classes ๐Ÿฌ

The documentation for a new message class MUST include the following information:

  • (a) A long and short name for the new message class.
  • (b) A detailed description of the purpose of the message class.

7.3.2. IETF Defined Message Types ๐Ÿญ

The documentation for a new message type MUST include the following information:

  • (a) A long and short name for the new message type.
  • (b) A detailed description of the structure of the message.
  • (c) A detailed definition and description of intended use for each field within the message.
  • (d) A detailed procedural description of the use of the new message type within the operation of the protocol.
  • (e) A detailed description of error conditions when receiving this message type.

When an implementation receives a message type it does not support, it MUST respond with an Error (ERR) message ("Unsupported Message Type") ๐Ÿšซ

7.3.3. IETF-Defined Parameter Extension ๐Ÿช„

Documentation of the message parameter MUST contain the following information:

  • (a) Name of the parameter type.
  • (b) Detailed description of the structure of the parameter field. This structure MUST conform to the general type-length-value format described in Section 3.2.
  • (c) Detailed definition of each component of the parameter value.
  • (d) Detailed description of the intended use of this parameter type, and an indication of whether and under what circumstances multiple instances of this parameter type may be found within the same message.

8. Acknowledgements ๐Ÿ’–

The authors want to thank Antonio Roque Alvarez, Joyce Archibald, Tolga Asveren, Maria-Cruz Bartolome-Rodrigo, Dan Brendes, Antonio Canete, Nikhil Jain, Roland Jesske, Joe Keller, Kurt Kite, Ming Lin, Steve Lorusso, Naoto Makinae, Howard May, Francois Mouillaud, Barry Nagelberg, Neil Olson, Heinz Prantner, Shyamal Prasad, Mukesh Punhani, Selvam Rengasami, John Schantz, Ray Singh, Michael Tuexen, Nitin Tomar, Gery Verwimp, Tim Vetter, Kazuo Watanabe, Ben Wilson, and many others for their valuable comments and suggestions ๐Ÿซถโœจ

9. Document Contributors ๐ŸŒŸ

   Ian Rytina - Ericsson
   Guy Mousseau - Nortel Networks
   Lyndon Ong - Ciena
   Hanns Juergen Schwarzbauer - Siemens
   Klaus Gradischnig - Detecon Inc.
   Mallesh Kalla - Telcordia
   Normand Glaude - Performance Technologies
   Brian Bidulock - OpenSS7
   John Loughney - Nokia
   Greg Sidebottom - Signatus Technologies

10. References ๐Ÿ“š

10.1. Normative References

   [1]  ITU-T Recommendations Q.761 to Q.767, "Signalling System No.7
        (SS7) - ISDN User Part (ISUP)"

   [2]  ANSI T1.113 - "Signaling System Number 7 - ISDN User Part"

   [3]  ETSI ETS 300 356-1 "Integrated Services Digital Network (ISDN);
        Signalling System No.7; ISDN User Part (ISUP) version 2 for the
        international interface; Part 1: Basic services"

   [4]  ITU-T Recommendations Q.711 to Q.715, "Signalling System No.  7
        (SS7) - Signalling Connection Control Part (SCCP)"

   [5]  ANSI T1.112 "Signaling System Number 7 - Signaling Connection
        Control Part"

   [6]  ETSI ETS 300 009-1, "Integrated Services Digital Network (ISDN);
        Signalling System No.7; Signalling Connection Control Part
        (SCCP) (connectionless and connection-oriented class 2) to
        support international interconnection; Part 1: Protocol
        specification"

   [7]  ITU-T Recommendations Q.700 to Q.705, "Signalling System No.  7
        (SS7) - Message Transfer Part (MTP)"

   [8]  ANSI T1.111 "Signaling System Number 7 - Message Transfer Part"
   [9]  ETSI ETS 300 008-1, "Integrated Services Digital Network (ISDN);
        Signalling System No.7; Message Transfer Part (MTP) to support
        international interconnection; Part 1: Protocol specification"

   [10] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD
        63, RFC 3629, November 2003.

   [11] Loughney, J., Tuexen, M., and J.  Pastor-Balbas, "Security
        Considerations for Signaling Transport (SIGTRAN) Protocols", RFC
        3788, June 2004.

10.2. Informative References

okay so these are the bonus reading picks ๐Ÿ“š๐Ÿซถ the ones that aren't strictly required but give you the full backstory

[12] Ong, L., Rytina, I., Garcia, M., Schwarzbauer, H., Coene, L., Lin, H., Juhasz, I., Holdrege, M., and C. Sharp, "Framework Architecture for Signaling Transport", RFC 2719, October 1999. ๐Ÿงš

[13] ITU-T Recommendation Q.720, "Telephone User Part" ๐Ÿ“ž

[14] ITU-T Recommendations Q.771 to Q.775 "Signalling System No. 7 (SS7) - Transaction Capabilities (TCAP)" ๐Ÿ’œ

[15] ANSI T1.114 "Signaling System Number 7 - Transaction Capabilities Application Part" ๐ŸŒธ

[16] ETSI ETS 300 287-1, "Integrated Services Digital Network (ISDN); Signalling System No.7; Transaction Capabilities (TC) version 2; Part 1: Protocol specification" ๐ŸŽ€

[17] 3G TS 25.410 V4.0.0 (2001-04) "Technical Specification - 3rd Generation partnership Project; Technical Specification Group Radio Access Network; UTRAN Iu Interface: General Aspects and Principles" ๐Ÿ›ฐ๏ธ

[18] Stewart, R., Xie, Q., Morneault, K., Sharp, C., Schwarzbauer, H., Taylor, T., Rytina, I., Kalla, M., Zhang, L., and V. Paxson, "Stream Control Transmission Protocol", RFC 2960, October 2000. ๐Ÿฆ‹ this one is the SCTP foundation, iconic

[19] ITU-T Recommendation Q.2140 "B-ISDN ATM Adaptation Layer - Service Specific Coordination Function for signalling at the Network Node Interface (SSCF at NNI)" โœจ

[20] ITU-T Recommendation Q.2110 "B-ISDN ATM Adaptation Layer - Service Specific Connection Oriented Protocol (SSCOP)" ๐Ÿ’…

[21] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. ๐Ÿ”ฅ the one that explains all those capital words we keep seeing, periodt

[22] ITU-T Recommendation Q.2210 "Message Transfer Part Level 3 functions and messages using the services of ITU Recommendation Q.2140" ๐ŸŒˆ

[23] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 2434, October 1998. ๐Ÿ‘‘

[24] Morneault, K., Dantu, R., Sidebottom, G., Bidulock, B., and J. Heitz, "Signaling System 7 (SS7) Message Transfer Part 2 (MTP2) - User Adaptation Layer", RFC 3331, September 2002. ๐Ÿ“

[25] George, T., Bidulock, B., Dantu, R., Schwarzbauer, H., and K. Morneault, "Signaling System 7 (SS7) Message Transfer Part 2 (MTP2) - User Peer-to-Peer Adaptation Layer (M2PA)", RFC 4165, September 2005. โญ

[26] Telecommunication Technology Committee (TTC) Standard JT-Q704, "Message Transfer Part Signaling Network Functions", April 28, 1992. ๐Ÿซถ


Appendix A โœจ

A.1. Signalling Network Architecture

okay this part is the big picture, the vibe check for the whole network ๐ŸŒ๐Ÿ’–

A Signalling Gateway is used to support the transport of MTP3-User signalling traffic received from the SS7 network to multiple distributed ASPs (e.g., MGCs and IP Databases). Clearly, the M3UA protocol is not designed to meet the performance and reliability requirements for such transport by itself. However, the conjunction of distributed architecture and redundant networks provides support for reliable transport of signalling traffic over IP. The M3UA protocol is flexible enough to allow its operation and management in a variety of physical configurations, enabling Network Operators to meet their performance and reliability requirements. ๐ŸŽ€

To meet the stringent SS7 signalling reliability and performance requirements for carrier grade networks, Network Operators might require that no single point of failure is present in the end-to-end network architecture between an SS7 node and an IP-based application. This can typically be achieved through the use of redundant SGPs or SGs, redundant hosts, and the provision of redundant QOS-bounded IP network paths for SCTP Associations between SCTP End Points. Obviously, the reliability of the SG, the MGC, and other IP-based functional elements also needs to be taken into account. The distribution of ASPs and SGPs within the available Hosts MAY also be considered. As an example, for a particular Application Server, the related ASPs could be distributed over at least two Hosts. ๐Ÿงš

One example of a physical network architecture relevant to SS7 carrier grade operation in the IP network domain is shown in Figure A-1, below: ๐Ÿ‘€

       SGs                                     MGCs

Host#1 **************                          ************** Host#3
       *  ********__*__________________________*__********  *   =
       *  *SGP1.1*__*_____      _______________*__* ASP1 *  *  MGC1
       *  ********  *     \    /               *  ********  *
       *  ********__*______\__/________________*__********  *
       *  *SGP2.1*__*_______\/______      _____*__* ASP2 *  *
       *  ********  *       /\      |    |     *  ********  *
       *      :     *      /  \     |    |     *      :     *
       *  ********  *     /    \    |    |     *  ********  *
       *  * SGPn *  *     |    |    |    |     *  * ASPn *  *
       *  ********  *     |    |    |    |     *  ********  *
       **************     |    |    |    |     **************
                          |    |    \    /
Host#2 **************     |    |     \  /      ************** Host#4
       *  ********__*_____|    |______\/_______*__********  *   =
       *  *SGP1.2*__*_________________/\_______*__* ASP1 *  *  MGC2
       *  ********  *                /  \      *  ********  *
       *  ********__*_______________/    \_____*__********  *
       *  *SGP2.2*__*__________________________*__* ASP2 *  *
       *  ********  *                          *  ********  *
       *      :     *     SCTP Associations    *      :     *
       *  ********  *                          *  ********  *
       *  * SGPn *  *                          *  * ASPn *  *
       *  ********  *                          *  ********  *
       **************                          **************

SGP1.1 and SGP1.2 are part of SG1
SGP2.1 and SGP2.2 are part of SG2

                      Figure A-1 - Physical Model

In this model, each host may have many application processes. In the case of the MGC, an ASP may provide service to one or more Application Servers, and is identified as an SCTP end point. One or more Signalling Gateway Processes make up a single Signalling Gateway. ๐Ÿ’ซ

This example model can also be applied to IPSP-IPSP signalling. In this case, each IPSP may have its services distributed across 2 or more hosts, and may have multiple server processes on each host. ๐ŸŒธ

In the example above, each signalling process (SGP, ASP, or IPSP) is the end point to more than one SCTP association, leading to more than one other signalling processes. To support this, a signalling process must be able to support distribution of M3UA messages to many simultaneous active associations. This message distribution function is based on the status of provisioned Routing Keys, the status of the signalling routes to signalling points in the SS7 network, and the redundancy model (active-standby, load sharing, broadcast, n+k) of the remote signalling processes. ๐Ÿ”ฅ

For carrier grade networks, the failure or isolation of a particular signalling process should not cause stable calls or transactions to be lost. This implies that signalling processes need, in some cases, to share the call/transaction state or be able to pass the call state information between each other. In the case of ASPs performing call processing, coordination may also be required with the related Media Gateway to transfer the MGC control for a particular trunk termination. However, this sharing or communication of call/transaction state information is outside the scope of this document. ๐Ÿ™ˆ

This model serves as an example. M3UA imposes no restrictions as to the exact layout of the network elements, the message distribution algorithms, and the distribution of the signalling processes. Instead, it provides a framework and a set of messages that allow for a flexible and scalable signalling network architecture, aiming to provide reliability and performance. ๐ŸŒˆ

A.2. Redundancy Models

A.2.1. Application Server Redundancy

okay redundancy is where it gets spicy ๐ŸŒถ๏ธ๐Ÿ’…

At the SGP, an Application Server list contains active and inactive ASPs to support ASP broadcast, loadsharing, and failover procedures. The list of ASPs within a logical Application Server is kept updated in the SGP to reflect the active Application Server Process(es).

For example, in the network shown in Figure 1, all messages to DPC x could be sent to ASP1 in Host3 or ASP1 in Host4. The AS list at SGP1 in Host 1 might look like the following:

   Routing Key {DPC=x) - "Application Server #1"
      ASP1/Host3  - State = Active
      ASP1/Host4  - State = Inactive

In this "1+1" redundancy case, ASP1 in Host3 would be sent any incoming message with DPC=x. ASP1 in Host4 would normally be brought to the "active" state upon failure of, or loss of connectivity to, ASP1/Host1.

The AS List at SGP1 in Host1 might also be set up in loadshare mode:

   Routing Key {DPC=x) - "Application Server #1"
      ASP1/Host3 - State = Active
      ASP1/Host4 - State = Active

In this case, both the ASPs would be sent a portion of the traffic. For example, the two ASPs could together form a database, where incoming queries may be sent to any active ASP. ๐Ÿ“

Care might need to be exercised by a Network Operator in the selection of the routing information to be used as the Routing Key for a particular AS. ๐Ÿ‘€

In the process of failover, it is recommended that, in the case of ASPs supporting call processing, stable calls do not fail. It is possible that calls in "transition" may fail, although measures of communication between the ASPs involved can be used to mitigate this. ๐Ÿซถ

For example, the two ASPs may share call state via shared memory, or may use an ASP to ASP protocol to pass call state information. Any ASP-to-ASP protocol to support this function is outside the scope of this document. โœจ

A.2.2. Signalling Gateway Redundancy โœจ

okay so the Signalling Gateways can also be spread across multiple hosts ๐Ÿ–ฅ๏ธ๐Ÿ’– Just like the AS model, an SG can be made of one or more SG Processes (SGPs) spread over one or more hosts, and they can run as active/backup or as a loadsharing setup ๐Ÿ”ฅ. Now here's the tea: if an SGP loses all or part of its SS7 connectivity and there are other SGPs around, that SGP may terminate the SCTP associations to the ASPs it affects ๐Ÿ’…

So an ASP can totally route signalling messages headed for the SS7 network through more than one SGP ๐Ÿฆ‹ In this setup, a Signalling Gateway is a cluster of hosts that acts as one single SG ๐Ÿซถ There's a primary/backup option, where losing the SCTP association to the primary SGP can be used to reroute the affected traffic over to an alternate SGP ๐Ÿ”„ There's also loadsharing, where signalling messages get shared across multiple SGPs โš–๏ธ And a broadcast model is possible too, where signalling messages are sent to every active SGP in the SG ๐Ÿ“ก The way MTP3-user messages get spread across the SGPs should be done so that message missequencing is minimized, as the SS7 User Parts require ๐Ÿ™ˆ that's a must-have, bestie!

It may also be possible for an ASP to use more than one SG to reach a specific SS7 end point ๐Ÿงš It's kinda like an SS7 STP mated pair. SS7 STPs usually come in mated pairs with traffic loadshared between them, so this is giving familiar vibes ๐ŸŒธ Other models are possible too, but they're subject to the limits of the local SS7 network provisioning guidelines ๐Ÿ“‹

Now the important bit for the ASP's M3UA layer ๐Ÿ‘‘ A particular SG counts as capable of transferring traffic to a provisioned SS7 destination X when all of these are true:

  • an SCTP association with at least one SGP of the SG is established,
  • the SGP has returned an acknowledgement to the ASP indicating that the ASP is actively handling traffic for destination X,
  • the SGP has not indicated that destination X is inaccessible, and
  • the SGP has not indicated MTP Restart.

When an ASP is set up to use multiple SGPs for transferring traffic to the SS7 network, the ASP must keep track of the current capability of those SGPs to handle traffic to the destinations it cares about ๐Ÿง  This info is crucial for overall reliability of the service ๐Ÿ˜ญ It matters for active/backup, loadsharing, and broadcast models when things fail, recover, or go into maintenance. The ASP M3UA may also use this information for congestion avoidance purposes ๐ŸŒˆ And yep, the MTP3-user message distribution across the SGPs should again be done to minimize message missequencing, as the SS7 User Parts require ๐Ÿ’œ


Editors' Addresses ๐ŸŽ€

Ken Morneault
Cisco Systems Inc.
13615 Dulles Technology Drive
Herndon, VA, USA  20171

EMail: kmorneau@cisco.com


Javier Pastor-Balbas
Ericsson Espana S.A.
C/ Retama 1
28045 Madrid - Spain

EMail: j.javier.pastor@ericsson.com

Copyright (C) The Internet Society (2006).

This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.

This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.


Intellectual Property ๐Ÿ”ฅ

The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document, or the extent to which any license under such rights might or might not be available, and it doesn't represent that it has made any independent effort to identify any such rights. Info on the procedures for rights in RFC documents can be found in BCP 78 and BCP 79 ๐Ÿ“š

Copies of IPR disclosures made to the IETF Secretariat, any assurances of licenses to be made available, or the result of an attempt to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr ๐Ÿ’ป

The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology required to implement this standard. Please send that info to the IETF at ietf-ipr@ietf.org ๐Ÿ“ฌ


Acknowledgement ๐Ÿซถ

Funding for the RFC Editor function is provided by the IETF Administrative Support Activity (IASA). ๐Ÿ’–

๐Ÿ“ฆ where this page comes from