RFC 3868

Signalling Connection Control Part User Adaptation Layer (SUA)

📅 published October 2004, from ietf

Part 1 of 27 🎀

Signalling Connection Control Part User Adaptation Layer (SUA) 💖

okay bestie, this is RFC 3868 and it's giving main character energy 👑 Here's the header tea:

  • Network Working Group published it, so it's an official IETF doc 🌸
  • Authors: J. Loughney, Ed. (Nokia), G. Sidebottom (Signatus Technologies), L. Coene (Siemens n.v.), G. Verwimp (Siemens n.v.), J. Keller (Tekelec), and B. Bidulock (OpenSS7 Corporation) 🫶
  • Category: Standards Track ✨
  • Date: October 2004 📅
  • Obsoletes / Updates: the header doesn't list either one, so there's nothing to report here 🙈

Status of This Memo 📜

This document specifies an Internet standards track protocol for the Internet community, and it requests discussion and suggestions for improvements. For the standardization state and status of this protocol, check the current edition of the "Internet Official Protocol Standards" (STD 1). Distribution of this memo is unlimited 🦋

Copyright (C) The Internet Society (2004).

Abstract 💜

okay so this one is the big picture. It defines a protocol for the transport of any Signalling Connection Control Part-User signalling over IP using the Stream Control Transmission Protocol. The protocol is designed to be modular and symmetric, so it can work in diverse architectures, like a Signalling Gateway to IP Signalling Endpoint architecture as well as a peer-to-peer IP Signalling Endpoint architecture. It's so flexible, I'm obsessed 😭

Table of Contents 🗂️

1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
    1.1.  Scope. . . . . . . . . . . . . . . . . . . . . . . . . .  3
    1.2.  Abbreviations and Terminology. . . . . . . . . . . . . .  4
    1.3.  Signalling Transport Architecture. . . . . . . . . . . .  6
    1.4.  Services Provided by the SUA Layer . . . . . . . . . . .  9
    1.5.  Internal Functions Provided in the SUA Layer . . . . . . 11
    1.6.  Definition of SUA Boundaries . . . . . . . . . . . . . . 14
2.  Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.  Protocol Elements. . . . . . . . . . . . . . . . . . . . . . . 19
    3.1.  Common Message Header. . . . . . . . . . . . . . . . . . 20
    3.2.  SUA Connectionless Messages. . . . . . . . . . . . . . . 24
    3.3.  Connection Oriented Messages . . . . . . . . . . . . . . 27
    3.4.  Signalling Network Management (SNM) Messages . . . . . . 42
    3.5.  Application Server Process State Maintenance Messages. . 49
    3.6.  ASP Traffic Maintenance Messages . . . . . . . . . . . . 53
    3.7.  SUA Management Messages. . . . . . . . . . . . . . . . . 56
    3.8.  Routing Key Management (RKM) Messages. . . . . . . . . . 58
    3.9.  Common Parameters. . . . . . . . . . . . . . . . . . . . 61
    3.10. SUA-Specific parameters. . . . . . . . . . . . . . . . . 74
4.  Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . 92
    4.1.  Procedures to Support the SUA-User Layer . . . . . . . . 92
    4.2.  Receipt of Primitives from the Layer Management. . . . . 93
    4.3.  AS and ASP State Maintenance . . . . . . . . . . . . . . 95
    4.4.  Routing Key Management Procedures. . . . . . . . . . . .109
    4.5.  Availability and/or Congestion Status of SS7
          Destination Support101 . . . . . . . . . . . . . . . . .112
    4.6.  MTP3 Restart . . . . . . . . . . . . . . . . . . . . . .115
    4.7.  SCCP - SUA Interworking at the SG. . . . . . . . . . . .115
5.  Examples of SUA Procedures . . . . . . . . . . . . . . . . . .117
    5.1.  SG Architecture. . . . . . . . . . . . . . . . . . . . .117
    5.2   IPSP Examples. . . . . . . . . . . . . . . . . . . . . .119
6.  Security Considerations. . . . . . . . . . . . . . . . . . . .121
7.  IANA Considerations. . . . . . . . . . . . . . . . . . . . . .121
    7.1.  SCTP Payload Protocol ID . . . . . . . . . . . . . . . .121
    7.2.  Port Number. . . . . . . . . . . . . . . . . . . . . . .121
    7.3.  Protocol Extensions. . . . . . . . . . . . . . . . . . .121
8.  Timer Values . . . . . . . . . . . . . . . . . . . . . . . . .123
9.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . .123
10. References . . . . . . . . . . . . . . . . . . . . . . . . . .123
    10.1. Normative References . . . . . . . . . . . . . . . . . .123
    10.2. Informative References . . . . . . . . . . . . . . . . .124

Appendix A.  Signalling Network Architecture . . . . . . . . . . .125
    A.1.  Generalized Peer-to-Peer Network Architecture. . . . . .125
    A.2.  Signalling Gateway Network Architecture. . . . . . . . .126
    A.3.  Signalling Gateway Message Distribution
          Recommendations. . . . . . . . . . . . . . . . . . . . .128
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . .129
Full Copyright Statement . . . . . . . . . . . . . . . . . . . . .131

1. Introduction ✨

so, the big trend right now is switched circuit networks and IP networks getting together 💅 Network service providers are building IP-based signalling architectures that need support for SS7 and SS7-like signalling protocols. IP is a seriously effective way to carry user data, and it helps operators grow their networks and build new services 🚀 In these networks, there's a real need for interworking between the SS7 and IP domains [2719].

This document defines a protocol for transporting SS7 SCCP-User protocols [ANSI SCCP] [ITU SCCP], like TCAP and RANAP, over IP using the Stream Control Transmission Protocol (SCTP) [2960]. It's giving "one protocol to carry them all" 🧚

1.1. Scope

bestie, this section is the to-do list 📝 It details how SCCP-user messages get delivered over IP between two signalling endpoints. That's MAP and CAP over TCAP [ANSI TCAP] [ITU TCAP], RANAP [RANAP], and so on. It also considers transport from a signalling gateway to an IP signalling node (like an IP-resident Database), as described in the Framework Architecture for Signalling Transport [2719]. And the protocol can support SCCP-user messages between two endpoints that are both wholly inside an IP network 🌈

The delivery mechanism covers these criteria:

  • Support for transfer of SCCP-User Part messages 💌
  • Support for SCCP connectionless service.
  • Support for SCCP connection oriented service.
  • Support for the operation of SCCP-User protocol peers.
  • Support for the management of SCTP transport associations between signalling gateways and IP-based signalling nodes.
  • Support for distributed IP-based signalling nodes.
  • Support for the asynchronous reporting of status changes to management functions.

1.2. Abbreviations and Terminology 📚

1.2.1. Abbreviations

the acronym list, iykyk 🙈

  • CAP - CAMEL Application Protocol.
  • GTT - Global Title Translation.
  • MAP - Mobile Application Protocol.
  • PC - Signalling System no. 7 Point Code.
  • RANAP - Radio Access Network Application Protocol.
  • SCTP - Stream Control Transmission Protocol.
  • SS7 - Signalling System no. 7.
  • TCAP - Transaction Capabilities Application Protocol.

1.2.2. Terminology ✨

Signalling Gateway (SG) - okay so the SG is the network element that terminates switched circuit networks and carries SCCP-User signalling over IP to an IP signalling endpoint 🌐 It can be modelled as one or more Signalling Gateway Processes sitting right on the border of the SS7 and IP networks. When an SG has more than one SGP, the SG itself is a logical entity, and the SGPs are assumed to be coordinated into a single management view for the SS7 network and the Application Servers they support. Unified front, bestie 🫶

Application Server (AS) - a logical entity serving a specific Routing Key 💅 For example, a virtual IP database element handling all requests for an SCCP-user. The AS holds a set of one or more unique Application Server Processes, and one or more of them is normally actively processing traffic.

Application Server Process (ASP) - an ASP is the active or backup process of an Application Server, like a piece of a distributed signalling node or database element 🧚 Examples are MGCs, IP SCPs, or IP-based HLRs. Each ASP has an SCTP endpoint and may be set up to process traffic for more than one Application Server.

IP Server Process (IPSP) - a process instance of an IP-based application. It's basically the same as an ASP, except it uses SUA in a peer-to-peer way. Conceptually, an IPSP doesn't use the services of a Signalling Gateway 🦋

Signalling Gateway Process (SGP) - a process instance of a Signalling Gateway, acting as an active, load-sharing, or broadcast process of that SG 🌸

Signalling Process - a process instance that uses SUA to talk to other signalling processes. ASPs, SGPs, and IPSPs are all signalling processes, so they're all in the same friend group 👑

Association - an association is an SCTP association 🎀 It provides the transport for delivering SCCP-User protocol data units and SUA layer peer messages.

Routing Key - the Routing Key describes a set of SS7 parameters and/or parameter ranges that uniquely defines the range of signalling traffic set up to be handled by a particular Application Server ✨ For example, a Routing Key could be a particular SS7 SCCP SSN plus an identifier that uniquely marks the network the SSN belongs to, with all that traffic going to one Application Server. Routing Keys are mutually exclusive, which means a received SS7 signalling message cannot be directed to more than one Routing Key 🙅‍♀️ They can be provisioned by a MIB, or registered using SUA's dynamic registration procedures. Routing keys MUST NOT span multiple network appearances. No exceptions, periodt 💀

Routing Context - an Application Server Process can be set up to process traffic for more than one Application Server 🦄 In that case, the Routing Context parameter gets exchanged between the SGP and the ASP (or between two ASPs) to identify the relevant Application Server. From an SGP's or ASP's point of view, the Routing Context uniquely identifies the range of traffic for a particular Application Server that the ASP is set up to receive. There's a 1:1 relationship between a Routing Context value and a Routing Key within an AS, so you can think of the Routing Context as an index into an AS Table holding the AS Routing Keys 🗂️💖

Address Mapping Function (AMF) - the AMF is an implementation dependent function that's responsible for resolving the address in an incoming SCCP/SUA message to the correct SCTP association for the desired endpoint 🧭 The AMF MAY use routing context / routing key information as selection criteria for picking that SCTP association. It's giving "choose your path" energy 🛤️

Fail-over - the ability to reroute signalling traffic, as needed, to an alternate Application Server Process or group of ASPs inside an Application Server, if the ASP currently in use fails or becomes unavailable 😭 Fail-over may also apply when a previously unavailable ASP comes back into service. Ultimate safety net energy 🛟

Host - the computing platform that the SGP or ASP process is running on 💻

Layer Management - a nodal function that handles the inputs and outputs between the SUA layer and a local management entity 🎛️

Network Appearance - the Network Appearance is an SUA local reference (usually an integer) shared by the SG and the AS. Together with a Signalling Point Code, it uniquely identifies an SS7 node by showing which specific SS7 network that node belongs to 🌍

Network Byte Order - most significant byte first, also known as Big Endian 🍓

Stream - a stream is an SCTP stream: a one-way logical channel from one SCTP endpoint to another associated SCTP endpoint. Inside it, all user messages get delivered in sequence, except for the ones submitted to the unordered delivery service 🌈

Transport address - an address that works as a source or destination for the unreliable packet transport service that SCTP uses. In IP networks, a transport address is defined by the combo of an IP address and an SCTP port number. Heads up: only one SCTP port may be defined for each endpoint, but each SCTP endpoint can have multiple IP addresses 📍


1.3. Signalling Transport Architecture 🏗️

The framework architecture defined for switched circuit networks signalling transport over IP [2719] uses multiple components. There's an IP transport protocol, a signalling common transport protocol, and an adaptation module that supports the services a particular switched circuit networks signalling protocol expects from its underlying protocol layer 🧩

In general terms, the SUA architecture can be modelled as a peer-to-peer architecture 🤝 The first section looks at SS7-to-IP interworking architectures for connectionless and connection-oriented transport. For this case, it's assumed that the ASP starts setting up the SCTP association with the SG.

1.3.1. Protocol Architecture for Connectionless Transport 📦

In this architecture, the SCCP and SUA layers interface in the SG. Interworking between the SCCP and SUA layers is needed so user messages and management messages can both get transferred 💌

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

   +------+                                +------+
   | SUAP |                                | SUAP |
   +------+         +------+------+        +------+
   | SCCP |         | SCCP | SUA  |        | SUA  |
   +------+         +------+------+        +------+
   | MTP3 |         | MTP3 |      |        |      |
   +------+         +------+ SCTP |        | SCTP |
   | MTP2 |         | MTP2 |      |        |      |
   +------+         +------+------+        +------+
   |  L1  |         |  L1  |  IP  |        |  IP  |
   +------+         +------+------+        +------+
       |               |         |            |
       +---------------+         +------------+

     SUAP - SCCP/SUA User Protocol (TCAP, for example)
     STP  - SS7 Signalling Transfer Point

See Appendix A.3.1 for operation recommendations 📖

1.3.1.1. SG as endpoint 🎯

In this case, the connectionless SCCP messages get routed on point code (PC) and subsystem number (SSN). The subsystem identified by the SSN and Routing Context is regarded as local to the SG. So from the SS7 point of view, the SCCP-user is located at the SG 🫠

1.3.1.2. Signalling Gateway as relay-point 🔀

A Global Title translation is executed at the signalling gateway before the destination of the message can be figured out. The actual location of the SCCP-user doesn't matter to the SS7 network 🙈 GT Translation yields an "SCCP entity set", and from that an Application Server can be derived. Picking the Application Server depends on the SCCP called party address (and possibly other SS7 parameters, depending on the implementation) 🧠

1.3.2. Protocol Architecture for Connection-Oriented Transport 🔗

In this architecture, the SCCP and SUA layers share an interface in the signalling gateway process, which links the two connection sections needed for connection-oriented data transfer between the SEP and the ASP 💞 Both connection sections get set up when the Connect Request messages are routed from the signalling end point, through the signalling gateway process, to the ASP, and vice versa. Routing the Connect Request message works the same way as described in 1.3.1 ✅

   ********   SS7   ***************   IP   ********
   * SEP/ *---------*      SG     *--------* ASP  *
   * STP  *         *             *        *      *
   ********         ***************        ********

   +------+                                +------+
   | SUAP |                                | SUAP |
   +------+         +------+------+        +------+
   | SCCP |         | SCCP | SUA  |        | SUA  |
   +------+         +------+------+        +------+
   | MTP3 |         | MTP3 |      |        |      |
   +------|         +------+ SCTP |        | SCTP |
   | MTP2 |         | MTP2 |      |        |      |
   +------+         +------+------+        +------+
   |  L1  |         |  L1  |  IP  |        |  IP  |
   +------+         +------+------+        +------+
       |               |         |            |
       +---------------+         +------------+

     SUAP - SCCP/SUA Application Protocol (e.g., - RANAP/RNSAP)
     STP  - SS7 Signalling Transfer Point

See Appendix A.3.2 for operation recommendations 📚

1.3.3. All IP Architecture 🌐💫

This architecture can carry a protocol that uses the transport services of SCCP inside an IP network. That gives you a lot of flexibility when building networks, especially when there's no need for interaction with legacy signalling 🥰 The architecture removes the need for signalling gateway functionality, which is so freeing 🕊️

   ********   IP   ********
   * IPSP *--------* IPSP *
   ********        ********

   +------+        +------+
   | SUAP |        | SUAP |
   +------+        +------+
   | SUA  |        | SUA  |
   +------+        +------+
   | SCTP |        | SCTP |
   +------+        +------+
   |  IP  |        |  IP  |
   +------+        +------+
      |                |
      +----------------+

   SUAP - SCCP/SUA Application Protocol (e.g., - RANAP/RNSAP)

1.3.4. ASP Fail-over Model and Terminology 🛟

The SUA protocol supports ASP fail-over functions, which keep transaction processing capability highly available 💪

An Application Server can be thought of as a list of all the ASPs configured or registered to handle SCCP-user messages within a certain range of routing information, which is known as a Routing Key 📋 One or more ASPs on the list may normally be active and handling traffic, while others stay inactive but ready to step in if the active ASP(s) fail or become unavailable 🦸‍♀️

For operation recommendations, see Appendix A ✨

1.4. Services Provided by the SUA Layer 🎁

1.4.1. Support for the transport of SCCP-User Messages 📨

The SUA supports the transfer of SCCP-user messages 💜 The SUA layer at the signalling gateway and at the ASP supports the seamless transport of user messages between the signalling gateway and the ASP. Literally the whole point, slay 👑

1.4.2. SCCP Protocol Class Support 💖

Okay bestie, depending on which SCCP-users you're running, SUA handles all 4 SCCP protocol classes transparently 💅 Here's the breakdown:

  • Protocol class 0 gives you unordered transfer of SCCP-user messages in a connectionless way 🌸
  • Protocol class 1 lets the SCCP-user pick sequenced delivery, still connectionless 🦋
  • Protocol class 2 does two-way transfer by setting up a temporary or permanent signalling connection 🔥
  • Protocol class 3 has everything class 2 does, plus flow control 💜 It also detects message loss or mis-sequencing 👀

Classes 0 and 1 together make up the SCCP connectionless service ✨ Classes 2 and 3 together make up the connection-oriented service 🫶

1.4.3. Native Management Functions 🎀

SUA can flag errors tied to its own SUA-protocol messages, and it can notify local management and the remote peer whenever that's necessary 💌

1.4.4. Interworking with SCCP Network Management Functions 🧚

SUA reuses the existing ASP management messages for ASP status handling 🙌 For SCCP management, the DUNA, DAVA, DAUD, DRST, DUPU or SCON messages (defined in section 3) get sent to the right ASPs whenever an SSP, SSA, SST or SSC (defined by SCCP) comes in. See also chapter 1.4.5 ✨ The primitives below get passed between the SCCP and SUA management functions in the SG, and they're what kick off events in the IP and SS7 domains 🔥

Generic   |Specific   |
Name      |Name       |ANSI/ITU Reference
----------+-----------+---------------------------------------------
N-State   |Request    |ITU-Q.711   Chap 6.3.2.3.2 (Tab 16/Q.711)
          |Indication |ANSI-T1.112 Chap 2.3.2.3.2 (Tab 8E/T1.112.1)
----------+-----------+---------------------------------------------
N-PCstate |Indication |ITU-Q.711   Chap 6.3.2.3.3 (Tab 1/Q.711)
          |           |ANSI-T1.112 Chap 2.3.2.3.4 (Tab 8G/T1.112.1)
----------+-----------+---------------------------------------------
N-Coord   |Request    |ITU-Q.711   Chap 6.3.2.3.1 (Tab 15/Q.711)
          |Indication |ANSI-T1.112 Chap 2.3.2.3.3 (Tab 8F/T1.112.1)
          |Response   |
          |Confirm    |

1.4.5. Support for the management between the SGP and ASP. 🌈

The SUA layer does the interworking with SCCP management functions at the SG, so switched circuit networks and the IP network can work together 🤝 It should:

  • Give the SCCP-user at an ASP a heads-up when an SS7 endpoint/peer is unreachable 😭
  • Give the SCCP-user at an ASP a heads-up when an SS7 endpoint/peer is reachable again 🥳
  • Pass congestion indication along to the SCCP-user at an ASP 🚨
  • Kick off an audit of SS7 endpoints at the SG 🔍

1.4.6. Relay function 🦋

For scalability, SUA may get a relay functionality that works out the next hop SCTP association toward the destination SUA endpoint 🧭

That next hop may be based on Global Title information (e.g., E.164 number), kind of like SCCP GTT in SS7 networks, which is modeled in [ITU-T Q.714]. It may also be based on Hostname information, IP address or pointcode in the called party address 💅

This gives you greater scalability, reliability and flexibility in wide-scale deployments of SUA 👑 Using a relay function is a deployment decision, so you get to choose 💜

1.5. Internal Functions Provided in the SUA Layer 🎀

To do its addressing and relaying, SUA uses an Address Mapping Function (AMF) 🗺️ The AMF counts as part of SUA, but how it's realized is left up to implementation and deployment (local tables, DNS [3761], LDAP, etc.) 🤷‍♀️

The AMF gets invoked when a message comes in at the incoming interface ✨ Its job is to resolve the address in the incoming SCCP/SUA message to SCTP associations for destinations in the IP network 🌐 It picks the right SCTP association based on the routing context or routing key information it has. The destination might be the end SUA node or a SUA relay node 🦋 Routing Keys point to an Application Server, and that AS can have one or more ASPs handling its traffic. The availability and status of those ASPs come through SUA ASP management messages 📬

SS7 address and routing info that can make up a Routing Key entry includes things like OPC, DPC, SIO (found in the MTP3 routing label), SCCP subsystem number, or Transaction ID 🧩 IP addresses and hostnames can also be used as Routing Key Information 💖

Routing keys are expected to be provisioned via a MIB, dynamic registration, or an external process, such as a database 🗄️

1.5.1. Address Mapping at the SG 🌸

Normally, one or more ASPs are active in the AS (aka currently processing traffic), but in certain failure and transition cases there may not be an active ASP available 😬 In that case the SGP buffers the message destined for this AS for a time T(r), or until an ASP becomes available. If no ASP shows up before T(r) expires, the SGP flushes the buffered messages and starts the appropriate return or refusal procedures 🏃‍♀️

If there's no address mapping match for an incoming message, a default treatment MAY be specified 🎯 Possible solutions are to point all unallocated traffic at a default Application Server, sending it to a (set of) default ASP(s), or to drop the messages and notify management. How unallocated traffic gets treated is implementation dependent 🛠️

1.5.2. Address Mapping at the ASP ✨

To send messages toward the SS7 network, the ASP MAY do an address mapping to choose the proper SGP for a given message 🧭 It does this by looking at the Destination Point Code and other elements of the outgoing message, SS7 network status, SGP availability, and the Routing Context configuration tables 📋

A Signalling Gateway may be made up of one or more SGPs 🧱 But there's no SUA messaging to manage the status of an SGP, so whenever an SCTP association to an SGP exists, it's assumed to be available 🫶 Also, every SGP of one SG talking to one ASP about one AS gives identical SS7 connectivity to that ASP 🪞

An ASP routes responses back to the SGP it received messages from, within the routing context it's currently active in and receiving traffic on 💌

1.5.3. Address Mapping Function at a Relay Node 💅

The relay function gets invoked when:

  • Routing is on Global Title
  • Routing is on Hostname
  • Routing is on SSN and PC, or SSN and IP Address, and the address presented is not the one of the relay node

Translating or resolving the address info above gives you one of these:

  • Route on SSN: SCTP association ID toward the destination node, SSN and optionally Routing Context and/or IP address
  • Route on GT: SCTP association ID toward the next relay node, (new) GT and optionally SSN and/or Routing Context
  • Routing on Hostname: SCTP association ID toward the next relay node, (new) Hostname and optionally SSN and/or Routing Context
  • A local SUA-user (combined relay/end node)

To prevent looping, an SS7 hop counter is used 🔁 The originating end node (be it an SS7 or an IP node) sets the SS7 hop counter to the maximum value, which is 15 or less. Each time the relay function is invoked within an intermediate (relay) node, the SS7 hop counter gets decremented ⬇️ When it reaches zero, the return or refusal procedures are invoked with reason "Hop counter violation" 🚫

1.5.4. SCTP Stream Mapping 🧚

SUA supports SCTP streams 🌊 Signalling Gateway SG and Application Servers need to keep a list of SCTP and SUA-users for mapping purposes. SCCP-users that need sequenced message transfer need to be sent over a stream with sequenced delivery 📶

SUA uses stream 0 for SUA management messages 🎀 It is OPTIONAL that sequenced delivery be used to preserve the order of management message delivery 🙈

Stream selection based on protocol class:

  • Protocol class 0: SUA MAY select unordered delivery. The stream selected is based on traffic information available to the SGP or ASP 🌸
  • Protocol class 1: SUA MUST select ordered delivery. The stream selected is based upon the sequence parameter given by the upper layer over the primitive interface, plus other traffic information available to the SGP or ASP 🦋
  • Protocol classes 2 and 3: SUA MUST select ordered delivery. The stream selected is based upon the source local reference of the connection, plus other traffic information available to the SGP or ASP 🔥

1.5.5. Flow Control 🌈

Local Management at an ASP may want to stop traffic across an SCTP association, either to temporarily remove the association from service or to do testing and maintenance activity 🛑 The function could optionally be used to control the start of traffic onto a newly available SCTP association 🟢

1.5.6. Congestion Management 🔥

The SUA layer is told about local and IP network congestion through an implementation-dependent function (e.g., an implementation-dependent indication from the SCTP of IP network congestion) 🚦

At an ASP or IPSP, the SUA layer tells local SCCP-Users about congestion using an appropriate SCCP primitive (e.g., N-INFORM, N-NOTICE), as per current SCCP procedures, so upper layers can respond 📣 When an SG figures out that transport of SS7 messages is hitting congestion, the SG MAY trigger SS7 SCCP Congestion messages to originating SS7 nodes, following the congestion procedures of the relevant SCCP standard. Triggering SS7 SCCP Management messages from an SG is an implementation-dependent function 🛠️

The SUA layer at an ASP or IPSP MAY indicate local congestion to a SUA peer with an SCON message 🙋‍♀️ When an SG receives a congestion message (SCON) from an ASP, and the SG determines that an endpoint is now encountering congestion, it MAY trigger the congestion procedures of the relevant SCCP standard 💜

1.6. Definition of SUA Boundaries 🦋

1.6.1. Definition of the upper boundary

Okay so this is where SUA meets the SCCP-user 💅 Here are the primitives that go back and forth between them. The ITU and ANSI section references are right there too, so you can look up the full parameter details if you want to go deep 🧚

Generic     |Specific  |
Name        |Name      |ANSI/ITU Reference
------------+----------+-------------------------------------------
N-CONNECT   |Request   |ITU-Q.711   Chap 6.1.1.2.2 (Tab 2/Q.711)
            |Indication|ANSI-T1.112 Chap 2.1.1.2.2 (Tab 2/T1.112.1)
            |Response  |
            |Confirm   |
------------+----------+-------------------------------------------
N-DATA      |Request   |ITU-Q.711   Chap 6.1.1.2.3 (Tab 3/Q.711)
            |Indication|ANSI-T1.112 Chap 2.1.1.2.3 (Tab 3/T1.112.1)

------------+----------+-------------------------------------------
N-EXPEDITED |Request   |ITU-Q.711   Chap 6.1.1.2.3 (Tab 4/Q.711)
DATA        |Indication|ANSI-T1.112 Chap 2.1.1.2.3 (Tab 4/T1.112.1)
------------+----------+-------------------------------------------
N-RESET     |Request   |ITU-Q.711   Chap 6.1.1.2.3 (Tab 5/Q.711)
            |Indication|ANSI-T1.112 Chap 2.1.1.2.3 (Tab 5/T1.112.1)
            |Response  |
            |Confirm   |
------------+----------+-------------------------------------------
N-DISCONNECT|Request   |ITU-Q.711   Chap 6.1.1.2.4 (Tab 6/Q.711)
            |Indication|ANSI-T1.112 Chap 2.1.1.2.4 (Tab 6/T1.112.1)
------------+----------+-------------------------------------------
N-INFORM    |Request   |ITU-Q.711   Chap 6.1.1.3.2 (Tab 8/Q.711)
            |Indication|ANSI-T1.112 Chap 2.1.1.2.5 (Tab 6A/T1.112.1)
------------+----------+-------------------------------------------
N-UNITDATA  |Request   |ITU-Q.711   Chap 6.2.2.3.1 (Tab 12/Q.711)
            |Indication|ANSI-T1.112 Chap 2.2.2.3.1 (Tab 8A/T1.112.1)
------------+----------+-------------------------------------------
N-NOTICE    |Indication|ITU-Q.711   Chap 6.2.2.3.2 (Tab 13/Q.711)
            |          |ANSI-T1.112 Chap 2.2.2.3.2 (Tab 8B/T1.112.1)
------------+----------+--------------------------------------------
N-STATE     |Request   |ITU-Q.711   Chap 6.3.2.3.2 (Tab 16/Q.711)
            |Indication|ANSI-T1.112 Chap 2.3.2.3.2 (Tab 8E/T1.112.1)
------------+----------+--------------------------------------------
N-PCSTATE   |Indication|ITU-Q.711   Chap 6.3.2.3.3 (Tab 17/Q.711)
            |          |ANSI-T1.112 Chap 2.3.2.3.4 (Tab 8G/T1.112.1)
------------+----------+--------------------------------------------
N-COORD     |Request   |ITU-Q.711   Chap 6.3.2.3.1 (Tab 15/Q.711)
            |Indication|ANSI-T1.112 Chap 2.3.2.3.3 (Tab 8F/T1.112.1)
            |Response  |
            |Confirm   |

1.6.2. Definition of the lower boundary

On the bottom side, the upper layer primitives that SCTP gives us are described over in [SCTP] 🫶

1.6.3. Definition of the Boundary between SUA and Layer Management

This is the bit where SUA chats with Layer Management (LM) 🌸 Every primitive gets a direction and a purpose, so you always know who's asking and who's answering.

  • M-SCTP_ESTABLISH request
    • Direction: LM -> SUA
    • Purpose: LM asks the ASP to set up an SCTP association with its peer.
  • M-SCTP_ESTABLISH confirm
    • Direction: SUA -> LM
    • Purpose: the ASP confirms to LM that it has set up an SCTP association with its peer.
  • M-SCTP_ESTABLISH indication
    • Direction: SUA -> LM
    • Purpose: SUA lets LM know that a remote ASP has set up an SCTP association.
  • M-SCTP_RELEASE request
    • Direction: LM -> SUA
    • Purpose: LM asks the ASP to release an SCTP association with its peer.
  • M-SCTP_RELEASE confirm
    • Direction: SUA -> LM
    • Purpose: the ASP confirms to LM that it has released the SCTP association with its peer.
  • M-SCTP_RELEASE indication
    • Direction: SUA -> LM
    • Purpose: SUA lets LM know that a remote ASP has released an SCTP association, or that the SCTP association has failed.
  • M-SCTP RESTART indication
    • Direction: SUA -> LM
    • Purpose: SUA lets LM know that an SCTP restart indication has been received.
  • M-SCTP_STATUS request
    • Direction: LM -> SUA
    • Purpose: LM asks SUA to report the status of an SCTP association.
  • M-SCTP_STATUS confirm
    • Direction: SUA -> LM
    • Purpose: SUA responds with the status of an SCTP association.
  • M-SCTP STATUS indication
    • Direction: SUA -> LM
    • Purpose: SUA reports the status of an SCTP association.
  • M-ASP_STATUS request
    • Direction: LM -> SUA
    • Purpose: LM asks SUA to report the status of a local or remote ASP.
  • M-ASP_STATUS confirm
    • Direction: SUA -> LM
    • Purpose: SUA reports the status of a local or remote ASP.
  • M-AS_STATUS request
    • Direction: LM -> SUA
    • Purpose: LM asks SUA to report the status of an AS.
  • M-AS_STATUS confirm
    • Direction: SUA -> LM
    • Purpose: SUA reports the status of an AS.
  • M-NOTIFY indication
    • Direction: SUA -> LM
    • Purpose: SUA reports that it has received a Notify message from its peer.
  • M-ERROR indication
    • Direction: SUA -> LM
    • Purpose: SUA 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 -> SUA
    • Purpose: LM asks the ASP to start its operation and send an ASP Up message to its peer.
  • M-ASP_UP confirm
    • Direction: SUA -> LM
    • Purpose: the ASP reports that it has received an ASP UP Ack message from its peer.
  • M-ASP_UP indication
    • Direction: SUA -> LM
    • Purpose: SUA reports that it has successfully processed an incoming ASP Up message from its peer.
  • M-ASP_DOWN request
    • Direction: LM -> SUA
    • Purpose: LM asks the ASP to stop its operation and send an ASP Down message to its peer.
  • M-ASP_DOWN confirm
    • Direction: SUA -> LM
    • Purpose: the ASP reports that it has received an ASP Down Ack message from its peer.
  • M-ASP_DOWN indication
    • Direction: SUA -> LM
    • Purpose: SUA reports that it has successfully processed an incoming ASP Down message from its peer, or that the SCTP association has been lost or reset.
  • M-ASP_ACTIVE request
    • Direction: LM -> SUA
    • Purpose: LM asks the ASP to send an ASP Active message to its peer.
  • M-ASP_ACTIVE confirm
    • Direction: SUA -> LM
    • Purpose: the ASP reports that it has received an ASP Active Ack message from its peer.
  • M-ASP_ACTIVE indication
    • Direction: SUA -> LM
    • Purpose: SUA reports that it has successfully processed an incoming ASP Active message from its peer.
  • M-ASP_INACTIVE request
    • Direction: LM -> SUA
    • Purpose: LM asks the ASP to send an ASP Inactive message to its peer.
  • M-ASP_INACTIVE confirm
    • Direction: LM -> SUA
    • Purpose: the ASP reports that it has received an ASP Inactive Ack message from its peer.
  • M-ASP_INACTIVE indication
    • Direction: SUA -> LM
    • Purpose: SUA reports that it has successfully processed an incoming ASP Inactive message from its peer.
  • M-AS_ACTIVE indication
    • Direction: SUA -> LM
    • Purpose: SUA reports that an AS has moved to the AS-ACTIVE state.
  • M-AS_INACTIVE indication
    • Direction: SUA -> LM
    • Purpose: SUA reports that an AS has moved to the AS-INACTIVE state.
  • M-AS_DOWN indication
    • Direction: SUA -> LM
    • Purpose: SUA reports that an AS has moved to the AS-DOWN state.
If the SUA layer supports dynamic registration of Routing Key, the layer MAY support the following additional primitives 🔥
  • M-RK_REG request
    • Direction: LM -> SUA
    • Purpose: LM asks the ASP to register RK(s) with its peer by sending a REG REQ message.
  • M-RK_REG confirm
    • Direction: SUA -> LM
    • Purpose: the ASP reports that it has received a REG RSP message from its peer with registration status successful.
  • M-RK_REG indication
    • Direction: SUA -> LM
    • Purpose: SUA lets LM know that it has successfully processed an incoming REG REQ message.
  • M-RK_DEREG request
    • Direction: LM -> SUA
    • Purpose: LM asks the ASP to deregister RK(s) with its peer by sending a DEREG REQ message.
  • M-RK_DEREG confirm
    • Direction: SUA -> LM
    • Purpose: the ASP reports that it has received a DEREG RESP message from its peer with deregistration status successful.
  • M-RK_DEREG indication
    • Direction: SUA -> LM
    • Purpose: SUA lets LM know that it has successfully processed an incoming DEREG REQ from its peer.

2. Conventions 📝

Here's the key-word squad: MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, NOT RECOMMENDED, MAY, and OPTIONAL. When they show up in this doc, they're meant exactly the way BCP 14 and RFC 2119 [2119] describe them 💜

3. Protocol Elements 🎀

The general message format is a Common Message Header, followed by a list of zero or more parameters defined by the Message Type. Simple enough, right? 💅

For forward compatibility, all Message Types may have attached parameters, even if none are specified in this version. Future-proofing is everything bestie ✨

The Reserved field is set to 0 in messages that get sent, and it is not to be examined in messages that get received. Don't go poking at it 🙈

3.1. Common Message Header

Okay this is the header that every SCCP-User Adaptation Protocol message needs 🦋 It holds a version, a message class, a message type, a message length, and the message contents. It's shared across all signalling protocol adaptation layers:

   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                         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                         Message Data                          |

One big thing to remember: the 'data' portion of SUA messages SHALL contain SCCP-User data, not the encapsulated SCCP message. Yes, that's the whole plot twist 😭

Optional parameters can only occur at most once in an SUA message. One and done, no repeats 💀

3.1.1. SUA Protocol Version

The version field (ver) tells you which version of the SUA adaptation layer you're dealing with. Right now, the only supported version is:

   1   SUA version 1.0

3.1.2. Message Classes

Here's the full list of message classes, and yes it's giving organized 🌈

Message Classes

   0         SUA Management (MGMT) Message
   1         Reserved
   2         Signalling Network Management (SNM) Messages
   3         ASP State Maintenance (ASPSM) Messages
   4         ASP Traffic Maintenance (ASPTM) Messages
   5         Reserved
   6         Reserved
   7         Connectionless Messages
   8         Connection-Oriented Messages
   9         Routing Key Management (RKM) Messages.
   10 - 127  Reserved by the IETF
   128 - 255 Reserved for IETF-Defined Message Class Extensions

3.1.3. Message Types ✨

okay so the message types are basically the menu of everything SUA can say, sorted into classes 💅 each class has its own list, and the numbers are what actually go on the wire. the ranges matter too: some numbers are reserved for the IETF, and some are set aside for IETF-defined extensions 🦋

SUA Management Messages

   0         Error (ERR)
   1         Notify (NTFY)
   2 - 127   Reserved by the IETF
   128- 255  Reserved for IETF-Defined Message Class Extensions

Signalling Network Management (SNM) Messages

   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 - 127   Reserved by the IETF
   128 - 255 Reserved for IETF-Defined Message Class Extensions

Application Server Process State Maintenance (ASPSM) Messages

   0         Reserved
   1         ASP Up (UP)
   2         ASP Down (DOWN)
   3         Heartbeat (BEAT)
   4         ASP Up Ack (UP ACK)
   5         ASP Down Ack (DOWN ACK)
   6         Heartbeat Ack (BEAT ACK)
   7 - 127   Reserved by the IETF
   128 - 255 Reserved for IETF-Defined Message Class Extensions

ASP Traffic Maintenance (ASPTM) Messages

   0         Reserved
   1         ASP Active (ACTIVE)
   2         ASP Inactive (INACTIVE)
   3         ASP Active Ack (ACTIVE ACK)
   4         ASP Inactive Ack (INACTIVE ACK)
   5 - 127   Reserved by the IETF
   128 - 255 Reserved for IETF-Defined Message Class Extensions

Routing Key Management (RKM) Messages

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

Connectionless (CL) Messages

   0         Reserved
   1         Connectionless Data Transfer (CLDT)
   2         Connectionless Data Response (CLDR)
   3 - 127   Reserved by the IETF
   128 - 255 Reserved for IETF-Defined Message Class Extensions

Connection-Oriented (CO) Messages

   0         Reserved
   1         Connection Request (CORE)
   2         Connection Acknowledge (COAK)
   3         Connection Refused (COREF)
   4         Release Request (RELRE)
   5         Release Complete (RELCO)
   6         Reset Confirm (RESCO)
   7         Reset Request (RESRE)
   8         Connection Oriented Data Transfer (CODT)
   9         Connection Oriented Data Acknowledge (CODA)
   10        Connection Oriented Error (COERR)
   11        Inactivity Test (COIT)
   12 - 127  Reserved by the IETF
   128 - 255 Reserved for IETF-Defined Message Class Extensions

3.1.4. Message Length 💖

the Message Length tells you how long the whole message is in octets 🧚 that counts the header AND every padding byte, so nothing sneaks past the count. it's a 32-bit identifier, so it's a big enough field to hold the length 🌸

3.1.5. Tag-Length-Value Format 🎀

okay this part is the real vibe. every SUA message starts with a Common Header, then has zero or more parameters, and what parameters you get depends on the message type ✨ each parameter is packed in a Tag-Length-Value (TLV) format, so the receiver can read the tag, check the length, and then grab the value 💅

    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                         /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

the Parameter Tag is 16 bits, an unsigned integer 🦋 it's the type of the parameter, and it can be anything from 0 to 65535.

the Parameter Length is also 16 bits, unsigned 🍓 it's the size of the parameter in bytes, and it counts the Tag, the Length, AND the Value. it does not count padding. the one plot twist: composite parameters DO include all their padding, because every parameter inside a composite is treated as a multiple of 4 bytes 👑

the Parameter Value is variable-length 🌈 it's where the actual info lives.

here's the important bit 👇 the total length of a parameter (Tag, Length and Value together) MUST be a multiple of 4 bytes. if it isn't, the sender pads the end (after the Value) with all zero bytes. the padding isn't counted in the length field, and a sender SHOULD NOT pad with more than 3 bytes. the receiver MUST ignore the padding bytes 😭

the padding is not counted in the Parameter Length, so don't accidentally add it in when you're reading the length.

Implementation note: TLV technically lets parameters show up in any random order 🙈 but there are some guidelines that make processing way easier, so they're worth keeping in mind:

  • Parameters needed to correctly process other message parameters preferably should precede these parameters (such as Routing Context).
  • Mandatory parameters preferably SHOULD precede any optional parameters.
  • The data parameter will normally be the final one in the message.
  • The receiver SHOULD accept parameters in any order, except where explicitly mandated.

3.2. SUA Connectionless Messages 🦋

this section covers the SUA Connectionless transfer messages and what their parameters hold ✨ every message follows the same general format: a Common Message Header, plus a list of zero or more parameters defined by the Message Type. and yes, every Message Type is allowed to have parameters attached 💅

3.2.1. Connectionless Data Transfer (CLDT) 💌

this one is the main connectionless delivery message, and it's how data moves from one SUA to another 🚀

    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 = 0x0115          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         Protocol Class                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0102          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                        Source Address                         /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0103          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                     Destination Address                       /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0116         |             Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Sequence Control                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0101          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         SS7 Hop Count                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0113          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          Importance                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0114          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      Message Priority                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0013          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         Correlation ID                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0117          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          Segmentation                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x010B          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                             Data                              /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

the CLDT parameters are pretty clear-cut 🌷 here's the lineup, with the required ones marked:

Parameters
  Routing Context               Mandatory
  Protocol Class                Mandatory
  Source Address                Mandatory
  Destination Address           Mandatory
  Sequence Control              Mandatory
  SS7 Hop Count                 Optional
  Importance                    Optional
  Message Priority              Optional
  Correlation ID                Optional
  Segmentation                  Optional
  Data                          Mandatory

Implementation note: this message covers the following SCCP messages: unitdata (UDT), extended unitdata (XUDT), and long unitdata (LUDT) 🫶

3.2.2. Connectionless Data Response (CLDR) 💌

okay so this one is the peer's little reply 🫶 It's sent back to report errors in a CLDT it received, but only when the return on error option is set. ✨

    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 = 0x0106          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           SCCP Cause                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0102          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                        Source Address                         /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0103          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                     Destination Address                       /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0101          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         SS7 Hop Count                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0113          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          Importance                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0114          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      Message Priority                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0013          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         Correlation ID                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0117          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          Segmentation                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x010b          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   /                             Data                              /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   Parameters
     Routing Context               Mandatory
     SCCP Cause                    Mandatory
     Source Address                Mandatory
     Destination Address           Mandatory
     SS7 Hop Count                 Optional
     Importance                    Optional
     Message Priority              Optional
     Correlation ID                Optional
     Segmentation                  Optional
     Data                          Optional

Implementation note: This message covers the following SCCP messages: unitdata service (UDTS), extended unitdata service (XUDTS) and long unitdata service (LUDTS). 🧚


3.3. Connection Oriented Messages 🎀

3.3.1. Connection Oriented Data Transfer (CODT) 🦋

this one is the connection-oriented data mover 💅 It transfers data from one SUA to another for connection-oriented service.

    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 = 0x0107          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Sequence Number                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0105          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                 Destination Reference Number                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0114          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      Message Priority                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0013          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Correlation ID                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x010b          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                             Data                              /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Parameters
     Routing Context               Mandatory
     Sequence Number               Optional *1
     Destination Reference Number  Mandatory
     Message Priority              Optional
     Correlation ID                Optional
     Data                          Mandatory

   NOTE *1:   This parameter is not present in case of Expedited Data
              (ED).

   Implementation note: For the CODT to represent DT1, DT2 and ED
   messages, the following conditions MUST be met:

   DT1 is represented by a CODT when:
     Sequence Number parameter is present (contains "more" indicator).

   DT2 is represented by a CODT when:
     Sequence Number parameter is present (contains P(S), P(R) and more
     indicator)

   ED is represented by a CODT with:
     Sequence Number parameter is not present

3.3.2. Connection Oriented Data Acknowledge (CODA) 🌸

the peer uses this one to say "yep, got your data" 🫶 It's only used with protocol class 3. ✨

    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 = 0x0105          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                 Destination Reference Number                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0108          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   Receive Sequence Number                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x010A          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                            Credit                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Parameters
     Routing Context               Mandatory
     Destination Reference Number  Mandatory
     Receive Sequence Number       Optional *1
     Credit                        Mandatory *1

   NOTE *1:    Mandatory when representing Data Acknowledgement (AK).

   Implementation note: For the CODA to represent DA and EA messages,
   the following conditions MUST be met:

   DA is represented by a CODA when:
     Receive Sequence Number parameter is present (contains P(S), P(R)
     and more indicator)

   EA is represented by a CODA when:
     Receive Sequence Number parameter is not present

3.3.3. Connection Request (CORE) 🎀

okay so this is the message that kicks off a signalling connection between two peer endpoints. it's giving "hi, can we talk?" energy 💖

  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 = 0x0115          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         Protocol Class                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0104          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                   Source Reference Number                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0103          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/                     Destination Address                       /
\                                                               \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0116          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Sequence Control                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0107          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Sequence Number                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0102          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/                        Source Address                         /
\                                                               \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0101          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         SS7 Hop Count                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0113          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Importance                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0114          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Message Priority                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x010A          |           Length              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            Credit                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x010b          |           Length              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/                             Data                              /
\                                                               \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

the parameter list is where it gets spicy 🧚 here's who's mandatory, who's optional, and the notes that go with them:

Parameters
  Routing Context               Mandatory
  Protocol Class                Mandatory
  Source Reference Number       Mandatory
  Destination Address           Mandatory
  Sequence Control              Mandatory
  Sequence Number               Optional *1
  Source Address                Optional
  SS7 Hop Count                 Optional
  Importance                    Optional
  Message Priority              Optional
  Credit                        Optional *1
  Data                          Optional

NOTE *1:    Mandatory for protocol class 3 only.

ngl the *1 notes are the real tea 🫖 Sequence Number and Credit only matter for protocol class 3, so they're the ones to watch.

Implementation note: this message covers the SCCP message Connection Request (CR) 🌸

3.3.4. Connection Acknowledge (COAK) 🦋

this one is the reply! it's used to acknowledge a connection request from the peer endpoint, so it's basically the "yes, let's talk" text back 🫶

 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 = 0x0115          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         Protocol Class                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0105          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Destination Reference Number                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0104          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                   Source Reference Number                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x01116          |            Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Sequence Control                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x010A          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            Credit                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0102          |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/                        Source Address                         /
\                                                               \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0113          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Importance                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0114          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Message Priority                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0103          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/                     Destination Address                       /
\                                                               \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x010b          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/                             Data                              /
\                                                               \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

the COAK parameter list has a couple of conditional bits, so here it is in full 👑

Parameters
  Routing Context               Mandatory
  Protocol Class                Mandatory
  Destination Reference Number  Mandatory
  Source Reference Number       Mandatory
  Sequence Control              Mandatory
  Credit                        Mandatory *2
  Source Address                Optional
  Importance                    Optional
  Message Priority              Optional
  Destination Address           Optional *1
  Data                          Optional

NOTE *1:    Destination Address parameter will be present in case
            that the received CORE message conveys the Source
            Address parameter.

NOTE *2:    Only applicable for protocol class 3.

so, bestie 💅 *1 means Destination Address only shows up if the CORE you got carried a Source Address, and *2 means Credit only applies to protocol class 3. iykyk, and now you do too 🙈

Implementation note: this message covers the SCCP message Connection Confirm (CC) ✨

3.3.5. Connection Refused (COREF) 🙅‍♀️💖

okay so this is the message you send when you want to turn down a connection request between two peer endpoints 🫶 it's giving "no thank you, bestie" energy

 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 = 0x0105          |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Destination Reference Number                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0106          |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           SCCP Cause                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0102          |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/                        Source Address                         /
\                                                               \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0103          |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/                     Destination Address                       /
\                                                               \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0113          |             Length = 8        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Importance                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x010B          |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/                             Data                              /
\                                                               \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Parameters 🎀

Routing Context                    Mandatory
Destination Reference Number       Mandatory
SCCP Cause                         Mandatory
Source Address                     Optional
Destination Address                Optional *1
Importance                         Optional
Data                               Optional

Note *1:    Destination Address parameter will be present in case
            that the received CORE message conveys the Source Address
            parameter.

Implementation note: This message covers the following SCCP message: Connection REFused (CREF). 🧚


3.3.6. Release Request (RELRE) 👋✨

this one is how you ask for a signalling connection between two peer endpoints to be released 💅 once that happens, all the associated resources can be released too. main character exit energy 🦋

 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 = 0x0105          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Destination Reference Number                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0104          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                   Source Reference Number                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0106          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          SCCP Cause                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0113          |             Length = 8        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Importance                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x010b          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/                             Data                              /
\                                                               \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Parameters 🎀

Routing Context               Mandatory
Destination Reference Number  Mandatory
Source Reference Number       Mandatory
SCCP Cause                    Mandatory
Importance                    Optional
Data                          Optional

Implementation note: This message covers the following SCCP message: connection ReLeaSeD (RLSD). 🌸


3.3.7. Release Complete (RELCO) 🌈🫶

this is the message that acknowledges the release of a signalling connection between two peer endpoints 💜 all the associated resources should be released, so it's like the closing "k bye" after the drama is over 🙈

 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 = 0x0105          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Destination Reference Number                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0104          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                   Source Reference Number                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0113          |             Length = 8        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Importance                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Parameters 🎀

Routing Context               Mandatory
Destination Reference Number  Mandatory
Source Reference Number       Mandatory
Importance                    Optional

Implementation note: This message covers the following SCCP message: ReLease Complete (RLC). ✨


3.3.8. Reset Request (RESRE) 🔄🍓

this message says the sending SCCP/SUA wants to kick off a reset procedure, which is reinitialization of sequence numbers, with the peer endpoint 🧸 think of it as a fresh start button 💖

 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 = 0x0105          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Destination Reference Number                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0104          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                     Source Reference Number                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0106          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           SCCP Cause                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Parameters 🎀

Routing Context               Mandatory
Destination Reference Number  Mandatory
Source Reference Number       Mandatory
SCCP Cause                    Mandatory

Implementation note: This message covers the following SCCP message: ReSet Request (RSR). 💫


3.3.9. Reset Confirm (RESCO) ✅💜

last one in this batch! this message confirms the Reset Request, so it's the "yes, we're good to go" reply 🥹👑

 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 = 0x0105          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Destination Reference Number                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Tag = 0x0104          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                   Source Reference Number                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Parameters 🎀

Routing Context               Mandatory
Destination Reference Number  Mandatory
Source Reference Number       Mandatory

Implementation note: This message covers the following SCCP message: ReSet Confirmation (RSC). 🎀

3.3.10. Connection Oriented Error (COERR) 🚨

okay so COERR is the message you send when something goes wrong with a protocol data unit. it's basically the "hey, that packet was broken" text, and it's giving very clear communication energy 💅

    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 = 0x0105          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                 Destination Reference Number                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0106          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          SCCP Cause                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Parameters
     Routing Context               Mandatory
     Destination Reference Number  Mandatory
     SCCP Cause                    Mandatory

the vibe here is that this message covers the SCCP message Protocol Data Unit ERRor (ERR) 🎀

3.3.11. Connection Oriented Inactivity Test (COIT) 🫧

this one is for checking in on the signalling connection 🧚 it audits the connection state and makes sure the connection data is consistent at both ends. literally a bestie wellness check 🫶

    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 = 0x0115          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         Protocol Class                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0104          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   Source Reference Number                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0105          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                 Destination Reference number                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0107          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Sequence number                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x010A          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                            Credit                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Parameters
     Routing Context               Mandatory
     Protocol Class                Mandatory
     Source Reference Number       Mandatory
     Destination Reference number  Mandatory
     Sequence Number               Mandatory *1
     Credit                        Mandatory *1
*1 note time: the Sequence Number and Credit fields reflect the values sent in the last data form 2 or data acknowledgement message. if the protocol class says class 2, these two get ignored 🙈

the vibe here is that this covers the SCCP message Inactivity Test (IT) 🍓


3.4. Signalling Network Management (SNM) Messages 🌈

okay this section is the network drama queen 👑 it's all about telling everyone when a destination is out or back in the game

3.4.1. Destination Unavailable (DUNA) 💀

in SUA land, this message is basically the PC- or N-state indication that gets passed between SCCP and the local SCCP-user 🦋 the DUNA is sent from the SG or relay node to every concerned ASP (the ones serving SCCP-users that count as local to the SG or relay node, see chapter 1.3.1.1) whenever a destination or SCCP-user has gone unreachable. the SUA-User at the ASP is expected to stop sending traffic to the affected destination through the SG or relay node that sent the DUNA. bye bye traffic 😭

the format for the DUNA parameters 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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0006          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                       Routing Context                         /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0012          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                        Affected Point Code                    /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x8003          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              SSN                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0112          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              SMI                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0004          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                          Info String                          /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   Parameters
     Routing Context               Optional
     Affected Point Code           Mandatory *1
     SSN                           Optional *1
     SMI                           Optional
     Info String                   Optional
Note 1 bestie: when the SSN is included, the DUNA lines up with the SCCP N-STATE primitive. when the SSN isn't there, the DUNA lines up with the SCCP N-PCSTATE primitive. and the Affected Point Code can only hold one point code when SSN is present 🫶

3.4.2. Destination Available (DAVA) 🌸

this is the glow-up version of DUNA ✨ it's also covered by the PC- and N-state indication passed between SCCP and the local SCCP-user. the DAVA is sent from the SG or relay node to all concerned ASPs (same deal as before, the ones serving SCCP-users local to the SG or relay node, see chapter 1.3.1.1) to say a destination (a PC or SCCP-user) is reachable again 🦋 the ASP SUA-User protocol is expected to resume traffic to the affected destination through the SG or relay node that sent the DAVA. we're back, baby 💅

    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 = 0x0012          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                        Affected Point Code                    /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x8003          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              SSN                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0112          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              SMI                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0004          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                          Info String                          /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Parameters
     Routing Context               Optional
     Affected Point Code           Mandatory *1
     SSN                           Optional *1
     SMI                           Optional
     Info String                   Optional
Note 1 again, because it matters 🙈: when the SSN is included, the DAVA lines up with the SCCP N-STATE primitive. when SSN is not included, the DAVA lines up with the SCCP N-PCSTATE primitive. and the Affected Point Code can only contain one point code when SSN is present 💖

3.4.3. Destination State Audit (DAUD) 🦋

okay so the DAUD message 💅 is sent from the ASP to the SG (or relay node) to check the availability state of the routes to an affected destination. bestie, the ASP can send a DAUD periodically after it gets a DUNA, and it keeps doing that until a DAVA shows up 🫶. It can also send one when an ASP recovers from isolation from the SG (or relay node) ✨.

    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 = 0x0012          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                        Affected Point Code                    /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x8003          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              SSN                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x010C          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           User/Cause                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0004          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                          Info String                          /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Parameters
  Routing Context               Optional
  Affected Point Code           Mandatory *1
  SSN                           Optional *1
  User / Cause                  Optional
  Info String                   Optional

Note 1: this one's a big deal 🙈 If the SSN is present, the DAUD is "soliciting" N-STATE primitives, otherwise it is "soliciting" N-PCSTATE primitives.


3.4.4. Signalling Congestion (SCON) 🌈

the SCON message can be sent from the SG or relay node to all concerned ASPs to show that the congestion level in the SS7 network to a specified destination has changed 📈✨.

    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 = 0x0012          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                        Affected Point Code                    /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x8003          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              SSN                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0118          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Congestion Level                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0112          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              SMI                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0004          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                          Info String                          /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Parameters
  Routing Context               Optional
  Affected Point Code           Mandatory *1
  SSN                           Optional *1
  Congestion Level              Mandatory
  SMI                           Optional
  Info String                   Optional

Note 1: When the SSN is included, the SCON message corresponds to the SCCP N-STATE primitive. When the SSN is not included, the SCON message corresponds to the SCCP N-PCSTATE primitive reporting signalling point or network congestion status.


3.4.5. Destination User Part Unavailable (DUPU) 🧚

the DUPU message is how an SG tells an ASP that a remote peer at an SS7 node is unavailable 🫠. the format for DUPU message parameters goes 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             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                       Routing Context                         /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0012          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                        Affected Point Code                    /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x010C          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           User/Cause                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0004          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   \                                                               \
   /                          INFO String                          /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Parameters
  Routing Context               Optional
  Affected Point Code           Mandatory *1
  User/Cause                    Mandatory
  Info String                   Optional

Note 1: The DUPU corresponds to the SCCP N-PCSTATE primitive.


3.4.6. Destination Restricted (DRST) 🔥

the DRST message is optionally sent from the SG to all concerned ASPs 💅. it tells them that the SG has decided one or more destinations are now restricted from the SG's point of view, or it's a reply to a DAUD message if that makes sense. the SUA layer at the ASP is expected to send traffic to the affected destination through an alternate SG of equal priority, but only if that alternate route exists and is available 🫶. if the ASP currently thinks the affected destination is unavailable, the peer should be told that traffic to that destination could be resumed. in that case, the SUA layer should route the traffic through the SG that started the DRST message ✨.

this message is optional for the SG to send, and it's optional for the ASP to act on anything it receives in the 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 = 0x0006          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                       Routing Context                         /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0012          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                        Affected Point Code                    /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x8003          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              SSN                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0112          |            Length = 8         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    Reserved                  |       SMI      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0004          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                          Info String                          /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Parameters
  Routing Context               Optional
  Affected Point Code           Mandatory *1
  SSN                           Optional *1
  SMI                           Optional *1
  Info String                   Optional

Note 1: The Affected Point Code refers to the node that has become restricted, or that has requested a coordinated service outage. When SSN is included in the message parameter, the DRST message corresponds to the SCCP N-COORD primitive. If the SMI parameter is also included in the message, the DRST message corresponds to the N-COORD Request and N-COORD Indication primitives. Otherwise, the DRST message corresponds to the N-COORD Response and N-COORD Confirm primitives. The Affected Point Code can only contain one point code when SSN is present. When SSN is not present, DRST corresponds to the N-PCSTATE primitive.


3.5. Application Server Process State Maintenance Messages 🧚‍♀️✨

3.5.1. ASP Up (UP) 🎀

Okay so the ASP UP message is how an ASP tells its remote SUA peer that the Adaptation layer is up and running. It's basically the "I'm awake and ready, bestie" 🌸 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 = 0x0011       |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        ASP Identifier                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |            Tag = 0x0004       |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                          Info String                          /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   Parameters
     ASP Identifier                Optional *1
     Info String                   Optional
Note 1: ASP Identifier MUST be used where the IPSP/SGP cannot identify the ASP by provisioned address/port number information (e.g., where an ASP is resident on a Host using dynamic address/port number assignment).

3.5.2. ASP Up Ack (UP ACK) 🫶

The ASP UP Ack is the peer's "got it, thanks bestie" reply to an ASP-Up message it received from a remote SUA peer.

    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                          /

   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   Parameters
     Info String              Optional

3.5.3. ASP Down (DOWN) 🌧️

Now the opposite vibe. The ASP Down message tells a remote SUA peer that the adaptation layer is not running anymore 🥺

    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                          /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   Parameters
     Info String         Optional

3.5.4. ASP Down Ack (DOWN ACK) 💅

The ASP DOWN Ack is the peer acknowledging an ASP-Down message it received from a remote SUA peer. Iconic reply energy.

    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                          /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   Parameters
     Info String         Optional
Note: ASP DOWN ACK will always be sent to acknowledge an ASP DOWN.

3.5.5. Heartbeat (BEAT) 💓

The Heartbeat message is optional 🫧, used to make sure the SUA peers are still available to each other. Basically a "you still there?" check-in.

The format for the BEAT 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 = 0x0009        |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                       Heartbeat Data                          /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   Parameters
     Heartbeat Data      Optional

3.5.6. Heartbeat Ack (BEAT ACK) 🌈

This one is the reply to a BEAT message. A peer MUST send a BEAT ACK in response to a BEAT message 🙌 and it includes all the parameters of the received Heartbeat message, without any change. No edits, just vibes returned as-is.

The format for the BEAT ACK 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 = 0x0009        |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                       Heartbeat Data                          /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   Parameters
     Heartbeat Data      Optional

3.6. ASP Traffic Maintenance Messages ✨

3.6.1. ASP Active (ACTIVE) 🦋

The ASPAC message is sent by an ASP to tell a remote SUA peer that it's Active and ready to process signalling traffic for a particular Application Server. Main character energy 👑

The format for the ACTIVE 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 = 0x000B        |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Traffic Mode Type                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           Tag = 0x0006        |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                       Routing Context                         /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Tag = 0x0110         |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           TID Label                           |
   +-------------------------------+-------------------------------+
   |          Tag = 0x010F         |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           DRN Label                           |
   +-------------------------------+-------------------------------+
   |           Tag = 0x0004        |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                          Info String                          /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   Parameters
     Traffic Mode Type   Optional
     Routing Context     Optional
     TID Label           Optional
     DRN Label           Optional
     Info String         Optional

3.6.2. ASP Active Ack (ACTIVE ACK) 💖

The ASPAC Ack is how a peer acknowledges an ASP-Active message it received from a remote SUA peer. Acknowledged, bestie ✨

The format for the ACTIVE Ack 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 = 0x000B        |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Traffic Mode Type                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           Tag = 0x0006        |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                       Routing Context                         /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Tag = 0x0004         |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                          Info String                          /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   Parameters
     Traffic Mode Type   Optional
     Routing Context     Mandatory
     Info String         Optional

3.6.3. ASP Inactive (INACTIVE) 🌙

The INACTIVE message is sent by an ASP to tell a remote SUA peer that it's no longer processing signalling traffic within a particular Application Server. Taking a little break 💤

The format for the ASPIA 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 = 0x0006        |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                       Routing Context                         /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           Tag = 0x0004        |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                          INFO String                          /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   Parameters
     Routing Context     Optional
     INFO String         Optional

3.6.4. ASP Inactive Ack (INACTIVE ACK) 🍓

The INACTIVE Ack message is used to acknowledge an ASP-Inactive message received from a remote SUA peer. Noted, the break is acknowledged 🫶

The format for the INACTIVE Ack 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                         /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Tag = 0x0004         |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                          INFO String                          /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   Parameters
     Routing Context     Optional
     INFO String         Optional

3.7. SUA Management Messages 🧚

These messages are used for managing SUA and the representations of the SCCP subsystems in the SUA layer. Think of this as the behind-the-scenes crew keeping the whole show running 🎀

3.7.1. Error (ERR) 💌

okay so the ERR message is how one SUA peer tells the other "hey, something went wrong" 🙈 The Diagnostic Information parameter is optional, but it's giving main character energy for error logging and debugging 🔍✨

    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            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          Error Code                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0006          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                       Routing Context                         /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x0012          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      Mask     |                 Affected PC 1                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                              ...                              /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      Mask     |                 Affected PC n                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x010D          |         Length = 8            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Network Appearance                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Tag = 0x0007         |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                        Diagnostic Info                        /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Here's the parameter rundown 📋💕

Parameters
  Error Code                    Mandatory
  Routing Context               Mandatory *1
  Network Appearance            Mandatory *1
  Affected Point Code           Mandatory *1
  Diagnostic Information        Optional
*1 is only mandatory for specific error codes, so Routing Context, Network Appearance, and Affected Point Code aren't always required. Read the error code first 🫶

3.7.2. Notify (NTFY) 📣

the NTFY message is the one that sends an autonomous heads-up about SUA events to a peer, no request needed 🔥

    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            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           Status                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |            Tag = 0x0011       |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        ASP Identifier                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   |          Tag = 0x0006         |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                       Routing Context                         /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Tag = 0x0004         |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                          Info String                          /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The NTFY message carries these parameters 🧾

Parameters
  Status                        Mandatory
  ASP Identifier                Optional *1
  Routing Context               Optional
  Info String                   Optional
*1 ASP Identifier MUST be used where the IPSP/SGP cannot identify the ASP by provisioned address/port number information (for example, where an ASP lives on a Host that uses dynamic address/port number assignment). No cap, this one is a must 💅

3.8. Routing Key Management (RKM) Messages 🗝️✨

this is the crew that handles routing keys, so registering them, deregistering them, and all the paperwork around that 🫶

3.8.1. Registration Request (REG REQ) 🙋‍♀️

the REG REQ message is how an ASP tells a remote SUA peer "hey, I'd like to register one or more routing keys with you, pls and thank u" 💖 Usually an ASP sends this to an SGP, and it's expecting a REG RSP back with an associated Routing Context value 🎀

    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 = 0x010E         |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                         Routing Key 1                         /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                              ...                              /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Tag = 0x010E         |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                         Routing Key n                         /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |            Tag = 0x0109       |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        ASP Capabilities                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The REG REQ message has these parameters 🌸

Parameters
  Routing Key                   Mandatory *1
  ASP Capabilities              Optional
*1 One or more Routing Key parameters MAY be included in a single REG REQ message. So you can register a whole bunch at once 🍓

3.8.2. Registration Response (REG RSP) 🎉

the REG RSP message is the SG's reply to an ASP, spilling the tea on how the earlier REG REQ went 🍵 It says yay or nay for each registration request, and for every successful one it hands back a unique Routing Context value that gets used in later SUA Traffic Management messages 💜

    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 = 0x0014         |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    Registration Result 1                      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                              ...                              /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Tag = 0x0014         |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    Registration Result n                      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The REG RSP message has these parameters ✨

Parameters
  Registration Result           Mandatory *1
*1 One or more Registration Result parameters MAY be included in a single REG RSP message. The number of results in one REG RSP can be anywhere from one up to the total number of Routing Key parameters in the matching REG REQ message 🦋

3.8.3. Deregistration Request (DEREG REQ) 👋

the DEREG REQ message is an ASP saying "bye, I'd like to deregister this routing key pls" 🥺 Typically it goes from an ASP to an SGP, and the ASP expects a DEREG RSP back with the associated Routing Context value 🌈

    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                         /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The DEREG REQ message has one parameter 💅

Parameters
  Routing Context               Mandatory

3.8.4. Deregistration Response (DEREG RSP) 🫧

the DEREG RSP message is the reply to a DEREG REQ from a remote SUA peer 💫

    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 = 0x0015         |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   Deregistration Result 1                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                              ...                              /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Tag = 0x0015         |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   Deregistration Result n                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The DEREG RSP message has these parameters 🌷

Parameters
  Deregistration Result         Mandatory *1
*1 One or more Deregistration Result parameters MAY be included in one DEREG RSP message. The number of results in a single DEREG RSP can be anywhere from one up to the total number of Routing Context parameters in the matching DEREG REQ message 🎀

3.9. Common Parameters ✨

okay bestie, these TLV parameters are the ones shared across all the different adaptation layers 🦋 so think of them as the group chat members everybody already knows 💅

Parameter Name                     Parameter ID
==============                     ============
Reserved                             0x0000
Not used in SUA                      0x0001
Not used in SUA                      0x0002
Not used in SUA                      0x0003
Info String                          0x0004
Not used in SUA                      0x0005
Routing Context                      0x0006
Diagnostic Info                      0x0007
Not used in SUA                      0x0008
Heartbeat Data                       0x0009
Not Used in SUA                      0x000A
Traffic Mode Type                    0x000B
Error Code                           0x000C
Status                               0x000D
Not used in SUA                      0x000E
Not used in SUA                      0x000F
Not used in SUA                      0x0010
ASP Identifier                       0x0011
Affected Point Code                  0x0012
Correlation ID                       0x0013
Registration Result                  0x0014
Deregistration Result                0x0015
Registration Status                  0x0016
Deregistration Status                0x0017
Local Routing Key Identifier         0x0018

3.9.1. Not Used 🙈

ngl this one's simple: Parameter ID 0x0001 is not supported in SUA messages 🫶

3.9.2. Not Used 🙈

same energy as before 💀 Parameter ID 0x0002 is not supported in SUA messages.

3.9.3. Not Used 🙈

and again, Parameter ID 0x0003 is not supported in SUA messages. we're basically crossing these off the list 🌸

3.9.4. Info String 🧚

okay this one is lowkey cute ✨ the optional INFO String parameter can carry any meaningful UTF-8 [3629] character string along with the message. it can be anywhere from 0 to 255 octets long. there are no procedures defined for it right now, but service providers are allowed to use it for debugging 🔥

    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                          /

   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

3.9.5. Not Used in SUA 🙈

Parameter ID 0x0005 is not supported in SUA messages. bye bye 👋

3.9.6. Routing Context 🦋

this one is giving main character energy 👑 the Routing Context parameter holds a list of 4-byte unsigned integers that index the Application Server traffic the sending ASP is configured or registered to receive. each index entry lines up one-to-one with a Routing Key or an AS Name, so it's a clean pairing 💖

    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                         /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

okay so an Application Server Process can be set up to handle traffic for more than one logical Application Server 🌈 from the ASP's point of view, a Routing Context basically marks out the range of signalling traffic it's currently set up to receive from the SG 🫶

it also tells you which SS7 network context a message belongs to 🔥 this is for keeping signalling traffic logically separated between the SGP and the Application Server Process over one shared SCTP Association, when that's needed. a super real example is an SGP that's logically partitioned so it shows up as an element in several different national SS7 networks 🌍 the context implicitly defines the SS7 Point Code format, the SS7 Network Indicator value, and the SCCP protocol type, variant, and version used inside that separate network. it also sets the network context for the PC and SSN values ✨ but if the SGP only lives in one SS7 network, or each SCTP association is dedicated to its own network context, then none of this is needed 💅

one important thing: if the Routing Context parameter is present, it SHOULD be the first parameter in the message, because it decides how the parameters containing a PC or SSN value get read 🎀

3.9.7. Diagnostic Information 💀

the Diagnostic Information is basically the tea ☕ it can carry any info relevant to an error condition, so whoever's debugging can figure out what went wrong 🔍 for an Adaptation Layer Identifier or a Traffic Handling Mode problem, it includes the received parameter. for everything else, it may be the first 40 bytes of the offending 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 = 0x0007          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                     Diagnostic Information                    /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

3.9.8. Not Used 🙈

Parameter ID 0x0008 is not used in SUA. next 🌸

3.9.9. Heartbeat Data 💜

the sending node decides what goes in the Heartbeat Data field 🧚 it may include a Heartbeat Sequence Number and/or a Timestamp, or other implementation specific details. the receiver doesn't process this field, because it only matters to the sender 🙈 the receiver just echoes the Heartbeat Data back inside a BEAT-Ack 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 data field is a stash for whatever's useful to the sender 💅 for example, it can hold a time stamp, a sequence number, and so on 🕰️

3.9.10. Not Used 🙈

Parameter ID 0x000A is not used in SUA. moving on 🦋

3.9.11. Traffic Mode Type 👑

the Traffic Mode Type parameter tells you which traffic mode the ASP is running in within an AS 🌸

    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 Type are in this little table 💖

      1         Override
      2         Loadshare
      3         Broadcast
⚠️ within one Routing Context, you cannot mix Override, Loadshare, and Broadcast. pick one lane bestie 🛣️

so here's the vibe for each one 🔥 Override means the ASP wants to take over all the traffic for an Application Server, like a primary/backup setup, and it overrides any ASP that's currently active in the AS 👑 Loadshare means the ASP wants to share the traffic distribution with the other currently active ASPs 🤝 and Broadcast means the ASP wants to receive the same traffic as all the other currently active ASPs 📡 if there aren't enough ASPs around, the sender may immediately move the ASP to Active 💅✨

3.9.12. Error Code 🚨

okay bestie, this one is the Error Code parameter 💅 (Tag 0x000C, Length 8), and it's how the other side tells you why an Error Message got sent. no cap, it's giving very important energy 😭

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

so the Error Code parameter is the reason 🎀 and the Error parameter value is one of these (periodt):

      0x01      Invalid Version
      0x02      Not Used in SUA
      0x03      Unsupported Message Class
      0x04      Unsupported Message Type
      0x05      Unsupported Traffic Handling Mode
      0x06      Unexpected Message
      0x07      Protocol Error
      0x08      Not used in SUA
      0x09      Invalid Stream Identifier
      0x0a      Not used in SUA
      0x0b      Not used in SUA
      0x0c      Not used in SUA
      0x0d      Refused - Management Blocking
      0x0e      ASP Identifier Required
      0x0f      Invalid ASP Identifier
      0x10      Not Used in SUA
      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 SUA
      0x18      Not Used in SUA
      0x19      Invalid Routing Context
      0x1a      No Configured AS for ASP
      0x1b      Subsystem Status Unknown
      0x1c      Invalid loadsharing label

now let's go through the vibes one by one 👑

Invalid Version (0x01) gets sent when a message shows up with a version that's invalid or unsupported 🙈. the Error message includes the supported version in the Common header, and it could optionally include the unsupported version in the Diagnostic information area too 🧚

Unsupported Message Class (0x03) is the one for a message whose Message Class is unexpected or unsupported 💜

Unsupported Message Type (0x04) is the same energy but for the Message Type 🦋

Unsupported Traffic Handling Mode (0x05) is sent by an SGP when an ASP sends an ASP Active message with a Traffic Mode Type that's unsupported, or one that doesn't match the mode the Application Server is currently configured with 💅. like, if the SGP doesn't support loadsharing, that's exactly when this one shows up 🌸

Unexpected Message (0x06) MAY be sent if a defined and recognized message arrives that isn't expected in the current state 🫶. sometimes the ASP can just silently discard it and not send an Error message at all (iykyk 🙈). for example, an ASP silently discards a DATA message from an SGP while it's in the ASP-INACTIVE state. and if the Unexpected message had Routing Context(s) in it, those Routing Context(s) SHOULD be included in the Error message ✨

Protocol Error (0x07) is sent for any protocol anomaly, which means a parameter that's syntactically correct but unexpected in the current situation 😭

Invalid Stream Identifier (0x09) is sent when a message is received on an unexpected SCTP stream 🧚

Refused - Management Blocking (0x0d) is sent when an ASP Up or ASP Active message gets refused for management reasons (like a management lockout"). if this error is responding to an ASP Active message, the Routing Context(s) in that ASP Active message SHOULD be included in the Error message 🔒

ASP Identifier Required (0x0e) is sent by an SGP in response to an ASP Up message that doesn't have an ASP Identifier parameter, but only when the SGP actually requires one 🎀. the ASP SHOULD resend the ASP Up message with an ASP Identifier ✨

Invalid ASP Identifier (0x0f) is sent by an SGP in response to an ASP Up message with an invalid ASP Identifier 🙅

Invalid Parameter Value (0x11) is sent if a message comes in with an invalid parameter value 🍓. the example here is a DUPU message received with a Mask value other than "0" 💀

Parameter Field Error (0x12) would be sent if a message has a parameter with a wrong length field 🧸

Unexpected Parameter (0x13) would be sent if a message contains an invalid parameter 🌈

Invalid Network Appearance (0x15) is sent by an SGP when an ASP sends a message with an invalid (not configured) Network Appearance value 🫠. for this one, the invalid (not configured) Network Appearance MUST be included in the Network Appearance parameter, no exceptions bestie 🚫

Missing Parameter (0x16) would be sent if a mandatory parameter wasn't included in a message 📋

Invalid Routing Context (0x19) would be sent by an SG when an ASP sends a message with an invalid (not configured) Routing Context value 🗺️. for this error, the invalid (not configured) Routing Context(s) MUST be included in the Routing Context parameter 💖

No Configured AS for ASP (0x1a) is sent if a message comes from a peer without a Routing Context parameter, and the configuration data doesn't say which Application Servers are referenced 🤷‍♀️

Destination Status Unknown (0x14) MAY be sent if a DAUD arrives at an SG asking about the availability or congestion status of a destination, and the SG doesn't want to share that status (for example, the sender isn't authorized to know it) 🔐. for this error, the invalid or unauthorized Point Code(s) MUST be included along with the Network Appearance and Routing Context associated with those Point Code(s) 💜

Subsystem Status Unknown (0x1b) MAY be sent if a DAUD arrives at an SG asking about the availability or congestion status of a subsystem, and the SG doesn't want to share it (again, maybe the sender isn't authorized) 🙈. for this one, the invalid or unauthorized Point Code and Subsystem Number MUST be included along with the Network Appearance and Routing Context associated with that Point Code and Subsystem Number 🌸

⚠️ quick reminder: the MAY and SHOULD bits are optional, but the MUST bits are not. skipping a MUST-included field makes the whole error message wrong, so double-check those 🫶

3.9.13. Status 📣

the Status parameter tells you what kind of status is being notified 💖 and what its Status ID 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 = 0x000D         |             Length = 8        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Status Type           |            Status ID          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

the valid Status Type values (16 bit unsigned integer) are 🍓:

      1     Application Server state change (AS_State_Change)
      2     Other

the Status ID gives you more detail for the notification, depending on the Status Type 🧚

if the Status Type is AS_STATE_CHANGE, then the Status ID values (16 bit unsigned integer) are 🎀:

      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's status changes, and the value shows 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 notifications aren't based on the SGP reporting a state change of an ASP or AS 🙈. for Insufficient ASP Resources, the SGP is telling an "Inactive" ASP (or ASPs) in the AS that another ASP is needed to handle the AS's load (that's Loadsharing mode or Broadcast mode) 🌈. for Alternate ASP Active, an ASP gets informed when an alternate ASP moves to the ASP-Active state in Override mode 💜


3.9.14. Not Used in SUA 🙅

Parameter ID 0x000E is not used in SUA 💀


3.9.15. Not Used in SUA 🙅

Parameter ID 0x000F is not used in SUA 💀


3.9.16. Not Used in SUA 🙅

Parameter ID 0x0010 is not used in SUA 💀


3.9.17. ASP Identifier 🫶

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

the ASP Identifier field is 32-bits (unsigned integer) 🔢 and it holds a unique value that only has to make sense locally, meaning it's unique among the ASPs that support an AS 🦋. the SGP should save the ASP Identifier to be used, if necessary, with the Notify message (see Section 3.7.2) 💖

3.9.18. Affected Point Code ✨

Okay bestie, so the Affected Point Code Destinations parameter is a list of Affected Point Code fields 💅. Each one is three octets long so it can hold 14-, 16- and 24-bit binary SS7 Point Codes 🦋. Anything shorter than 24 bits gets padded on the left out to the 24-bit boundary 🌸.

    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 = 0x0012         |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Mask       |                 Affected PC 1                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                             . . .                             /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Here's how it's encoded for ANSI and ITU Point Codes, so you can see the layout 👀.

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|

Real talk: it is OPTIONAL for an implementation to pack more than one Affected PC into a single Affected Point Code parameter 🫶. But the implementation MUST accept and process an Affected Point Code parameter that has more than one Affected PC, no exceptions 💖.

Mask: 8-bits 🎀

The Mask parameter lets you point at a contiguous range of Affected Destination Point Codes, no matter which point code format you're using 🌈. This is super handy when receiving one MTP3 management message or a linkset event knocks out the availability of a whole bunch of destinations at an SG at once 😭.

The Mask is an integer holding a bit mask that gets applied to the related Affected PC field. It tells you how many bits of that field actually matter, and which ones are "wild-carded" (basically, ignored) 🧚. For example, a mask of "8" means the last eight bits of the PC are wild-carded. 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 are wild-carded, and for a 14-bit ITU Affected PC, that's the same as saying an ITU Region is unavailable 👑.

3.9.19. Correlation ID 🦋

    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 = 0x0013         |             Length = 8        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Correlation ID                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Okay, the Correlation ID is a 32-bit identifier stuck onto CLDT messages 🎀. Its whole job is to tell a newly entering ASP in a Broadcast AS where it's landing in the CLDT message flow 👀. It gets attached to the first CLDT message an SG sends to an ASP after that ASP has gotten an ASP Active Ack, or after the SG otherwise starts sending traffic to it ✨. Also, the Correlation ID only means something inside a Routing Context, so don't go comparing it across contexts 🙅‍♀️.

Implementation note: the Correlation ID parameter can help with things like syncing ASPs/SGPs in a Broadcast Mode AS/SG, and with avoiding message duplication and mis-sequencing when an association fails over from one ASP/SGP to another ASP/SGP 🔥.

3.9.20. Registration Result 💜

    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 = 0x0018         |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Routing Key Identifier                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Tag = 0x0016         |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Registration Status                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Tag = 0x0006         |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         Routing Context                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

So the Routing Key Identifier carries the exact same TLV formatted parameter value that showed up in the matching Routing Key parameter in the REG REQ message 🔁.

The Routing Context carries the same TLV formatted Routing Context parameter for the associated Routing Key, but only if the registration worked ✅. If it didn't work, it's set to "0" 😬.

3.9.21. Deregistration Result 🌸

    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 = 0x0017         |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      Deregistration Status                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Routing Context (a 32-bit integer) 🎀: this is the Routing Context value of the matching Routing Key you want to deregister, the one that was found in the DEREG REQ message 🔍.

Deregistration Status (also a 32-bit integer) 💅: this one tells you whether the deregistration worked, or why it didn't 💁‍♀️.

3.9.22. Registration Status 🧚

    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 = 0x0016      |          Length = 8             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      Registration Status                      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Registration Status (32-bits, unsigned integer) 🌈: this field tells you whether a registration request worked, or the reason it failed 🙈.

Its values may be:

         0           Successfully Registered
         1           Error - Unknown
         2           Error - Invalid Destination Address
         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 Mode Type
        11           Error - Routing Key Change Refused

3.9.23. Deregistration Status 🍓

    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 = 0x0017      |          Length = 8             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    Deregistration Status                      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Deregistration Status (32-bit integer) 💖: the Deregistration Result Status field tells you whether the deregistration worked, or why 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.9.24. Local Routing Key Identifier 🔑

    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 = 0x0018        |        Length = 8             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                  Local Routing Key Identifier                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The Local Routing Key Identifier is a 32-bits unsigned integer 🧮. The ASP assigns the value, and it's how a REG RSP message gets matched back up to the original registration request 🫶. The Identifier value must remain unique until the REG RSP message has been received, so don't reuse it too early 🙅‍♀️.

3.10. SUA-Specific parameters 🌟

These TLV parameters are specific to the SUA protocol 💜.

   Parameter Name                     Parameter ID
   ==============                     ============
   SS7 Hop Counter                      0x0101
   Source Address                       0x0102
   Destination Address                  0x0103
   Source Reference Number              0x0104
   Destination Reference Number         0x0105
   SCCP Cause                           0x0106
   Sequence Number                      0x0107
   Receive Sequence Number              0x0108
   ASP Capabilities                     0x0109
   Credit                               0x010A
   Data                                 0x010B
   User/Cause                           0x010C
   Network Appearance                   0x010D
   Routing Key                          0x010E
   DRN Label                            0x010F
   TID Label                            0x0110
   Address Range                        0x0111
   SMI                                  0x0112
   Importance                           0x0113
   Message Priority                     0x0114
   Protocol Class                       0x0115
   Sequence Control                     0x0116
   Segmentation                         0x0117
   Congestion Level                     0x0118

   Destination/Source Address Sub-Parameters
   ===========================================
   Global Title                         0x8001
   Point Code                           0x8002
   Subsystem Number                     0x8003
   IPv4 Address                         0x8004
   Hostname                             0x8005
   IPv6 Addresses                       0x8006

3.10.1. SS7 Hop counter 🦋

    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 = 0x0101          |             Length = 8        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              Reserved                         | SS7 Hop Count |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Okay so the SS7 Hop Counter is basically a little countdown 💖 It gets decremented every time a global title translation happens, and it lives in the range 15 to 1. Think of it as the number of translation stops a message has left 🧚

SS7 Hop Counter (3.18/Q.713)

The value of the SS7 Hop Counter is decremented with each global title translation and is in the range 15 to 1.

3.10.2. Source Address 🌸

    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 = 0x0102         |      Parameter Length         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      Routing Indicator        |       Address Indicator       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                       Address parameter(s)                    /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Now the valid combos for address parameters, which is where it gets a bit of a mix 💅 Here's what's allowed:

  • Global Title (e.g., E.164 number), plus an optional PC and/or SSN. The SSN may be zero, but only when routing is done on Global Title.
  • SSN (non-zero), plus an optional PC and/or Global Title, when routing is done on PC + SSN. The PC is mandatory in the source address when sending from SGP to ASP, and in the destination address when sending from ASP to SGP to reach the SS7 SEP.
  • Hostname, plus an optional SSN, when routing is done by Hostname.
  • SSN (non-zero) and an optional IP address (IPv4 or IPv6), when routing is done on IP address + SSN.

3.10.2.1. Routing Indicator 🎀

These are the valid values for the routing indicator:

      Reserved                      0
      Route on Global Title         1
      Route on SSN + PC             2
      Route on Hostname             3
      Route on SSN + IP Address     4

The routing indicator is the thing that decides which address parameters need to be present in the address parameters field. It's the boss of the whole field 👑

3.10.2.2. Address Indicator 💜

This parameter is needed for interworking with SS7 networks 🦋 The address indicator says what address parameters were actually received in the SCCP address from the SS7 network, or what needs to be populated in the SCCP address when the message is sent into the SS7 network. The value of the routing indicator needs to be taken into account here. It's used in the ASP to SG direction.

For example, the PC parameter is present in the destination address of the CLDT sent from ASP->SG, but bit 2 is set to "0", meaning "do not populate this in the SCCP called party address". The effect is that the SG only uses the PC to populate the MTP routing label DPC field, and it does not include it in the SCCP called party address. Lowkey sneaky, but it makes sense 🙈

In the SG->ASP direction, the source address PC parameter is present (PC of SS7 SEP). However, this may have been populated from the OPC in the received MTP routing label, not from the PC field in the SCCP calling party address. In this case, bit 2 = "0" denotes that. The AI gives further instructions to the SG on how and when to populate the SCCP addresses. In the SG->ASP direction, the AI tells the ASP what was actually present in the received SCCP addresses.

The address indicator is coded like this:

   Bit 1 is used to indicate inclusion of the SSN

   0         Do not include SSN when optional
    1         Include SSN

   Bit 2 is used to indicate inclusion of the PC

   0         Do not include PC, regardless of the routing indicator
             value
    1        Include PC

   Bit 3 is used to indicate inclusion of the Global Title

   0         Do not include GT when optional (routing indicator /= 1)
    1        Include GT

The remaining bits are spare and SHOULD be coded zero, and MUST be ignored by the receiver. So leave the spares at zero, and the receiver should just ignore them 🌈

3.10.2.3. Global Title ✨

   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 = 0x8001          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                Reserved                       |      GTI      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   No. Digits  | Trans. type   |    Num. Plan  | Nature of Add |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                         Global Title Digits                   /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The Number of Digits field is just how many digits are in the Global Title. Simple and iconic 💅

The GTI is the Global Title Indicator, which is defined in chapter 3.4.2.3 of Q.713. Here are the values:

   0000     Invalid
   0001     Nature of Address is taken over. It is implicitly assumed
             that the Translation Type = Unknown and Numbering Plan =
             E.164 (value 1).
   0010     This is most commonly used in North American networks.
             The Translation Type implicitly determines Nature of
             Address and Numbering Plan.  This data can be configured
             in the SG.  The number of digits is always even and
             determined by the SCCP address length.
   0011     Numbering Plan and Translation Type are taken over.  It is
             implicitly assumed that the Nature of Address = Unknown.
   0100     This format is used in international networks and most
             commonly in networks outside North America.  All
             information to populate the source address is present in
             the SCCP Address.

Translation type, for reference:

   0              Unknown
   1 - 63         International services
   64 - 127       Spare
   128 - 254      National network specific
   255            Reserved

Numbering Plan:

   0         unknown
   1         ISDN/telephony numbering plan (Recommendations E.163 and
             E.164)
   2         generic numbering plan
   3         data numbering plan (Recommendation X.121)
   4         telex numbering plan (Recommendation F.69)
   5         maritime mobile numbering plan (Recommendations E.210,
             E.211)
   6         land mobile numbering plan (Recommendation E.212)
   7         ISDN/mobile numbering plan (Recommendation E.214)
   8 - 13    spare
   14        private network or network-specific numbering plan
   15 - 126  spare
   127       reserved.

Nature of Address:

   0         unknown
   1         subscriber number
   2         reserved for national use
   3         national significant number
   4         international number
   5 - 255   Spare

Global Title:

Octets contain a number of address signals, and possibly filler, 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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |2 addr.|1 addr.|4 addr.|3 addr.|6 addr.|5 addr.|8 addr.|7 addr.|
   |  sig. | sig.  |  sig. | sig.  |  sig. | sig.  |  sig. | sig.  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        .............          |filler |N addr.|   filler      |
   |                               |if req | sig.  |               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

All filler bits SHOULD be set to 0. Filler is basically padding, so keep it tidy at zero 🫶

The address signals are coded as defined in ITU-T Q.713 Section 3.4.2.3.1.

3.10.2.4. 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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Tag = 0x8002          |            Length = 8         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                            Point Code                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

For the layout of the Point Code field, see chapter 3.9.18 Affected Point Code. It's the same thing, so no need to reinvent the wheel 🔁

3.10.2.5. Subsystem Number 🌸

   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 = 0x8003          |            Length = 8         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                 Reserved                      |   SSN value   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The internationally standardized SSN values are described in chapter 3.4.2.2 of Q.713.

3.10.2.6. IP Addresses 🧚

The IP address formats can use different tags. It should be noted that if the source address is in a certain IP version, the destination address should also be in the same IP version. Matching is the vibe 💜

   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 = 0x8004/0x8006      |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                        IPv4 or IPv6 Address                   /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Note: The tag value 0x8004 is for an IPv4 address and 0x8006 is for IPv6.

3.10.2.7. Hostname 🍓

   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 = 0x8005          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                           Host Name                           /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Host Name: variable length

This field contains a host name in "host name syntax" per RFC 1123 Section 2.1 [1123]. How you resolve the host name is out of scope for this document, so that's a problem for another day 🙈

Note: At least one null terminator is included in the Host Name string and must be included in the length. Don't forget that null terminator, bestie, it counts toward the length 😭

3.10.3. Destination Address 💖

    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 = 0x0103         |      Parameter Length         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      Routing Indicator        |       Address Indicator       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                       Address Parameter(s)                    /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Good news: the format of this parameter is identical to the Source Address parameter. Same vibes, just pointing the other way 🦋

3.10.4. Source Reference Number 🎀

    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 = 0x0104         |             Length = 8        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   Source Reference Number                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Okay so the source reference number is a 4 octet long integer 💖. It gets allocated by the source SUA instance, so it's their number to hand out 💅.

3.10.5. Destination Reference Number 🦋

    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 = 0x0105         |             Length = 8        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                 Destination Reference Number                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The destination reference number is also a 4 octet long integer 🌸. This one gets allocated by the destination SUA instance, so each side keeps its own numbering 🫶.

3.10.6. SCCP Cause 🌸

    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 = 0x0106          |             Length = 8        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Reserved              |   Cause Type  |  Cause Value  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

This parameter is the bundle queen 👑. It packs up the SCCP parameters Release cause, Return cause, Reset cause, Error cause and Refusal cause all in one spot ✨.

Cause Type can have the following values:

   Return Cause          0x1
   Refusal Cause         0x2
   Release Cause         0x3
   Reset Cause           0x4
   Error Cause           0x5

Cause Value contains the specific cause value. Below gives examples for ITU SCCP values. ANSI references can be found in ANSI T1.112.3 🧚

   Cause value in        Correspondence with Reference
   SUA message           SCCP parameter
   ------------------    -----------------   ---------
   CLDR                  Return Cause        ITU-T Q.713 Chap 3.12
   COREF                 Refusal Cause       ITU-T Q.713 Chap 3.15
   RELRE                 Release Cause       ITU-T Q.713 Chap 3.11
   RESRE                 Reset Cause         ITU-T Q.713 Chap 3.13
   ERR                   Error Cause         ITU-T Q.713 Chap 3.14

3.10.7. Sequence Number 🍓

    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 = 0x0107         |             Length = 8        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Reserved              |  Rec Seq Num|M| Sent Seq Num  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

This parameter is used to indicate whether "more" data will follow in subsequent CODT messages, and/or to number each CODT message sequentially for the purpose of flow control 🌈. It contains the received as well as the sent sequence number, P(R) and P(S) in Q.713, chapters 3.7 and 3.9.

As such it can also be used to acknowledge the receipt of data transfers from the peer in case of protocol class 3 💅.

Sent Sequence Number is one octet and is coded as follows:

  • Bits 2-8 are used to indicate the Send Sequence Number P(S).
  • Bit 1 (LSB) of octet 1 is spare.

Received Sequence Number is one octet, and is coded as follows:

  • Bits 2-8 are used to indicate the Received Sequence Number P(R).
  • Bit 1 (LSB) is used for the more data indication, as follows:
   0         no more data
   1         more data

3.10.8. Receive Sequence Number 💜

    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 = 0x0108         |             Length = 8        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    Reserved                   |  Rec Seq Num  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

This parameter is used exclusively for protocol class 3 in the data acknowledgement message to indicate the lower edge of the receiving window 🪟. See Q.713, chapter 3.9.

It is a 1 octet long integer coded as follows:

  • Bits 8-2 are used to indicate the Received Sequence Number P(R).
  • Bit 1 is spare.

3.10.9. ASP Capabilities 🧚

This parameter is used so that the ASP can report its capabilities regarding SUA for supporting different protocol classes and interworking scenarios ✨.

    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 = 0x0109         |             Length = 8        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Reserved              |0 0 0 0|a|b|c|d| Interworking  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Flags

  • a - Protocol Class 3
  • b - Protocol Class 2
  • c - Protocol Class 1
  • d - Protocol Class 0

It is mandatory to support at least Protocol Class 0 🔥.

Interworking

Values

  • 0x0 indicates no interworking with SS7 Networks.
  • 0x1 indicates IP Signalling Endpoint (ASP), interworking with SS7 networks.
  • 0x2 indicates Signalling Gateway.
  • 0x3 indicates relay node support.

3.10.10. Credit 🌈

    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 = 0x010A         |             Length = 8        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                 Reserved                     |     Credit     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The length of the credit field is one octet. See ITU-T Q.713 Chapter 3.10. The parameter is used for protocol class 3 exclusively 💖.

3.10.11. Data 🫶

    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 = 0x010b         |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   /                             Data                              /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The Data parameter field contains the SS7 SCCP-User application message, for example an INAP/TCAP message 📦.

3.10.12. User/Cause 💀

    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 = 0x010c          |             Length = 8        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Cause             |            User               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

"User" is coded to that SCCP's SI value. There may be several SCCP's at a given point code, each with different SI values, although normally there is only one with SI = 3 🙈.

Cause may take the following values

0    remote SCCP unavailable, reason unknown;
1    remote SCCP unequipped;
2    remote SCCP inaccessible;

3.10.13. Network Appearance 👑

    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 = 0x010D          |             Length = 8        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      Network Appearance                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Network Appearance field: 32-bits (unsigned integer)

The Network Appearance field identifies the SS7 network context for the Routing Key. The Network Appearance value is of local significance only, coordinated between the SG and ASP. Therefore, in the case where the ASP is connected to more than one SG, the same SS7 Network context may be identified by different Network Appearance values depending upon to which SG the ASP is registering 🗺️.

In the Routing Key, the Network Appearance identifies the SS7 Point Code and Global Title Translation Type format used, and the SCCP and possibly the SCCP-User protocol (type, variant and version) used within the specific SS7 network 🔍.

3.10.14. Routing Key 🔥

       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 = 0x010E          |             Length            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |         Tag = 0x0018          |        Length = 8             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                  Local Routing Key Identifier                 |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      \                         Key parameter(s)                      \
      /                                                               /
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Local Routing Key Identifier field: 32-bits (unsigned integer)

Key field: variable

The Key field contains the following parameters:

   Parameter
      Traffic Mode Type          Optional
      Network Appearance         Optional *1
      Source Address             Optional
      Destination Address        Optional
      Address Range              Optional
Note 1: The Network Appearance parameter must be included in the Routing Key when the ASP is able to register in multiple SS7 Network contexts. 🚨

3.10.15. DRN Label ⭐

 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 = 0x010F         |            Length = 8         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     start     |      end      |         label value           |
+---------------+---------------+-------------------------------+

The Start parameter is the start position of label, between 0 (LSB) and 23 (MSB). 🎯

The End parameter is the end position of label, between 0 (LSB) and 23 (MSB). 🏁

Label value is a 16-bit integer, which is unique across an AS 💜.

3.10.16. TID Label ✨

Okay bestie, this one is the TID Label 🏷️ and it's giving tiny but mighty.

    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 = 0x0110         |            Length = 8         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     start     |      end      |         label value           |
   +---------------+---------------+-------------------------------+

The Start parameter is where the label begins 🎀, anywhere from 0 (LSB) up to 31 (MSB).

The End parameter is where the label ends 🦋, also between 0 (LSB) and 31 (MSB).

The label value is a 16-bit integer, and it has to be unique across an AS. Main character energy 👑

3.10.17. Address Range 🌸

Now we're on Address Range, and the diagram looks a little more chaotic, but I promise it's cute 🙈

    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 = 0x0111          |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   \                       Address parameter(s)                    \
   /                                                               /
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The Address field carries the following parameters 💅:

   Parameter
     Source Address              Optional *1
     Destination Address         Optional *1
Note 1 is the one you can't skip 🚨 The Address field must contain pairs of Source Addresses or pairs of Destination Addresses, and it MUST NOT mix Source Addresses with Destination Addresses in the same Address field. Absolutely no mixing, periodt.

3.10.18. SMI 💜

This is the SMI, which stands for Subsystem Multiplicity Indicator, and it's the parameter that tells you how many copies of a subsystem are out there 🧚

    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 = 0x0112          |            Length = 8         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    Reserved                   |      SMI      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The Subsystem Multiplicity Indicator (SMI) can have these values:

   0x00       Reserved/Unknown
   0x01       Solitary
   0x02       Duplicated
   0x03       Triplicated
   0x04       Quadruplicated
   0xff       Unspecified

3.10.19. Importance 🔥

Next up is Importance, and it's basically a ranking system 👑

    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 = 0x0113          |             Length = 8        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                Reserved                       |   Importance  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Importance (3.19/Q.713) 🌈

The possible values of the Importance Parameter run from 0 to 7, where 0 means least important and 7 means most important. Iconic ✨

3.10.20. Message Priority (or Priority) 🎀

Message Priority, also called just Priority, is up next, and it has a few rules you need to know 💖

    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 = 0x0114          |             Length = 8        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              Reserved                         |  Msg Priority |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Priority (the vibe check) 🔥

The Priority value ranges from 0 to 3. If the SCCP user hasn't specified a Priority value, it should be set to 0xFF. The SG MAY take the priority into account when it works out the MTP message priority. In the all-IP case, this parameter MAY be used.

The Message Priority parameter is optional in the CLDT, CLDR, CORE, COAK and CODT messages. However, for networks that support Message Priority (for example ANSI), this parameter MUST be included, but it is not required for networks that don't (for example International). Not every network needs it, but the ones that do really do 💅

3.10.21. Protocol Class 🦋

Now Protocol Class, which packs two different things into one parameter, so pay attention 🧠

    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 = 0x0115          |             Length = 8        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              Reserved                         |  Protocol Cl. |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Protocol class (3.6/Q.713) 💜

Bits 1-2 tell you the protocol class:

   Value     Description
     0       Class 0 (connectionless service)
     1       Class 1 (connectionless service)
     2       Class 2 (connection-oriented service)
     3       Class 3 (connection-oriented service)

Bit 8 tells you whether the return on error procedure is used:

    Value     Description
     0x0      No special options
     0x1      Return message on error

Bits 3-7 are spare and SHOULD be coded zero, and they MUST be ignored by the receiver. Spare bits are giving "don't touch, don't care" 🙈

3.10.22. Sequence Control 🌸

Sequence Control is where the sequencing magic happens ✨

    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 = 0x0116          |             Length = 8        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Sequence  Control         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Sequence Control (6.2.2.2.2/Q.711) 🫶

The field carries the value of the sequence control parameter for a group of messages. These values are chosen so that message groups get properly loadshared over SLS values, while sequence control values inside a message group are coded with the same value as the initial message of that group. Loadsharing with receipts, bestie 💅

3.10.23. Segmentation 🎀

Segmentation is how a big message gets chopped up into pieces 🧩

    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 = 0x0117          |            Length = 32        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | first/remain  |             Segmentation Reference            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The first/remaining segments field is formatted like this: bit 8 (MSB) says whether this is the first segment (1) or not (0).

Bits 1-7 say how many segments are left, with a value between 0 and 15.

So for an unsegmented CLDT, the field is coded as 1000 0000 (first, no remaining segments) 💖

The segmentation reference field is a 3 byte integer, and the ASP assigns it 🦋

3.10.24. Congestion Level 💀

Last one in this batch: Congestion Level, which tells you how jammed things are 🚦

    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 = 0x0118          |             Length = 8        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Congestion Level                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The Congestion Level field is an 8-bit unsigned integer, and it contains the level at which congestion has occurred.

When this parameter shows up in a SCON message that corresponds to an N-PCSTATE primitive, the Congestion Level field tells you the MTP congestion level experienced by the local or affected signalling point. That point is identified by the Affected Point Code(s) also in the SCON message. In this case, the valid values are:

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

When this parameter shows up in a SCON message that corresponds to an N-STATE primitive, the Congestion Level field tells you the SCCP restricted importance level experienced by the local or affected subsystem. That subsystem is identified by the Affected Point Code and Subsystem Number also in the SCON message. In this case, valid values range from 0 to 7, where 0 means least congested and 7 means most congested 🔥


4. Procedures ✨

The SUA layer needs to respond to various local primitives it gets from other layers, as well as the messages it gets from the peer SUA layer. This section walks through the SUA procedures for these events 🦋

4.1. Procedures to Support the SUA-User Layer 💖

4.1.1. Receipt of Primitives from SCCP 📬

When an SCCP Subsystem Management (SCMG) message comes in from the SS7 network, the SGP needs to figure out whether any concerned Application Servers are interested in subsystem status changes. The SUA management function is informed with the N-State or N-Coord primitive, and then it formats and transfers the applicable SNMM message to the list of concerned ASPs using stream ID "0" 🧚

When MTP-3 Management indications arrive (MTP-PAUSE, MTP-RESUME, MTP-STATUS), SCCP Subsystem Management works out whether there are concerned local SCCP-users. When those local SCCP-users are actually Application Servers serviced by ASPs, SUA management is informed with the N-PCSTATE indication primitive. It then formats and transfers the applicable SNM message (DUNA, DAVA, DRST or SCON) to the list of concerned ASPs using stream ID "0" 🌈

The SUA message distribution function picks the Application Server (AS) by comparing the information in the N-UNITDATA request primitive with a provisioned Routing Key 🎯

From the list of ASPs in the AS table, an ASP in the ASP-ACTIVE state gets selected, and a DATA message is built and sent out on the matching SCTP association. If more than one ASP is in the ASP-ACTIVE state (meaning the traffic is to be load-shared across more than one ASP), one of the ASPs in the ASP_ACTIVE state is picked from the list. If the ASPs are in Broadcast Mode, every active ASP gets picked and the message is sent to each one of them. The selection algorithm is up to the implementation, but it could, for example, be round robin or based on the SLS. The right selection algorithm must be chosen carefully, because it depends on the application's assumptions and on how well the ASP_ACTIVE ASPs in the AS understand each other's state. Big brain stuff 🧠

Also, the message needs to go out on the right SCTP stream, and again the message sequencing needs of the signalling application have to be respected 💅 DATA messages MUST be sent on an SCTP stream other than stream '0' when there is more than one stream. Stream 0 is reserved for management, so don't put your DATA there, bestie 🙈

When there's no Routing Key match, or only a partial match, for an incoming SS7 message, a default treatment MAY be specified. Possible solutions are to provide a default Application Server at the SGP that sends all 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 handled is up to the implementation 🫶

4.2. Receipt of Primitives from the Layer Management ✨

okay bestie, so the SUA layer is basically the hype person for Layer Management 💅 whenever it gets primitives from the local Layer Management, SUA takes the requested action and sends back an appropriate response primitive. no cap, that's the whole vibe 🫶

An M-SCTP_ESTABLISH request primitive from Layer Management at an ASP or IPSP kicks off setting up an SCTP association 🦋 SUA then tries to establish one with the remote SUA peer by sending an SCTP-ASSOCIATE primitive to the local SCTP layer.

once an SCTP association is successfully up, SCTP sends an SCTP-COMMUNICATION_UP notification primitive to the local SUA layer 🌸 at the ASP or IPSP that made the request, SUA sends an M-SCTP_ESTABLISH confirm primitive to Layer Management when setup is complete. at the peer SUA layer, an M-SCTP_ESTABLISH indication primitive goes to Layer Management once an incoming association setup finishes successfully.

an M-SCTP_RELEASE request primitive from Layer Management starts the shutdown of an SCTP association. SUA handles a graceful shutdown by sending an SCTP-SHUTDOWN primitive to the SCTP layer ✨

when the graceful shutdown is done, SCTP returns an SCTP-SHUTDOWN_COMPLETE notification primitive to the local SUA layer. at the SUA layer that started the request, SUA sends an M-SCTP_RELEASE confirm primitive to Layer Management once the association shutdown is complete. at the peer SUA layer, an M-SCTP_RELEASE indication primitive goes to Layer Management upon abort or successful shutdown of an SCTP association 💀

an M-SCTP_STATUS request primitive lets Layer Management query the local status of a particular SCTP association 👑 SUA simply maps it to an SCTP-STATUS primitive sent to the SCTP layer. when SCTP responds, SUA maps the association status information to an M-SCTP_STATUS confirm primitive. no peer protocol is invoked, so nobody else gets pulled in 🙈

similar LM-to-SUA-to-SCTP and/or SCTP-to-SUA-to-LM primitive mappings can be described for the other SCTP Upper Layer primitives in RFC 2960 [2960], such as INITIALIZE, SET PRIMARY, CHANGE HEARTBEAT, REQUEST HEARTBEAT, GET SRTT REPORT, SET FAILURE THRESHOLD, SET PROTOCOL PARAMETERS, DESTROY SCTP INSTANCE, SEND FAILURE, and NETWORK STATUS CHANGE. alternatively, these SCTP Upper Layer primitives (and Status as well) can be treated, for modeling purposes, 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 information in a received SUA Notify or Error message, respectively. these indications can also be generated based on local SUA events 🎀

an M-ASP_STATUS request primitive lets Layer Management check the status of a particular local or remote ASP. SUA answers with the status in an M-ASP_STATUS confirm primitive, and no SUA peer protocol is invoked. an M-AS_STATUS request does the same job for a particular AS, and SUA responds with an M-AS_STATUS confirm primitive. again, no SUA peer protocol is invoked 🌈

the M-ASP_UP request, M-ASP_DOWN request, M-ASP_ACTIVE request and M-ASP_INACTIVE request primitives let Layer Management at an ASP change state 🔥 when it works out, SUA gives Layer Management a matching confirm primitive. if it doesn't, an Error indication primitive is provided in the primitive. these requests trigger outgoing ASP Up, ASP Down, ASP Active and ASP Inactive messages to the remote SUA peer at an SGP or IPSP.


4.2.1. Receipt of SUA Peer Management Messages

okay so when ASP Up, ASP Down, ASP Active and ASP Inactive messages arrive from a peer SUA and the state actually changes, the SUA layer MAY invoke the matching M-ASP_UP, M-ASP_DOWN, M-ASP_ACTIVE and M-ASP_INACTIVE indication primitives, plus M-AS_ACTIVE, M-AS_INACTIVE, and M-AS_DOWN indication primitives, to the local Layer Management 🦋

M-NOTIFY indication and M-ERROR indication primitives again tell Layer Management what's in a received SUA Notify or Error message 💖 these can also come from local SUA events, just like before.

now for the sending rules, which are kinda important 🫶 all non-Transfer and non-SSNM messages, except BEAT and BEAT Ack, SHOULD be sent with sequenced delivery so the ordering is kept ✨ all non-Transfer messages, except ASPTM, BEAT and BEAT Ack messages, SHOULD be sent on SCTP stream '0'. ASPTM messages MAY be sent on one of the streams carrying data traffic related to the Routing Context(s), to minimize possible 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 State Maintenance

the SUA layer on the SGP keeps track of the state of each remote ASP, in each Application Server that the ASP is set up to receive traffic for 👑 that info feeds the SUA message distribution function. and where IPSPs use SUA in a point-to-point way, the SUA layer in an IPSP keeps track of the state of remote IPSPs 💅

there are two IPSP models, and they differ in how many messages it takes to change an IPSP state. here they are 🍓

  1. IPSP Single Exchange (SE) model. only a single exchange of ASPTM or ASPSM messages is needed to change the IPSP state. so one side sends a request and the other side acknowledges it, and that's enough 🦋
  2. IPSP Double Exchange (DE) model. both IPSPs have to send request messages, and both IPSPs have to acknowledge the request messages from the other end. that means a double exchange of ASPTM and ASPSM messages, one from each end. this setup supports dynamic routing key configuration using RKM messages, the same way as the ASP-SGP scenario 🌈

to keep things interoperable, an SUA implementation that supports IPSP communication MUST support the IPSP SE model, and it MAY implement the IPSP DE model too 🫶

in section 4.3.1: ASP/IPSP States, only the SGP-ASP and the IPSP SE scenarios are described. for the IPSP DE model, both IPSPs MUST follow the SGP side of the SGP-ASP procedures 💜

in section 4.3.2, only the SGP-ASP scenario is described. all the procedures that refer to an AS served by ASPs also apply to ASs served by IPSPs ✨

in section 4.3.3, only the Management procedures for the SGP-ASP scenario are described. the matching Management procedures for IPSPs can be directly inferred 🎀

the remaining sections include specific IPSP Considerations subsections 🌸


4.3.1. ASP States

the state of each remote ASP/IPSP, in each AS it is set up to operate in, is kept in the peer SUA 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. those events include:

  • Reception of messages from the peer SUA layer at the ASP/IPSP;
  • Reception of some messages from the peer SUA layer at other ASPs/IPSPs in the AS (e.g., ASP Active message indicating "Override");
  • Reception of indications from the SCTP layer; or
  • Local Management intervention.

the ASP/IPSP state transition diagram is Figure 1 🦋 the possible states of an ASP/IPSP are:

ASP-DOWN: the remote SUA peer at the ASP/IPSP is unavailable, and/or the related SCTP association is down. every ASP/IPSP starts out in this state. an ASP/IPSP in this state SHOULD NOT be sent any SUA messages, except Heartbeat, ASP Down Ack and Error messages 💀

ASP-INACTIVE: the remote SUA 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 SUA peer at the ASP/IPSP is available and application traffic is active (for a particular Routing Context or set of Routing Contexts) 🔥

Figure 1: ASP/IPSP State Transition Diagram, per AS

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

the transitions in brackets only apply to the IPSP SE model communication, while the rest apply to both ASPs and IPSPs 🌈

SCTP CDI: the SCTP CDI is the local SCTP layer's Communication Down Indication to the Upper Layer Protocol (SUA) on an SGP. the local SCTP layer sends this indication when it detects a loss of connectivity to the ASP's peer SCTP layer. 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 (SUA) on an SG. the local SCTP sends this indication when it detects a restart from the ASP's peer SCTP layer 🌸

4.3.2. AS States ✨

okay bestie, the state of the AS is kept in the SUA layer on the SGP 🧚 and it changes whenever something happens. Two things set it off: ASP state transitions and recovery timer triggers 🔥

  • ASP state transitions
  • Recovery timer triggers

Here are the possible AS states, and they're giving main character energy 👑

AS-DOWN: the Application Server is unavailable 💀 This means every related ASP is in the ASP-DOWN state for this AS. The AS starts out in this state, and an Application Server has to be in AS-DOWN before it can be removed from a configuration 🫶

AS-INACTIVE: the Application Server is available, but no application traffic is active 🌸 One or more related ASPs are in the ASP-INACTIVE state, and none are in the ASP-ACTIVE state. 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 🔥 At least one ASP is in the ASP-ACTIVE state. Literally the vibe we want 💖

AS-PENDING: an active ASP just moved to ASP-INACTIVE or ASP-DOWN, and it was the last active ASP left 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 AS-ACTIVE 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 queueing messages and throw away everything it already queued 🙈 The AS moves to AS-INACTIVE if at least one ASP is in the ASP-INACTIVE state. Otherwise it drops to AS-DOWN.

Figure 2 shows an example AS state machine for when the AS/ASP data is provisioned 🎀 Dynamically created AS/ASP configuration data would give you a different state machine, especially when the AS gets created.

For example, if the AS/ASP configuration data isn't created until the first ASP does Registration, then AS-INACTIVE gets entered directly on the first successful REG REQ from an ASP 💅 Another example: if the data isn't created until the first ASP successfully enters ASP-ACTIVE, then AS-ACTIVE gets entered directly 🍓

Figure 2: AS State Transition Diagram

        +----------+   one ASP trans to ACTIVE   +-------------+
        |    AS-   |---------------------------->|     AS-     |
        | INACTIVE |                             |   ACTIVE    |
        |          |<---                         |             |
        +----------+    \                        +-------------+
           ^   |         \ Tr Expiry,                ^    |
           |   |          \ at least one             |    |
           |   |           \ ASP in ASP-INACTIVE     |    |
           |   |            \                        |    |
           |   |             \                       |    |
           |   |              \                      |    |
   one ASP |   | all ASP       \            one ASP  |    | Last ACTIVE
   trans   |   | trans to       \           trans to |    | ASP trans to
   to      |   | ASP-DOWN        -------\   ASP-     |    | ASP-INACTIVE
   ASP-    |   |                         \  ACTIVE   |    | or ASP-DOWN
   INACTIVE|   |                          \          |    | (start Tr)
           |   |                           \         |    |
           |   |                            \        |    |
           |   v                             \       |    v
        +----------+                          \  +-------------+
        |          |                           --|             |
        | AS-DOWN  |                             | AS-PENDING  |
        |          |                             |  (queueing) |
        |          |<----------------------------|             |
        +----------+    Tr Expiry and no ASP     +-------------+
                        in ASP-INACTIVE state

       Tr = Recovery Timer

4.3.2.1. IPSP Considerations 🦋

the AS state diagram for the AS-SG case also works for IPSP communication 💜

4.3.3. SUA Management Procedures for Primitives ✨

before an SCTP association gets set up, the ASP state at both the SGP and the ASP is assumed to be ASP-DOWN 🌈

once the SCTP association is up (see Section 4.2.1) and the local SUA-User is ready, the local SUA ASP Maintenance (ASPM) function kicks off the relevant procedures 🔥 It uses the ASP Up, ASP Down, ASP Active and ASP Inactive messages to tell the SGP the ASP state (see Section 4.3.4) 🫶

if the SUA layer later gets an SCTP-COMMUNICATION_DOWN or SCTP-RESTART indication primitive from the SCTP layer underneath, it tells Layer Management by invoking the M-SCTP_STATUS indication primitive 😭 The ASP state moves to ASP-DOWN.

for SCTP-COMMUNICATION_DOWN, the SCTP client MAY try to reestablish the SCTP association 🙌 This MAY be done automatically by the SUA layer, or Layer Management MAY reestablish it using the M-SCTP_ESTABLISH request primitive 💖

for an SCTP-RESTART indication at an ASP, the SUA peer now considers that ASP to be in the ASP-DOWN state 💀 If the ASP wants to recover, it has to start 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 it that the ASP SUA peer is available 🌸 The ASP is always the one who starts the ASP Up message. This action MAY be started at the ASP by an M-ASP_UP request primitive from Layer Management, or MAY be started automatically by an SUA management function 🍓

when an ASP Up message arrives at an SGP and, internally, the remote ASP is in the ASP-DOWN state and isn't locked out for local management reasons, the SGP marks the remote ASP as ASP-INACTIVE and tells Layer Management with an M-ASP_Up indication primitive ✨ If the SGP knows from current configuration data which Application Servers the ASP is set up to operate in, it updates the ASP state to ASP-INACTIVE in each AS it belongs to 💜

another option: the SGP may move the ASP into a pool of Inactive ASPs that's available for future configuration within Application Server(s). That gets decided in a later Registration Request or ASP Active procedure 🦋 If the ASP Up message carries an ASP Identifier, the SGP SHOULD save that ASP Identifier for the ASP. The SGP MUST send an ASP Up Ack message in response to a received ASP Up message, even if the ASP is already marked as ASP-INACTIVE at the SGP 🫶

If for any local reason (e.g., management lock-out) the SGP can't respond with an ASP Up Ack message, it responds to the ASP Up message with an Error message with Reason "Refused - Management Blocking" 🙈

at the ASP, the ASP Up Ack message that comes in doesn't get acknowledged 🌈 Layer Management gets told 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 its 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 provisioned, with a default of 2 seconds. Or, retransmission of ASP Up messages MAY be put under control of Layer Management. In that method, T(ack) expiring results in an M-ASP_UP confirm primitive carrying a negative indication 💀

the ASP must wait for the ASP Up Ack message before it sends any other SUA messages (e.g., ASP Active or REG REQ) 🧚 If the SGP gets any other SUA messages before the ASPUP message arrives (other than ASPDN, see Section 4.3.4.2), the SGP SHOULD discard them 🔥

if an ASP Up message comes in and the remote ASP is already in the ASP-ACTIVE state internally, an ASP Up Ack message is returned, along with an Error message ("Unexpected Message), and the remote ASP state changes to ASP-INACTIVE in all relevant Application Servers 🙉

if an ASP Up message comes in and the remote ASP is already in the ASP-INACTIVE state internally, an ASP Up Ack message is returned and that's it, no further action 🍓

4.3.4.1.1. SUA Version Control 🌸

if an ASP Up message arrives with an unsupported version, the receiving end responds with an Error message that says which version it supports, and it notifies Layer Management ✨

this is super useful when protocol version upgrades are happening in a network 🎀 A node that got upgraded to a newer version should still support the older versions that other nodes it talks to are using 🫶 Since ASPs start the ASP Up procedure, the Error message would normally come from the SGP 💅

4.3.4.1.2. IPSP Considerations 🦋

an IPSP may be considered to be in the ASP-INACTIVE state after an ASPUP or ASPUP Ack has been received from it 💜 An IPSP can be considered to be in the ASP-DOWN state after an ASPDN or ASPDN Ack has been received from it. The IPSP may inform Layer Management of the change in the remote IPSP's state using M-ASP_UP or M-ASP_DN indication or confirmation primitives 🌈

another option: when using the IPSP DE model, an interchange of ASP Up messages from each end MUST be performed 😭 Four messages are needed to finish it 🧚

if an IPSP can't respond to an ASP Up message with an ASP Up Ack message, for any local reason (e.g., management lock-out), it responds to the ASP Up message with an Error message with Reason "Refused - Management Blocking" and leaves the remote IPSP in the ASP-DOWN state 🙈

4.3.4.2. ASP Down Procedures 🛬

Okay so bestie, the ASP sends an ASP Down message to an SGP when it wants to bounce from service in every Application Server it's a member of, and it no longer wants to receive any Connectionless or Connection-Oriented, SSNM or ASPTM messages. 💅 This action MAY be initiated at the ASP by an M-ASP_DOWN request primitive from Layer Management or MAY be initiated automatically by an SUA management function. ✨

Whether the ASP gets permanently removed from any AS is a configuration management thing 🗂️. Now, if the ASP used the Registration procedures (see Section 4.4.1) to register within Application Servers but didn't deregister from all of them before sending the ASP Down message, the SGP MUST consider the ASP as deregistered in all Application Servers that it is still a member. No cap, the SGP is doing the cleanup for it 🧹.

The SGP marks the ASP as ASP-DOWN, tells Layer Management with an M-ASP_Down indication primitive, and sends an ASP Down Ack message back 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. Literally no skipping the reply, periodt 💅.

At the ASP, the ASP Down Ack message received is not acknowledged. Layer Management gets told with an M-ASP_DOWN confirm primitive 📬. If the ASP receives an ASP Down Ack without having sent an ASP Down message, the ASP should now consider itself as in the ASP-DOWN state. And if the ASP was previously in the ASP-ACTIVE or ASP_INACTIVE state, the ASP should then start procedures to return itself to its previous state 🔄.

When the ASP sends an ASP Down message it starts timer T(ack) ⏱️. If the ASP doesn't get a response to an ASP Down message within T(ack), the ASP MAY restart T(ack) and resend ASP Down messages until it receives an ASP Down Ack message. T(ack) is provisioned, with a default of 2 seconds. Alternatively, retransmission of ASP Down messages MAY be put under control of Layer Management. In this method, expiry of T(ack) results in an M-ASP_DOWN confirm primitive carrying a negative indication. Ugh, the vibes of a failed handshake are so not it 😭.

4.3.4.3. ASP Active Procedures 🚀

Anytime after the ASP has received an ASP Up Ack message from the SGP or IPSP, the ASP MAY send an ASP Active message to the SGP to say it's ready to start processing traffic 🍓. This action MAY be initiated at the ASP by an M-ASP_ACTIVE request primitive from Layer Management or MAY be initiated automatically by an SUA management function. If an ASP wants to process traffic for more than one Application Server over a common SCTP association, the ASP Active message(s) SHOULD contain a list of one or more Routing Contexts to show which Application Servers the ASP Active message applies to. It's not necessary to include every Routing Context you're interested in within a single ASP Active message, so you don't have to ask to become active in all of them at the same time. Multiple ASP Active messages MAY be used to activate within the Application Servers independently, or in sets. And if an ASP Active message doesn't have a Routing Context parameter, the receiver must know, via configuration data, which Application Server(s) the ASP is a member of. Okay, that's a lot of moving parts, but it's giving organized 🗂️✨.

For the Application Servers where the ASP can be successfully activated, the SGP or IPSP responds with one or more ASP Active Ack messages, including the associated Routing Context(s) and reflecting any Traffic Mode Type value present 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 contained any Routing Contexts. Depending on any Traffic Mode Type request in the ASP Active message, or local configuration data if there's no request, the SGP moves the ASP to the correct ASP traffic state within the associated Application Server(s) 🎯. Layer Management is informed with an M-ASP_Active indication. If the SGP or IPSP gets any Data messages before an ASP Active message is received, the SGP or IPSP MAY discard them 🗑️. By sending an ASP Active Ack message, the SGP or IPSP is now ready to receive and send traffic for the related Routing Context(s). The ASP SHOULD NOT send Data or SSNM messages for the related Routing Context(s) before receiving an ASP Active Ack message, or it will risk message loss. Don't be that person 🙈.

Multiple ASP Active Ack messages MAY be used in response to an ASP Active message containing multiple Routing Contexts, so the SGP or IPSP can acknowledge the ASP Active message independently for different (sets of) Routing Contexts ✨. The SGP or IPSP MUST send an Error message ("Invalid Routing Context") for each Routing Context value that can't be successfully activated.

In the case where an "out-of-the-blue" ASP Active message is received (i.e., the ASP has not registered with the SG, or the SG has no static configuration data for the ASP), the message MAY be silently discarded 👻.

The SGP MUST send an ASP Active Ack message in response to a received ASP Active message from the ASP, if the ASP is already marked in the ASP-ACTIVE state at the SGP 💖.

At the ASP, the ASP Active Ack message received is not acknowledged. Layer Management is informed with an M-ASP_ACTIVE confirm primitive. It's possible for the ASP to receive Data message(s) before the ASP Active Ack message, because the ASP Active Ack and Data messages from an SG or IPSP may be sent on different SCTP streams 🌊. Message loss is possible, 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 timer T(ack) ⏱️. If the ASP doesn't receive a response to an ASP Active message within T(ack), the ASP MAY restart T(ack) and resend ASP Active messages until it receives an ASP Active Ack message. T(ack) is provisioned, with a default of 2 seconds. Alternatively, retransmission of ASP Active messages MAY be put under control of Layer Management. In this method, expiry of T(ack) results in an M-ASP_ACTIVE confirm primitive carrying a negative indication.

There are three modes of Application Server traffic handling in the SGP SUA layer: Override, Loadshare and Broadcast 🎀. When included, the Traffic Mode Type parameter in the ASP Active message indicates the traffic-handling mode to be used in a particular Application Server. If the SGP determines that the mode indicated in an ASP Active message is unsupported or incompatible with the mode currently configured for the AS, the SGP responds with an Error message ("Unsupported / Invalid Traffic Handling Mode") 🙅. If the traffic-handling mode of the Application Server isn't already known via configuration data, then the traffic-handling mode indicated in the first ASP Active message that causes the Application Server state to transition to AS-ACTIVE MAY be used to set the mode.

In the case of 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 considered to be in the ASP-INACTIVE state 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 receiving this Notify MUST consider itself now in the ASP-INACTIVE state, if it's not already aware of this via inter-ASP communication with the Overriding ASP. Overthrow energy, iconic 💅.

In the case of a Loadshare mode AS, when an SGP or IPSP receives an ASP Active message, traffic gets directed to the ASP that sent it, in addition to all the other ASPs that are currently active in the AS 🧺. The algorithm at the SGP for loadsharing traffic within an AS across all the active ASPs is implementation dependent. It could, for example, be round robin, or based on information in the Data message (e.g., the SLS or SSN) 🎲. An SGP or IPSP, upon receiving an ASP Active message for the first ASP in a Loadshare AS, MAY choose not to direct traffic to a newly active ASP until it determines that there are sufficient resources to handle the expected load (e.g., until there are "n" ASPs in state ASP-ACTIVE in the AS). All ASPs within a load-sharing mode AS must be able to process any Data message received for the AS, so they can handle any potential fail-over or rebalancing of the offered load 🛟.

In the case of a Broadcast mode AS, when an SGP or IPSP receives an ASP Active message, traffic gets directed to the ASP that sent it, plus all the other ASPs that are currently active in the AS 📣. The algorithm at the SGP for broadcasting traffic within an AS to all the active ASPs is a simple broadcast algorithm, where every message is sent to each of the active ASPs. An SGP or IPSP, upon receiving an ASP Active message for the first ASP in a Broadcast AS, MAY choose not to direct traffic to a newly active ASP until it determines that there are sufficient resources to handle the expected load (e.g., until there are "n" ASPs in state ASP-ACTIVE in the AS).

Whenever an ASP in a Broadcast mode AS becomes ASP-ACTIVE, the SGP MUST tag the first DATA message broadcast in each traffic flow with a unique Correlation Id parameter 🏷️. The whole point of this Correlation Id is to let the newly active ASP line up its processing of traffic in each traffic flow with the other ASPs in the broadcast group. Synchronization era 🤝.

4.3.4.3.1. IPSP Considerations 🧚

Either of the IPSPs can initiate communication. When an IPSP receives an ASP Active, it should mark the peer as ASP-ACTIVE and return an ASP Active Ack message. An ASP receiving an ASP Active Ack message may mark the peer as ASP-Active, if it's not 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 for completion 💫.

4.3.4.4. ASP Inactive Procedures 🌙

okay so when an ASP wants to stop receiving traffic within an AS, or it's starting the whole deactivation process, it sends an ASP Inactive message to the SGP or IPSP. this one is a big deal 💅

An ASP Inactive message MUST be always responded by the peer (although other messages may be sent in the middle):

  • If the corresponding RK is registered (statically or dynamically), the peer should respond with an ASP Inactive Ack message. 💖
  • If the RK is not registered, or the RC information is not valid, the peer must respond with an ERROR message with Error Code = "Invalid Routing Context". 🙈
  • If the RC is missing and its specification is needed according to the used configuration, the peer must respond with an ERROR message with Error Code = "No Configured AS for ASP". 💀

The action of sending the ASP Inactive message MAY be initiated at the ASP by an M-ASP_INACTIVE request primitive from Layer Management or MAY be initiated automatically by an SUA management function. ✨ In the case where an ASP is processing the traffic for more than one Application Server across a common SCTP association, the ASP Inactive message contains one or more Routing Contexts to indicate for which Application Servers the ASP Inactive message applies. 🎀

In the case where an ASP Inactive message does not contain a Routing Context parameter, the receiver must know, via configuration data, which Application Servers the ASP is a member and move the ASP to the ASP-INACTIVE state in each all Application Servers. 🧚

In the case of an Override mode AS, where another ASP has already taken over the traffic within the AS with an ASP Active ("Override") message, the ASP that sends the ASP Inactive message is already considered by the SGP to be in state ASP-INACTIVE. An ASP Inactive Ack message is sent to the ASP, after ensuring that all traffic is stopped to the ASP. 👑

In the case of a Loadshare mode AS, the SGP moves the ASP to the ASP-INACTIVE state and the AS traffic is reallocated across the remaining ASPs in the state ASP-ACTIVE, as per the loadsharing algorithm currently used within the AS. A Notify message ("Insufficient ASP resources active in AS") MAY be sent to all inactive ASPs, if required. An ASP Inactive Ack message is sent to the ASP after all traffic is halted and Layer Management is informed with an M-ASP_INACTIVE indication primitive. 🔥

In the case of a Broadcast mode AS, the SGP moves the ASP to the ASP-INACTIVE state and the AS traffic is broadcast only to the remaining ASPs in the state ASP-ACTIVE. A Notify message ("Insufficient ASP resources active in AS") MAY be sent to all inactive ASPs, if required. An ASP Inactive Ack message is sent to the ASP after all traffic is halted and Layer Management is informed with an M-ASP_INACTIVE indication primitive. 🌈

Multiple ASP Inactive Ack messages MAY be used in response to an ASP Inactive message containing multiple Routing Contexts, allowing the SGP or IPSP to independently acknowledge for different (sets of) Routing Contexts. The SGP or IPSP sends an Error message ("Invalid Routing Context") message for each invalid or not configured Routing Context value in a received ASP Inactive message. 🦋

The SGP MUST send an ASP Inactive Ack message in response to a received ASP Inactive message from the ASP and the ASP is already marked as ASP-INACTIVE at the SGP. 🫶

At the ASP, the ASP Inactive Ack message received is not acknowledged. Layer Management is informed with an M-ASP_INACTIVE confirm primitive. If the ASP receives an ASP Inactive Ack without having sent an ASP Inactive message, the ASP should now consider itself as in the ASP-INACTIVE state. If the ASP was previously in the ASP-ACTIVE state, the ASP should then initiate procedures to return itself to its previous state. 🍓

When the ASP sends an ASP Inactive message it starts timer T(ack). If the ASP does not receive a response to an ASP Inactive message within T(ack), the ASP MAY restart T(ack) and resend ASP Inactive messages until it receives an ASP Inactive Ack message. T(ack) is provisioned, with a default of 2 seconds. Alternatively, retransmission of ASP Inactive messages MAY be put under control of Layer Management. In this method, expiry of T(ack) results in a M-ASP_Inactive confirm primitive carrying a negative indication. ⭐

If no other ASPs in the Application Server are in the state ASP-INACTIVE, wait, sorry, I mean: if no other ASPs in the Application Server are in the state ASP-ACTIVE, the SGP MUST send a Notify message ("AS-Pending") to all of the ASPs in the AS which are in the state ASP-INACTIVE. The SGP SHOULD start buffering the incoming messages for T(r) seconds, after which messages MAY be discarded. T(r) is configurable by the network operator. If the SGP receives an ASP Active message from an ASP in the AS before expiry of T(r), the buffered traffic is directed to that ASP and the timer is cancelled. If T(r) expires, the AS is moved to the AS-INACTIVE state. 🌸

4.3.4.4.1. IPSP Considerations 🧠

An IPSP may be considered in the ASP-INACTIVE state by a remote IPSP after an ASP Inactive or ASP Inactive Ack message has been received from it. 🫧

Alternatively, when using IPSP DE model, an interchange of ASP Inactive messages from each end MUST be performed. Four messages are needed for completion. 🤝

4.3.4.5. Notify Procedures 📣

A Notify message reflecting a change in the AS state MUST be sent to all ASPs in the AS, except those in the ASP-DOWN state, with appropriate Status Information and any ASP Identifier of the failed ASP. At the ASP, Layer Management is informed with an M-NOTIFY indication primitive. The Notify message must be sent whether the AS state change was a result of an ASP failure or reception of an ASP State management (ASPSM) / ASP Traffic Management (ASPTM) message. In the second case, the Notify message MUST be sent after any ASP State or Traffic Management related acknowledgement messages (e.g., ASP Up Ack, ASP Down Ack, ASP Active Ack, or ASP Inactive Ack). 🔔

In the case where a Notify ("AS-PENDING") message is sent by an SGP that now has no ASPs active to service the traffic, or where a Notify ("Insufficient ASP resources active in AS") message MUST be sent in the Loadshare or Broadcast mode, the Notify message does not explicitly compel the ASP(s) receiving the message to become active. The ASPs remain in control of what (and when) traffic action is taken. 🕊️

In the case where a Notify message does not contain a Routing Context parameter, the receiver must know, via configuration data, of which Application Servers the ASP is a member and take the appropriate action in each AS. 💜

4.3.4.5.1. IPSP Considerations (NTFY) 🌷

Notify works in the same manner 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 do not have their own heartbeat mechanism for detecting loss of the transport association (i.e., other than SCTP). 🫀

Either SUA peer may optionally send Heartbeat messages periodically, subject to a provisioned timer T(beat). Upon receiving a Heartbeat message, the SUA peer MUST respond with a Heartbeat Ack message. 🏃‍♀️

If no Heartbeat Ack message (or any other SUA message) is received from the SUA peer within 2*T(beat), the remote SUA peer is considered unavailable. Transmission of Heartbeat messages is stopped and the signalling process SHOULD attempt to reestablish communication if it is configured as the client for the disconnected SUA peer. 📞

The Heartbeat message may optionally contain an opaque Heartbeat Data parameter that MUST be echoed back unchanged in the related Heartbeat Ack message. The sender, upon examining the contents of the returned Heartbeat Ack message, MAY choose to consider the remote SUA peer as unavailable. The contents/format of the Heartbeat Data parameter is implementation-dependent and only of local interest to the original sender. The contents may be used, for example, to support a Heartbeat sequence algorithm (to detect missing Heartbeats), and/or a timestamp mechanism (to evaluate delays). ⏱️

Note: Heartbeat related events are not shown in Figure 2 "ASP state transition diagram". 🙈

4.4. Routing Key Management Procedures 🔑

4.4.1. Registration 💖

Okay bestie, so an ASP is allowed (MAY) to dynamically register itself with an SGP as an ASP inside an Application Server, using the REG REQ message 🎀. A Routing Key parameter in that REG REQ tells the SGP what the Routing Key is all about ✨.

The SGP then 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 (MAY) let the ASP join the AS 🫶. Or, if the Routing Key doesn't exist yet but the data is valid and unique, an SGP that supports dynamic configuration may (MAY) create 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 original request and a Registration Result of "Successfully Registered" 🌈. The SGP 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 has to be guaranteed unique for each Application Server or Routing Key the SGP supports, no exceptions 💅.

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

If the SGP doesn't support the registration procedure at all, it sends an Error message to the ASP with the error code "Unsupported Message Type" 🙈.

If the SGP decides a unique Routing Key can't be created, it sends a Registration Response with a Registration Status of "Error - Cannot Support Unique Routing" 😭. Also, an incoming signalling message that reaches an SGP should not match against more than one Routing Key 🔥.

If the SGP doesn't authorize the registration request, it returns a REG RSP message to the ASP with the Registration Result "Error - Permission Denied" 🚫.

If the SGP sees that a received Routing Key doesn't exist yet, and it doesn't support dynamic configuration, it returns a Registration Response with "Error - Routing Key not Currently Provisioned" 🍓.

If the SGP sees that a received Routing Key doesn't exist yet, and it does support dynamic configuration but doesn't have the room to add new Routing Key and Application Server entries, the Registration Response comes back with "Error - Insufficient Resources" 🥲.

If the SGP decides that one or more of the Routing Key parameters aren't supported for creating new Routing Key entries, the Registration Response says "Error - Unsupported RK parameter field" ✨. This result may (MAY) be used if, for example, the SGP doesn't support the RK Address parameter 🦋.

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 configured for the matching Application Server 🙅‍♀️.

An ASP can register multiple Routing Keys in one go by putting a bunch of Routing Key parameters into a single REG REQ message 🍰. The SGP may (MAY) answer all of those in a single REG RSP message, with a separate Registration Result parameter for each Routing Key showing whether it worked or flopped 💜. Or the SGP may (MAY) reply with multiple REG RSP messages instead, each carrying one or more Registration Result parameters 🌸. The ASP uses the Local-RK-Identifier parameter to match up requests with responses, so it knows which is which 🧠.

An ASP may (MAY) also modify a Routing Key that already exists, by including a Routing Context parameter in the REG REQ 🔧. If the SGP figures out that the Routing Context applies to an existing Routing Key, the SG may (MAY) adjust that Routing Key so it matches the new info in the Routing Key parameter ✨. If the SGP won't accept the change, it sends back a Registration Response of "Routing Key Change Refused" 🙅.

Last but definitely not least, once an ASP successfully registers in an AS, the SGP can now send related SS7 Signalling Network Management messaging 📡. The one catch is if that messaging already started when the ASP moved into the ASP-INACTIVE state, in which case it doesn't start again 🤭.


4.4.2. Deregistration 🫧

An ASP may (MAY) dynamically deregister from an SGP as an ASP inside an Application Server, using the DEREG REQ message 👋. A Routing Context parameter in the DEREG REQ 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's a member of before it tries to move to the ASP-Down state 💅.

The SGP looks at the Routing Context parameter it got and checks that the ASP is actually registered in the Application Server(s) linked to the included Routing Context(s) 🔍. 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 SGP 🤍. Other ASPs might still be hanging out in that Application Server, so the Routing Key data SHOULD NOT be deleted in that case 🫶. But if a deregistration leaves an Application Server with no ASPs at all, the SGP may (MAY) delete the Routing Key data 🗑️.

The SGP acknowledges the deregistration request by sending a DEREG RSP message back to the ASP that asked 📨. The outcome is in the Deregistration Result parameter, which shows success or failure along with the cause 💌.

An ASP may (MAY) deregister several Routing Contexts at once by including a bunch of them in a single DEREG REQ message 🍓. The SGP may (MAY) reply to each deregistration request in a single DEREG RSP message, with a separate Deregistration Result parameter for each Routing Context showing its result 🎀.


4.4.3. IPSP Considerations (REG/DEREG) 🌷

The Registration and Deregistration procedures work for IPSPs exactly the same way they do in the AS-SG cases 🤝. An IPSP may (MAY) register an RK in the remote IPSP 🛰️. And an IPSP is responsible for deregistering the RKs it has registered 🧹.


4.5. Availability and/or Congestion Status of SS7 Destination Support 🚦

4.5.1. At an SGP 🏠

When the SGP gets an N-STATE, N-PCSTATE, or N-INFORM indication primitive from the nodal interworking function, the SGP SUA layer sends a matching SS7 Signalling Network Management (SNM) DUNA, DAVA, SCON, or DUPU message (see Section 3.4) to the SUA peers at the concerned ASPs 📣. The SUA layer must fill in the various fields of those SNM messages so they're consistent with what came in through the primitives 🧾.

The SGP SUA layer figures out which concerned ASPs need to be told by looking at the specific SS7 network the primitive indication is relevant to 🗺️. That way, every ASP configured to send and receive traffic within a particular network appearance gets informed 🎯. If the SGP runs within a single SS7 network appearance, then all ASPs get informed 🙌.

DUNA, DAVA, SCON, and DRST messages are sent in order and processed at the receiver in the same order they were sent 📬. SCTP stream 0 SHOULD NOT be used for these 🚫. The Unordered bit in the SCTP DATA chunk MAY be used for the SCON message 🪄.

Sequencing isn't required for DUPU or DAUD messages, which MAY be sent unordered 🌀. For those, SCTP stream 0 is used, and the Unordered bit in the SCTP DATA chunk can optionally be used 🫧.

4.5.2. At an ASP 💌

4.5.2.1. Single SG Configurations 🎈

At an ASP, when it gets an SS7 Signalling Network Management (SSNM) message from the remote SUA Peer, the SUA layer passes the right primitive indications up to the resident SUA-Users 📲. Local management gets informed too 🧑‍💻.

If a local event causes SS7 destinations to become unavailable or congested, the SUA layer at the ASP SHOULD pass up the appropriate indications in the primitives to the SUA User, as though equivalent SSNM messages had arrived 🪞. For example, losing an SCTP association to an SGP may make a set of SS7 destinations unavailable 💔. In that case, N-PCSTATE indication primitives to the SUA User are the right move 💫.

Implementation Note: To accomplish this, the SUA layer at an ASP maintains the status of routes via the SG. 🛠️

4.5.2.2. Multiple SG Configurations 🧩

At an ASP, when it gets a Signalling Network Management message from the remote SUA Peer, the SUA layer updates the status of the affected route(s) via the originating SG 🔄. It then figures out whether the overall availability or congestion status of the effected destination(s) has changed 🕵️‍♀️. If it has, the SUA layer passes the appropriate primitive indications up to the resident SUA-Users 🚀. And yes, local management gets informed 💖.

4.5.3. ASP Auditing 🔍✨

okay so an ASP can optionally go "hey bestie, what's the vibe with this SS7 destination?" 💅 It does that by sending a Destination Audit (DAUD) message to an SGP. The DAUD asks for the current availability and, if the national congestion method with multiple congestion levels and message priorities is in use, the congestion status of one SS7 destination or a whole set of them. 🫶

The DAUD message MAY be sent unordered. The ASP MAY send the DAUD in these cases:

  • Periodic. A Timer that got 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 Code. 🕰️ The Timer resets 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 isolated from an SGP for an extended period. 🧳 The ASP MAY request the availability/congestion status of one or more SS7 destinations it expects to talk to.
Implementation Note: In the first of the cases above, the auditing procedure must not be invoked for the case of a received SCON message containing a congestion level value of "no congestion" or undefined" (i.e., congestion Level = "0"). 🙈 This is because the value indicates either congestion abatement or that the ITU MTP3 international congestion method is being used. In the international congestion method, the MTP3 layer at the SGP does not maintain the congestion status of any destinations, so the SGP cannot provide any congestion information in response to the DAUD. For the same reason, in the second of the cases above a DAUD message cannot reveal any congested destination(s).

The SGP SHOULD respond to a DAUD message with the availability and congestion status of the subsystem. 📬 The status of each SS7 destination or subsystem requested shows up in a DUNA message (if unavailable), a DAVA message (if available), or a DRST (if restricted and the SGP supports this feature). If the SS7 destination or subsystem is available and congested, the SGP responds with an SCON message in addition to the DAVA message. If the SS7 destination or subsystem is restricted and congested, the SGP responds with an SCON message in addition to the DRST. If the SGP has no information on the availability / congestion status of the SS7 destination or subsystem, the SGP responds with a DUNA message, since it has no routing information to route traffic to this destination or subsystem. 🚫

An SG MAY refuse to provide the availability or congestion status of a destination or subsystem if, for example, the ASP is not authorized to know the status of the destination or subsystem. 🔐 The SG MAY respond with an Error Message (Error Code = "Destination Status Unknown") or Error Message (Error Code = "Subsystem Status Unknown").


4.6. MTP3 Restart 🔄

In the case where the MTP3 in the SG undergoes an MTP restart, event communication SHOULD be handled as follows:

When the SG discovers 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 completed the MTP Restart procedure, the SUA layer at the SGPs informs all concerned ASPs in the ASP-ACTIVE state of any available/restricted SS7 destinations using the DAVA/DRST message. No message is necessary for those destinations still unavailable after the restart procedure.

When the SUA layer at an ASP receives a DUNA message indicating SS7 destination unavailability at an SG, SCCP Users will receive an N-PCSTATE indication and will stop any affected traffic to this destination. 🛑 When the SUA receives a DAVA/DRST message, SCCP Users will receive an N-PCSTATE indication and can resume traffic to the newly available SS7 destination via this SGP, provided the ASP is in the ASP-ACTIVE state toward this SGP. 🎉

The ASP MAY choose to audit the availability of unavailable destinations by sending DAUD messages. 🕵️‍♀️ This would be the case, for example, when an AS becomes active at an ASP and does not 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 received an indication that the destination became available or restricted. 🙃


4.7. SCCP - SUA Interworking at the SG 🧩

4.7.1. Segmenting / Reassembly ✂️

When it is expected that signalling messages will not fit into a PDU of the most restrictive transport technology used (e.g., 272-SIF of MTP3), then segmenting/reassembly could be performed at the SG, ASP or IPSP. 📦 If the SG, ASP or IPSP is incapable of performing a necessary segmentation/reassembly, it can inform the peer of the failure using the appropriate error in a CLDR or RESRE/COERR message.

4.7.2. Support for Loadsharing ⚖️

Within an AS (identified by RK/RC parameters) several loadsharing ASPs may be active. 👯

However, to assure the correct processing of TCAP transactions or SCCP connections, the loadsharing scheme used at the SG must make sure that messages continuing or ending the transactions/connections arrive at the same ASP where the initial message (TC_Query, TC_Begin, CR) was sent to/received from. 🎯

When the ASP can be identified uniquely based on RK parameters (e.g., unique DPC or GT), loadsharing is not required. When the ASPs in the AS share state or use an internal distribution mechanism, the SG must only take into account the in-sequence-delivery requirement. In case of SCCP CO traffic, when the coupled approach is used, loadsharing of messages other than CR is not required.

If these assumptions cannot be made, both SG and ASP should support the following general procedure in a loadsharing environment. 🛠️

4.7.2.1. Association Setup, ASP going active 🚀

After association setup and registration, an ASP normally goes active for each AS it registered for. In the ASPAC message, the ASP includes a TID and/or DRN Label Parameter, if applicable for the AS in question. All the ASPs within the AS must specify a unique label at a fixed position in the TID or DRN parameter. 🏷️ The same ASPAC message is sent to each SG used for interworking with the SS7 network.

The SG builds, per RK, a list of ASPs that have registered for it. The SG can now build up and update a distribution table for a certain Routing Context, any time the association is (re-)established and the ASP goes active. 📋 The SG has to perform some trivial plausibility checks on the parameters:

  • Start and End parameters values are between 0 and 31 for TID.
  • Start and End parameters values are between 0 and 23 for DRN.
  • 0 < (Start - End + 1) <= 16 (label length maximum 16-bit)
  • Start values are the same for each ASP within a RC.
  • End values are the same for each ASP within a RC.
  • TID and DRN Label values must be unique across the RC.

If any of these checks fail, the SG refuses the ASPAC request, with an error, "Invalid loadsharing label." 🚫💔

4.7.3. Routing and message distribution at the SG 📬

4.7.3.1. TCAP traffic 📞

Messages not containing a destination (or "responding") TID, i.e., Query, Begin, Unidirectional, are loadshared among the available ASPs. Any scheme permitting a fair load distribution among the ASPs is allowed (e.g., round robin). 🎡

When a destination TID is present, the SG extracts the label and selects the ASP that corresponds with it. 🔍

If an ASP is not available, the SG may generate (X)UDTS "routing failure", if the return option is used. 🔁

4.7.3.2. SCCP Connection Oriented traffic 🔗

Messages not containing a destination reference number (DRN), i.e., a Connection Request, MAY be loadshared among the available ASPs. The load distribution mechanism is an implementation issue. When a DRN is present, the SG extracts the label and selects the ASP that corresponds with it. If an ASP is not available, the SG discards the message. 🗑️

4.7.4. Multiple SGs, SUA Relay Function 🌐

It is important that each ASP send its unique label (within the AS) to each SGP. 💌 For better robustness against association failures, the SGs MAY cooperate to provide alternative routes toward an ASP. Mechanisms for SG cooperation/coordination are outside of the scope of this document.


5. Examples of SUA Procedures 🎀

The following sequence charts overview the procedures of SUA. These are meant as examples, they do not, in and of themselves, impose additional requirements upon an instance of SUA. 📖

5.1. SG Architecture 🏛️

The sequences below outline logical steps for a variety of scenarios within a SG architecture. Please note that these scenarios cover a Primary/Backup configuration. 💁‍♀️ Where there is a load-sharing configuration then the SGP can declare availability when 1 ASP issues ASPAC but can only declare unavailability when all ASPs have issued ASPIA.

5.1.1. Establishment of SUA connectivity 🤝

The following is established before traffic can flow. ✨

Each node is configured (via MIB, for example) with the connections that need to be setup.

 ASP-a1            ASP-a2                SG                  SEP
(Primary)           (Backup)
   |------Establish SCTP Association------|
                      |--Estab. SCTP Ass--|
                                          |--Align SS7 link---|
   +----------------ASP Up---------------->
   <--------------ASP Up Ack--------------+
                      +------ASP Up------->
                      <---ASP Up Ack------+
   +-------------ASP Active--------------->
   <----------ASP Active Ack--------------+
   <----------NTFY (ASP Active)-----------+
                      <-NTFY (ASP Active)-+
                                          +--------SSA-------->
                                          <--------SSA--------+
   <-----------------DAVA-----------------+
   +-----------------CLDT----------------->
                                          +--------UDT-------->

5.1.2. Fail-over scenarios 🦋

The following sequences address fail-over of SEP and ASP. 💫

5.1.2.1. SEP Fail-over 🌧️➡️🌤️

The SEP knows that the SGP is 'concerned' about its availability. Similarly, the SGP knows that ASP-a1 is concerned about the SEPs availability. 🫣

  ASP-a1            ASP-a2                SG                  SEP
(Primary)           (Backup)
                                           <--------SSP--------+
    <-----------------DUNA-----------------+
    +-----------------DAUD----------------->
                                           +--------SST-------->

5.1.2.2. Successful ASP Fail-over scenario ✨

okay so this one is a successful fail-over, bestie 🦋 ASP-a1 is the Primary and ASP-a2 is the Backup, and the switch goes from one to the other. while the switch is happening, the SGP buffers any incoming data messages from the SEP and forwards them once the Backup is ready. no messages just vanish 🫶

  ASP-a1            ASP-a2                SG                  SEP
(Primary)           (Backup)
    +-------------ASP Inactive------------->
    <-----------ASP Inactive ACK-----------+
    <--------------------NTFY (AS Pending)-+
                       <-NTFY (AS Pending)-+
                       +----ASP Active----->
                       <--ASP Active Ack---+
                       <-NTFY (AS Active)--+
    <----------NTFY (AS Active)------------+

5.1.2.3. Unsuccessful ASP Fail-over scenario 💀

this is the sad version, where the Backup never shows up 😭 the first steps are the same, but then the timeout kicks in. after some time has passed, the SEP gets an SSP and answers with an SST, and the AS ends up Inactive. the diagram is below, so you can see it play out.

  ASP-a1            ASP-a2                SG                  SEP
(Primary)           (Backup)
    +-------------ASP Inactive------------->
    <-----------ASP Inactive ACK-----------+
    <--------------------NTFY (AS Pending)-+
                      <--NTFY (AS Pending)-+
          After some time elapses (i.e., timeout).
                                           +--------SSP-------->
                                           <--------SST--------+
    <-------------------NTFY (AS Inactive)-+
                      <-NTFY (AS Inactive)-+

5.2. IPSP Examples 🎀

these sequences lay out the logical steps for a bunch of different scenarios inside an IP-IP architecture. heads up that these scenarios all cover a Primary/Backup setup. if you have a load-sharing setup instead, the AS can declare availability once 1 ASP sends ASPAC, but it can only declare unavailability once every ASP has sent ASPIA. 💅

5.2.1. Establishment of SUA connectivity 🌸

here's an example of how SUA connectivity gets set up. each IPSP has an Application Server and two ASPs, and everything has to be in place before SUA traffic can flow. the connectionless flow is shown because it's simpler 🧚

first, establish SCTP connectivity as per RFC 2960. SCTP connections are bidirectional, so keep that in mind. the endpoint that sets up SCTP connectivity MUST also set up UA connectivity (see RFC 2960, section 5.2.1 for handling collisions) [2960].

IP SEP A                                                  IP SEP B
AS A                                                          AS B
ASP-a1     ASP-a2                                 ASP-b2    ASP-b1

[All ASPs are in the ASP-DOWN state]

+-------------------------------ASP Up-------------------------->
<-----------------------------ASP Up Ack------------------------+

              +--------------ASP Up--------------->
              <------------ASP Up Ack-------------+

+---------------------------ACTIVE------------------------------->
<-------------------------ACTIVE Ack-----------------------------+

[Traffic can now flow directly between ASPs]

+-----------------------------CLDT------------------------------->

5.2.2. Fail-over scenarios 🦋

these sequences cover what happens when an ASP fails over.

5.2.2.1. Successful ASP Fail-over scenario ✨

this is a successful fail-over, where it goes from ASP-a1 to ASP-a2, so Primary to Backup. data moves directly between peer ASPs here, which means ASP-b1 gets told that ASP-a1 failed over. until ASP-a2 is available, ASP-b1 buffers its outgoing data messages 🫶

IP SEP A                                                  IP SEP B
ASP-a1     ASP-a2                                 ASP-b2    ASP-b1

+-----------------------------ASP Inact------------------------>
<---------------------------ASP Inact Ack----------------------+
           <---------------NTFY (ASP-a1 Inactive)--------------+
           +---------------------ASP Act----------------------->
           <-------------------ASP Act Ack---------------------+

5.2.2.2. Unsuccessful ASP Fail-over scenario 💀

this one follows 5.2.2.1, except the backup never comes in, so the Notify messages that would announce the backup is available are never sent 😭

6. Security Considerations 🔒

the security considerations from the 'Security Considerations for SIGTRAN Protocols' [3788] document apply to this document, and they are serious business 💜

7. IANA Considerations 🌈

7.1. SCTP Payload Protocol ID 🍓

IANA has assigned a SUA value for the Payload Protocol Identifier in the SCTP DATA chunk. the SUA value is registered like this:

   SUA    "4"

the SCTP Payload Protocol Identifier value "4" SHOULD be included in each SCTP DATA chunk, to show that SCTP is carrying the SUA protocol. the value "0" (unspecified) is also allowed, but any other values MUST not be used. this Payload Protocol Identifier isn't directly used by SCTP, but it MAY be used by certain network entities to figure out what kind of information a DATA chunk is carrying.

the User Adaptation peer MAY use the Payload Protocol Identifier to work out extra information about the data SCTP hands it.

7.2. Port Number 🎀

IANA has registered SCTP Port Number 14001 for SUA. it is recommended that SGPs use this SCTP port number to listen for new connections. SGPs MAY also use statically configured SCTP port numbers instead ✨

7.3. 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 and using new message classes, types and parameters is a core part of SIGTRAN adaptation layers, so IANA assigns these extensions through an IETF Consensus action as defined in [2434]. 💅

the proposed extension MUST in no way adversely affect the general working of the protocol 🫶

IANA has created a new registry so the protocol can be extended.

7.3.1. IETF Defined Message Classes 🌸

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

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

7.3.2. IETF Defined Message Types 🦋

documentation for a message type MUST contain 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 of 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 gets a message type it doesn't support, it MUST respond with an Error (ERR) message, with an Error Code = Unsupported Message Type 💀

7.3.4. IETF-defined TLV Parameter Extension 👑

documentation for a 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 earlier in the document.
  • (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 type.

8. Timer Values ⏰

Ta                                      2 seconds
Tr                                      2 seconds
T(ack)                                  2 seconds
T(ias)    Inactivity Send timer         7 minutes
T(iar)    Inactivity Receive timer      15 minutes
T(beat)   Heartbeat Timer               30 seconds

9. Acknowledgements 💖

the authors want to thank (in alphabetical order) Richard Adams, Javier Pastor-Balbas, Andrew Booth, Martin Booyens, F. Escobar, S. Furniss Klaus Gradischnig, Miguel A. Garcia, Marja-Liisa Hamalainen, Sherry Karl, S. Lorusso, Markus Maanoja, Sandeep Mahajan, Ken Morneault, Guy Mousseau, Chirayu Patel, Michael Purcell, W. Sully, Michael Tuexen, Al Varney, Tim Vetter, Antonio Villena, Ben Wilson, Michael Wright and James Yu for their insightful comments and suggestions 🫶

10. References 📚

10.1. Normative References

[1123] Braden, R., Ed., "Requirements for Internet Hosts - Application and Support", STD 3, RFC 1123, October 1989.

[2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[2960] 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.

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

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

[ANSI SCCP] ANSI T1.112 "Signalling System Number 7 - Signalling Connection Control Part".

[ITU SCCP] ITU-T Recommendations Q.711-714, "Signalling System No. 7 (SS7) - Signalling Connection Control Part (SCCP)." ITU-T Telecommunication Standardization Sector of ITU, formerly CCITT, Geneva (July 1996).

10.2. Informative References

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

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

[3761] Falstrom, P. and M. Mealling, "The E.164 to Uniform Resource Identifiers (URI) Dynamic Delegation Discovery System (DDDS) Application (ENUM)", RFC 3761, April 2004.

[ANSI TCAP] ANSI T1.114 'Signalling System Number 7 - Transaction Capabilities Application Part'

[ITU TCAP] ITU-T Recommendation Q.771-775 'Signalling System No. 7 SS7) - Transaction Capabilities (TCAP).'

[RANAP] 3G TS 25.413 V3.5.0 (2001-03) 'Technical Specification 3rd Generation Partnership Project; Technical Specification Group Radio Access Network; UTRAN Iu Interface RANAP Signalling'

Appendix A. Signalling Network Architecture 🧠

A.1. Generalized Peer-to-Peer Network Architecture 🌐

Okay, so Figure 3 is an example network setup that can handle robust operation and fail-over, which is basically the networking version of having a backup plan for your backup plan 💅. The AS needs some management resources to keep traffic under control.

   ***********
   *   AS1   *
   * +-----+ * SCTP Associations
   * |ASP1 +-------------------+
   * +-----+ *                 |                   ***********
   *         *                 |                   *   AS3   *
   * +-----+ *                 |                   * +-----+ *
   * |ASP2 +-----------------------------------------+ASP1 | *
   * +-----+ *                 |                   * +-----+ *
   *         *                 |                   *         *
   * +-----+ *                 |                   * +-----+ *
   * |ASP3 | *            +--------------------------+ASP2 | *
   * +-----+ *            |    |                   * +-----+ *
   ***********            |    |                   ***********
                          |    |
   ***********            |    |                   ***********
   *   AS2   *            |    |                   *   AS4   *
   * +-----+ *            |    |                   * +-----+ *
   * |ASP1 +--------------+    +---------------------+ASP1 | *
   * +-----+ *                                     * +-----+ *
   *         *                                     *         *
   * +-----+ *                                     * +-----+ *
   * |ASP2 +-----------------------------------------+ASP1 | *
   * +-----+ *                                     * +-----+ *
   *         *                                     ***********
   * +-----+ *
   * |ASP3 | *
   * +-----+ *
   *         *
   ***********

              Figure 3: Generalized Architecture

In this example, the Application Servers are drawn inside one logical box, with the ASPs living inside them. In reality, an AS could be spread across several hosts 🧚. In that case, the host should share state so things survive a failure. That's out of scope for this protocol, so it's not on us 🙈. Also, in a distributed system, one ASP could be registered to more than one AS. This document doesn't restrict those systems, though that case is not specified ✨.

A.2. Signalling Gateway Network Architecture 🌉

When SS7 and IP domains need to talk to each other, the SGP is the gateway node sitting between the SS7 network and the IP network 🦋. The SGP carries SCCP-user signalling traffic from the SS7 side over to IP-based signalling nodes (like IP-resident Databases, for example). You can think of the Signalling Gateway as a group of Application Servers with extra skills for talking to an SS7 network 💜.

The SUA protocol should be flexible enough to support different configurations and transport technologies, so network operators can hit their operation, management and performance goals 🎀.

An ASP may be connected to multiple SGPs (see Figure 4) 👑. In that setup, a particular SS7 destination could be reachable through more than one SG, which means more than one route. Since proper SLS selection, loadsharing, and SG selection based on point code availability all happen at the ASP, the ASP needs to keep track of the status of each distant SGP it talks to, based on the SG it might route through 🔥.

   Signalling Gateway
                            SCTP Associations
      +----------+                                       **************
      | SG1      |                                       *  AS3       *
      | ******** |                                       *  ********  *
      | * SGP11+--------------------------------------------+ ASP1 *  *
      | ******** |                                 /     *  ********  *
      | ******** |                                 |     *  ********  *
      | * SGP12+--------------------------------------------+ ASP2 *  *
      | ******** |                   \           / |     *  ********  *
      +----------+                    \          | |     *      .     *
                                       \         | |     *      .     *
      +----------                       \        | |     *      .     *
      | SG2      |                       \       | |     *      .     *
      | ******** |                        \      | |     *  ********  *
      | * SGP21+---------------------------------+-+     *  * ASPN *  *
      | ******** |                          \            *  ********  *
      | ******** |                           \           **************
      | * SGP22+---+--+                       \
      | ******** | |  |                        \         **************
      +----------+ |  |                         \        *  AS4       *
                   |  |                          \       *  ********  *
                   |  +-------------------------------------+ ASP1 *  *
                   |                                     *  ********  *
                   |                                     *      .     *
                   |                                     *      .     *
                   |                                     *            *
                   |                                     *  ********  *
                   +----------------------------------------+ ASPn *  *
                                                         *  ********  *
                                                         **************

                Figure 4: Signalling Gateway Architecture

The pair of SGs can work either as replicated endpoints or as replicated relay points, looking at it from the SS7 network's point of view 🍓.

Replicated endpoints: how the SGs couple with the ASPs when they act as replicated endpoints is an implementation issue 🛠️.

Replicated relay points: normally, the path from SEP to ASP always goes through the same SGP when in-sequence-delivery is requested. Still, linkset failures can make MTP reroute over to the other SG 🌈.

A.3. Signalling Gateway Message Distribution Recommendations 💌

A.3.1. Connectionless Transport 📬

Through configuration, the SG knows that the local SCCP-user is really represented by an AS, and that a set of ASPs serves it in n+k redundancy mode. An ASP gets picked, and a CLDT message is sent on the right SCTP association and stream ✨.

The selection can be round robin, or any other method that guarantees balanced loadsharing across the active ASPs. Here's the catch though: when TCAP messages are being transported, load sharing only works for the first message in a TCAP dialogue (TC_Begin, TC_Query, TC_Unidirectional). Every other TCAP message in that same dialogue has to go to the same ASP that got picked for the first message, unless the ASPs can share state and keep sequenced delivery. So the SGP needs to know how the ASPs in a single AS allocate TIDs 🧐:

  • State sharing
  • Fixed range of TIDs per ASP in the AS

This info may be provisioned in the SG, or it may be exchanged dynamically via the ASP_Active message 💖.

Here's an example of an INAP/TCAP message exchange between SEP and ASP 👀.

The address info in the CLDT message (for example, TC_Query) going from SGP to ASP has association ID = SG-ASP, a Stream ID based on sequence control and possibly other parameters (like OPC) 🎀:

  • Routing Context: based on SS7 Network ID and AS membership, so the message gets delivered to the correct ASP.
  • Source address: a valid combination of SSN, PC and GT, as needed for back routing to the SEP.
  • Destination address: at least SSN, to pick the SCCP/SUA-user at the ASP.

The address info in the CLDT message (for example, TC_Response) going from ASP to SG has association ID = ASP-SG, and the stream ID is chosen by implementation-dependent means with regard to in-sequence-delivery 🦄:

  • Routing Context: as received in the previous message.
  • Source address: a unique address, so that when it's used as the SCCP called party address in the SEP, it must lead to the same AS. The SSN might be enough on its own.
  • Destination address: copied from the source address in the received CLDT message.

After all that, further messages from the SEP belonging to the same TCAP transaction will reach the same ASP 🥰.

A.3.2. Connection-Oriented Transport 🔗

Further messages for this connection get routed on DPC in the SS7 connection section (the MTP routing label), and on IP address in the IP connection section (the SCTP header) 💫. There's no other routing info in the SCCP or SUA messages themselves. Inside the SG, resources are kept to forward messages from one section to the other, and to fill in the MTP routing label or SCTP header, based on the destination local reference of these messages (Connect Confirm, Data Transfer, etc.) 💅.

So in the SG, two local references get allocated: one 3-byte value for the SS7 section, and one 4-byte value for the IP section. A resource holding the connection data for both sections is also allocated, and either of the two local references can be used to fetch that data, for example on an incoming DT1 or CODT 🌸.


Authors' Addresses 🖊️

   John Loughney
   Nokia Research Center
   PO Box 407
   FIN-00045 Nokia Group
   Finland

   EMail: john.Loughney@nokia.com


   Greg Sidebottom
   Signatus Technologies
   Kanata, Ontario
   Canada

   EMail: greg@signatustechnologies.com
   Lode Coene
   Siemens n.v.
   Atealaan 34
   B-2200 Herentals
   Belgium

   Phone: +32-14-252081
   EMail: lode.coene@siemens.com


   Gery Verwimp
   Siemens n.v.
   34 Atealaan
   PO 2200
   Herentals
   Belgium

   Phone: +32 14 25 3424
   EMail: gery.verwimp@siemens.com


   Joe Keller
   Tekelec
   5200 Paramount Parkway
   Morrisville, NC 27560
   USA

   EMail: joe.keller@tekelec.com


   Brian Bidulock
   OpenSS7 Corporation
   1469 Jeffreys Crescent
   Edmonton, AB  T6L 6T1
   Canada

   Phone: +1 780 490 1141
   EMail: bidulock@openss7.org

Copyright (C) The Internet Society (2004). 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 ✨

okay so the IETF is not picking a side on whether any IPR (intellectual property rights) claims are valid or how far they reach 🧐 🫶 It also isn't saying it went hunting for any of those rights itself. If you want the rules on rights in RFC docs, check out BCP 78 and BCP 79 📚

copies of IPR disclosures sent to the IETF Secretariat 📬 plus any licence assurances, or the outcome of anyone trying to get a general licence or permission to use the proprietary rights, can be found in the IETF online IPR repository at http://www.ietf.org/ipr 💖

the IETF also invites anyone to flag copyrights, patents, patent applications, or other proprietary rights that might cover tech needed to implement this standard 🔥 just send it to ietf-ipr@ietf.org 💌 🦋


Acknowledgement 🌸

funding for the RFC Editor function is currently coming from the Internet Society 🎀 🫶 thank you, legends 👑

📦 where this page comes from