RFC 3094

Tekelec's Transport Adapter Layer Interface

📅 published April 2001, from ietf

RFC 3094: Tekelec's Transport Adapter Layer Interface 🦋

okay bestie, this one is from April 2001 and it's written by four people at Tekelec: D. Sprague, R. Benedyk, D. Brendes, and J. Keller. It's from the Network Working Group and it's categorized as Informational 💅 It doesn't list anything it obsoletes or updates, so it just stands on its own 🌸


Status of this Memo ✨

this memo is for the Internet community to read, and it is not a standard of any kind 🙈 It just shares information. And distribution is totally unlimited, so share it with whoever 🫶

Copyright (C) The Internet Society (2001). All Rights Reserved.

IESG Note 🚩

Heads up, readers! This memo is a vendor's alternative to the standards-track tech that the IETF SIGTRAN Working Group is building. The IETF has not reviewed the technical soundness or completeness of what's in here 💀 If you're thinking about using this kind of tech, the IESG strongly urges you to go check out the SIGTRAN work before you commit to anything described here.

Abstract 🎀

okay so this doc proposes the interfaces for a Signaling Gateway 🌈 Its whole job is interworking between the Switched Circuit Network (SCN) and an IP network. The gateway is the central point for all the signaling info, so it's not just moving signaling from one network to the other. It can also do extra stuff like protocol translation, security screening, routing information, and seamless access to Intelligent Network (IN) services on both networks. main character energy, fr 👑

The Transport Adapter Layer Interface (TALI) is the interface being proposed here ✨ It carries TCAP (Transaction Capability Application Part), ISUP (ISDN User Part), and MTP (Mail Transport Protocol) messages over TCP/IP. TALI also handles SCCP (Signalling Connection Control Part) Management (SCMG), MTP Primitives, dynamic registration of circuits, and routing of call control messages based on circuit location. it's giving full toolkit 🧚


Table of Contents 🍓

1. Introduction                                                    4
2. Overview of the TALI Protocol                                   6
2.1 Traditional PSTN SS7 Networks                                  6
2.2 Converged SS7 Networks                                         8
2.3 TALI Protocol Stack Overview                                  10
2.3.1 An Alternate TALI Protocol Stack using the SAAL Layer       13
2.3.2 An Alternate TALI Protocol Stack using SCTP                 15
2.4 Inputs to the TALI Version 1.0 State Machine                  15
3. TALI Version 1.0                                               17
3.1 Overview of the TALI Message Structure                        17
3.1.1 Types of TALI Fields                                        19
3.2 Detailed TALI Message Structure                               20
3.2.1 TALI Peer to Peer Messages                                  20
3.2.1.1 Test Message (test)                                       20
3.2.1.2 Allow Message (allo)                                      21
3.2.1.3 Prohibit Message (proh)                                   21
3.2.1.4 Prohibit Acknowledgement Message (proa)                   21
3.2.1.5 Monitor Message (moni)                                    22
3.2.1.6 Monitor Acknowledge Message (mona)                        22
3.2.2 Service Messages                                            23
3.2.2.1 SCCP Service Message (sccp)                               23
3.2.2.1.1 SCCP Encapsulation using TALI                           25
3.2.2.2 ISUP Service Message (isot)                               27
3.2.2.2.1 ISUP Encapsulation using TALI                           27
3.2.2.3 MTP3 Service Message (mtp3)                               28
3.2.2.3.1 MTP3 Encapsulation using TALI                           29
3.2.2.4 SAAL Service Message (saal)                               30
3.2.2.4.1 MTP3 and SAAL Peer to Peer Encapsulation using TALI     31
3.3 TALI Timers                                                   34
3.3.1 T1 Timer                                                    34
3.3.2 T2 Timer                                                    34
3.3.3 T3 Timer                                                    34
3.3.4 T4 Timer                                                    34
3.3.5 Recommended Defaults and Ranges for the TALI Timers         35
3.4 TALI User Events                                              35
3.4.1 Management Open Socket Event                                35
3.4.2 Management Close Socket Event                               36
3.4.3 Management Allow Traffic Event                              36
3.4.4 Management Prohibit Traffic Event                           36
3.5 Other Implementation Dependent TALI Events                    37
3.6 TALI States                                                   37
3.7 TALI Version 1.0 State Machine                                38
3.7.1 State Machine Concepts                                      38
3.7.1.1 General Protocol Rules                                    38
3.7.1.2 Graceful Shutdown of a Socket                             39
3.7.1.3 TALI Protocol Violations                                  39
3.7.2 The State Machine                                           40
3.8 TALI 1.0 Implementation Notes                                 42
3.8.1 Failure on a TCP/IP Socket                                  42
3.8.2 Congestion on a TCP/IP Socket                               43
3.9 TALI 1.0 Limitations                                          43
4. TALI Version 2.0                                               43
4.1 Overview of TALI Version 2.0 Features                         45
4.2 TALI Version Identification                                   47
4.3 Backwards Compatibility                                       50
4.3.1 Generating Protocol Violations based on Received Messages   53
4.4 Overview of the TALI Message Structure                        55
4.4.1 Types of TALI Fields                                        55
4.5 Detailed TALI Message Structures for New 2.0 Opcodes          58
4.5.1 Management Message (mgmt)                                   60
4.5.1.1 Routing Key Registration Primitive (rkrp)                 61
4.5.1.1.1 RKRP Data Structures                                    65
4.5.1.1.1.1 Common Fields in all RKRP Messages                    65
4.5.1.1.1.2 CIC Based Routing Key Operations                      67
4.5.1.1.1.3 SCCP Routing Key Operations                           71
4.5.1.1.1.4 DPC-SI, DPC and SI based Routing Key Operations       74
4.5.1.1.1.5 Default Routing Key Operations                        76
4.5.1.1.1.6 Support for Multiple RKRP Registration Operations     78
4.5.1.1.1.6.1 Multiple Registrations Support                      78
4.5.1.1.1.6.2 Multiple RKRP Operations in a Single Message        80
4.5.1.2 MTP3 Primitive (mtpp)                                     82
4.5.1.3 Socket Option Registration Primitive (sorp)               87
4.5.2 Extended Service Message (xsrv)                             91
4.5.3 Special Message (spcl)                                      92
4.5.3.1 Special Messages Not Supported (smns)                     93
4.5.3.2 Query Message (qury)                                      93
4.5.3.3 Reply Message (rply)                                      94
4.5.3.4 Unsolicited Information Message (USIM)                    95
4.6 TALI Timers                                                   95
4.7 TALI User Events                                              95
4.8 TALI States                                                   96
4.9 TALI Version 2.0 State Machine                                96
4.9.1 State Machine Concepts                                      96
4.9.1.1 General Protocol Rules                                    96
4.9.1.2 Graceful Shutdown of a Socket                             97
4.9.1.3 TALI Protocol Violations                                  97
4.9.2 The State Machine                                           97
4.10 TALI 2.0 Specification Limitations                          101
5. Success/Failure Codes                                         101
6. Security Considerations                                       102
7. References                                                    102
8. Acknowledgments                                               103
9. Authors' Addresses                                            104
10. Full Copyright Statement                                     105

that's the whole map for the doc, bestie 🗺️✨ part 1 done, and more parts are coming soon 🫶💖

1. Introduction ✨

okay so this doc is organized into the following 6 sections 💖

  • Introduction to the document
  • Overview of the TALI Protocol
  • TALI Version 1.0
  • TALI Version 2.0
  • Success/Failure Codes
  • Security Considerations

The following terms are used all over this doc, so let's get them down first 🎀

Circuit Identification Code (CIC): a field that identifies the circuit being set up or released. Depending on SI and MSU Type, this field can be 12, 14 or 32 bits. 🔢

Changeover/Changeback (co/cb): an SS7 MTP3 procedure for link failure and re-establishment. 🔁

Far End (FE): the remote endpoint of a socket connection. 🌍

Far End Allowed (FEA): the FE is ready to use the socket for service PDUs. ✅

Far End Prohibited (FEP): the FE is not ready to use the socket for service PDUs. 🚫

Intelligent Network (IN): a network that lets functionality be distributed flexibly across a variety of nodes, on and off the network, and lets the architecture be modified to control the services. 🧠

Management ATM Adaptation Layer (MAAL): this layer is a component of SAAL 🧩. It maps requests and indications between the System Management for the SG and the other SAAL layers. MAAL includes interfaces to/from SSCOP, SSCF, and system management. More information can be found in T1.652.

Media Gateway (MG): an MG terminates SCN media streams, packetizes the media data if it is not already packetized, and delivers packetized traffic to the packet network. It does these functions in reverse order for media streams flowing from the packet network to the SCN. 📦

Media Gateway Controller (MGC): an MGC handles the registration and management of resources at the MG. The MGC may have the ability to authorize resource usage based on local policy. For signaling transport purposes, the MGC serves as a possible termination and origination point for SCN application protocols, such as SS7 ISDN User Part and Q.931/DSS1. 👑

MTP3 Framing (MTP3F): TALI does not require full MTP3 procedures support, but rather uses the MTP3 framing structure (ie: SIO, Routing Label, etc). 🖼️

Near End (NE): the local endpoint of a socket connection. 🏠

Near End Allowed (NEA): the NE is ready to use the socket for service PDUs. ✅

Near End Prohibited (NEP): the NE is not ready to use the socket for service PDUs. 🚫

Q.BICC ISUP: an ISUP+ variant that uses 32 bit CIC codes instead of 14/12 bit CIC codes. ISUP+, or Q.BICC ISUP, is based on the Q.765.BICC specification currently being developed in ITU Study Group 11. 🌸

Signaling ATM Adaptation Layer (SAAL): this layer is the equivalent of MTP-2 for ATM High Speed Links carrying SS7 Traffic, as described in GR-2878-CORE [8]. SAAL includes SSCF, SSCOP and MAAL. 🧩

Signaling Gateway (SG): an SG is a signaling agent that receives/sends SCN native signaling at the edge of the IP network. The SG function may relay, translate or terminate SS7 signaling in an SS7-Internet Gateway. The SG function may also be co-resident with the MGC/MG functions to process SCN signaling associated with line or trunk terminations controlled by the MG (e.g., signaling backhaul). 🌉

Service Specific Coordination Function (SSCF): this layer is a component of SAAL 🧩. It maps the services provided by the lower layers of the SAAL to the needs of a specific higher layer user. In the case of the STP, the higher layer user is the MTP-3 protocol, and the SSCF required is the one defined by T1.645: SSCF for Support of Signaling at the Network Node Interface (SSCF at the NNI). More information can be found in T1.645. SSCF provides the interface between SSCOP and MTP3 and includes the following functions:

  • Local Retrieve of messages to support link changeover procedures
  • Flow control with four levels of congestion

Switched Circuit Network (SCN): the term SCN refers to a network that carries traffic within channelized bearers of pre-defined sizes. Examples include Public Switched Telephone Networks (PSTNs) and Public Land Mobile Networks (PLMNs). Examples of signaling protocols used in the SCN include Q.931, SS7 MTP Level 3 and SS7 Application/User parts. 📞

Service Specific Connection Oriented Protocol (SSCOP): this layer is a component of SAAL 🧩. It provides reliable point to point data transfer with sequence integrity and error recovery by selective retransmission. Protocol layer interfaces are described in T1.637. Aspects of the protocol include flow control, connection control, error reporting to layer management, connection maintenance in the prolonged absence of data transfer, local data retrieval by the user of the SSCOP, error detection of protocol control information, and status reporting. SSCOP provides the link layer functions that are:

  • In-Sequence Delivery
  • Flow Control
  • Error Detection/Correction
  • Keep Alive
  • Local Data Retrieval
  • Connection Control
  • Protocol Error Detection and Recovery

Signaling Transfer Point (STP): packet switches that provide CCS message routing and transport. They are stored program switches that use information contained in the message, together with information stored in memory, to route the message to the appropriate destination signaling point. 🔀

2. Overview of the TALI Protocol 🦋

2.1 Traditional PSTN SS7 Networks

the traditional PSTN SS7 network is made of 3 types of devices connected via dedicated SS7 signaling links 🔗

the 3 primary device types for PSTN networks are:

  • SSP: Signaling Service Point. These nodes act as endpoints in the SS7 network, originating SS7 messages as users attempt to place phone calls. These nodes contain interfaces into the SS7 data network and the SS7 voice network.
  • STP: Signaling Transfer Point. These nodes act primarily as switches, switching SS7 traffic from node to node throughout the network until it reaches another endpoint. An important feature of each STP is to provide SS7 network management functionality that allows messages to be delivered even when links and devices fail. STPs also sometimes provide database type services, such as Global Title Translations and Local Number Portability.
  • SCP: Signaling Control Point. These nodes act as databases. They contain stored data that is used to turn SS7 Queries into SS7 Replies.

there are 3 primary types of dedicated SS7 signaling links:

  • 56Kbps SS7 (DS0, V35, OCU) links. These links implement the MTP-1 and MTP-2 protocols as defined in [1].
  • DS1 High Speed Links. These links use the SAAL protocol to provide an alternative to 56Kbps SS7 links that is based on newer, faster technology. These links implement the SS7 protocol as defined in [8].
  • E1 Links.

Figure 1 gives you an overview of the traditional PSTN network 🗺️ In this network, any of the links can be implemented via either 56 Kbps, DS1, or E1 links.

                              ^
                             / \
                            /SCP\
                           /-----\
                             /  \
                            /    \
                           /      \
                          /        \
            /---\      +---+    +---+      /---\
           | SSP |-----|STP|----|STP|-----| SSP |
            \---/  \  /+-+-+\  /+-+-+ \  / \---/
                    \/   |   \/   |    \/
                    /\   |   /\   |    /\
            /---\  /  \+-+-+/  \+-+-+ /  \ /---\
           | SSP |/----|STP|----|STP|/----| SSP |
            \---/      +---+    +---+      \---/
                        \           /
                         \         /
                          \       /
                           \  ^  /
                            \/ \/
                            /SCP\
                           /-----\

Figure 1: The Traditional PSTN Network

2.2 Converged SS7 Networks

in the converged SS7 network, SS7 devices will live on both the traditional PSTN network (with dedicated 56 Kbps and DS1 links) and on the IP network (with Ethernet links based on IP protocol) 🌐 The services of SSPs, STPs, and SCPs can be provided by new types of devices that live on IP networks. The IP network is not intended to completely replace the PSTN. Instead, devices on the 2 types of networks must be able to communicate with one another and convert from 1 lower layer protocol to the other 💫

Signaling Gateways are new devices that may also function as an STP in the converged network. SGs provide interfaces to:

  • devices on the SCN (traditional SSPs, STPs, and SCPs)
  • other SGs
  • new devices on the IP network

SGs also keep doing STP functions such as SS7 network management and some database services (such as GTT and LNP) 🛠️

New devices on the IP network include:

  • Media Gateway Controllers. In addition to other functions, these devices control Media Gateways and perform call processing.
  • Media Gateways. In addition to other functions, these devices control voice circuits that are used to carry telephone calls. MGs + MGCs combine to provide the functionality of traditional SSPs.
  • IP based SCPs. The database services that are related to SS7 can be moved onto devices on the IP network.

Figure 2 gives you an overview of the converged SS7 network 🌈

                      -----              +----+
             /\      /     \-------------| SG |
            /  \----|  SCN  |     +----+ +----+
           /SCP \    \     /------| SG |  |
           ------     -----       +----+  |
                      |   |           |   |
                      |   |           |   |
                      |   |           -----
                      |   |          /     \      /\
                      |   |         |  IP   |----/  \
                      |  /---\       \     /    /SCP \
                      | | SSP |       -----     ------
                      |  \---/         /   \
                      |     |         /     \
                    /---\   |        /       \
                   | SSP |  |     +---+    +---+
                    \---/ +----+  |MGC|    |MGC|
                      |   | MG |  +---+    +---+
                      |   +----+\    \     /
                      |          \    \   /
                      |           \   -----
                      |            \ /     \
                    +----+          |  IP   |
                    | MG |-----------\     /
                    +----+            -----

Figure 2: The Converged SS7 Network

In theory, the TALI protocol can be used between 2 nodes to carry SS7 traffic across TCP/IP 🧪 Some of the areas where TALI could be used include:

  • For SG to SG communication across IP
  • For SG to MGC communication across IP
  • For SG to IP based SCP communication across IP
  • For communication between multiple IP based SCPs
  • For communication between multiple MGCs
  • For communication between MGCs and MGs
  • For other IP devices such as DNS, Policy Servers, etc.

In reality, the communication between MGCs, or between an MGC and an MG, is probably better suited to using other protocols 🙈 With respect to the Signaling Gateway implementation, the TALI protocol is used to carry SS7 traffic:

  • For SG to SG communication
  • For SG to MGC communication
  • For SG to IP based SCP communication

2.3 TALI Protocol Stack Overview 💖

Okay bestie, TALI (the Transport Adapter Layer Interface) is the proposed interface that wraps up SCCP, ISUP, and MTP messages and encapsulates them inside a TCP/IP packet between two switching elements ✨. It also handles SCCP Management (SCMG), MTP Primitives, dynamic registration of circuits, and routing of call control messages based on circuit location 🎀.

The main purpose of TALI is to be the bridge between the SS7 Signaling Network and apps that live in an IP network 🌉. Figure 3 is a quick glow-up diagram showing the protocol stacks used to carry SS7 MSUs on both the SS7 side and the IP side of the SG 🦋.

             SS7 traffic       SS7 traffic
          via 56Kbps links     via TALI
   +-----------+        +----+          +--------+
   |Traditional|        | SG |          |   IP   |
   |SS7 Devices|<------>|    |<-------->| Devices|
   +-----------+        +----+          +--------+


      SS7                          SS7, TALI, TCP/IP
      protocol stack               protocol stack
    +---------------+              +---------------+
    |SS7 application|              |SS7 application|
    |layer          |              |layer          |
    +-------+-------+              +-------+-------+
    | TCAP  | ISUP  |              | TCAP  | ISUP  |
    +-------+       |              +-------+       |
    | SCCP  |       |              | SCCP  |       |
    +-------+-------+              +-------+-------+
    |    MTP3       |              |    MTP3       |
    +---------------+              +---------------+
    |    MTP2       |              |    TALI       |
    +---------------+              +---------------+
    |    MTP1       |              |    TCP        |
    |   (& phy.     |              +---------------+
    |    layer)     |              |    IP         |
    +---------------+              +---------------+
                                   |    MAC        |
                                   |   (& phy.     |
                                   |    layer)     |
                                   +---------------+

Figure 3: TALI Protocol to carry SS7 over TCP/IP

From Figure 3, a few things are super obvious 👀:

  • The TALI layer is used when transferring SS7 over IP.
  • When SS7 traffic is carried over an IP network, the MTP2 and MTP1 layers of a traditional 56 Kbps link are replaced by the TALI, TCP, IP, and MAC layers 🔄.
  • The TALI layer sits on top of the TCP layer.
  • The TALI layer sits below the various SS7 layers (MTP3, SCCP/TCAP, ISUP, and applications). The data from these SS7 layers is carried as the data portion of TALI service data packets 📦.

Some facts that matter for understanding how TALI works, but that you can't see from Figure 3, are these 🧚:

  • Each TALI connection is provided over a single TCP socket.
    • The standard Berkeley sockets interface to the TCP is used by the TALI layer to provide connection oriented service from endpoint to peer endpoint.
    • TCP sockets are based on a Client/Server architecture. One end of the TALI connection must be defined as the 'server side', and the other end is a 'client'.
    • The client/server roles only matter for bringing up the TCP connection between the 2 endpoints. Once the connection is established, both ends use the same Berkeley sockets calls (send, recv) to transfer data 💅.
    • The TCP socket must be connected before the 2 TALI endpoints can begin communicating.
  • TALI gives the user control over each TALI connection that is defined. This control:
    • Allows the user to control when each TALI connection will be made
    • Allows the user to control when each TALI connection is allowed to carry SS7 traffic
    • Allows the user to control the graceful shutdown of each socket
  • TALI provides Peer to Peer messages. These messages originate from the TALI layer of one endpoint of the connection and are terminated at the TALI layer of the other endpoint. Peer to Peer messages are used:
    • To provide test and watchdog maintenance messages
    • To control the ability of each socket to carry SS7 service messages
  • TALI provides Service messages. These messages originate from the layer above the TALI layer of one endpoint of the connection and are transferred to and terminated at the layer above the TALI layer of the other endpoint.
    • The service messages provide several different ways to encapsulate the SS7 messages (SCCP/TCAP, ISUP, and other MTP3 layer data) across the TCP/IP connection.
    • As we will see later, different Service opcodes are used to communicate across the TALI socket exactly how each SS7 message has been encapsulated 🎁.
  • A set of TALI timers is defined. These timers are used to correctly implement the TALI state machine ⏱️.

2.3.1 An Alternate TALI Protocol Stack using the SAAL Layer 🌷

This section presents a different, slightly more complex, TALI protocol stack. You can use it in place of the protocol stack in the previous section 🙃.

Figure 3 in the previous section gave a simple illustration of the basic TALI protocol stack. It can carry SS7 MSUs between 56 Kbps links on the SS7 side of an SG and the IP devices.

Figure 4 below shows an alternate TALI protocol stack that includes the SAAL layer as part of the data transferred across the TCP/IP connection 🪄.

                SS7 traffic       SS7 traffic
                via DS1 links     via TALI
      +-----------+        +----+          +--------+
      |Traditional|        | SG |          |   IP   |
      |SS7 Devices|<------>|    |<-------->| Devices|
      +-----------+        +----+          +--------+


         SS7 DS1                   SS7, TALI, TCP/IP
         protocol stack            protocol stack
       +-----------------+        +-----------------+
       | SS7 application |        | SS7 application |
       | layer           |        | layer           |
       +--------+--------+        +--------+--------+
       |  TCAP  | ISUP   |        |  TCAP  | ISUP   |
       +--------+        |        +--------+        |
       |  SCCP  |        |        |  SCCP  |        |
       +--------+--------+        +--------+--------+
       |      MTP3       |        |      MTP3       |
       +-----------------+        +-----------------+
       |    SAAL         |        |     SAAL        |
       |(SSCF,MAAL,SSCOP)|        |(SSCF,MAAL,SSCOP)|
       +-----------------+        +-----------------+
       |     AAL5        |        |     TALI        |
       +-----------------+        +-----------------+
       |     ATM         |        |     TCP         |
       |    (& phy.      |        +-----------------+
       |     layer)      |        |     IP          |
       +-----------------+        +-----------------+
                                  |     MAC         |
                                  |    (& phy.      |
                                  |     layer)      |
                                  +-----------------+

Figure 4: An Alternate TALI Protocol Stack with SAAL

Here's the tea on the differences between these 2 protocol stacks, why there are 2 of them, and what each one gets you ☕:

  • When the TALI protocol stack is implemented without the SAAL layer, as in Figure 3, the SEQUENCE NUMBER of the SS7 MSU is NOT part of the data transferred across the TCP/IP connection. In 56 Kbps SS7 links, the MTP2 header contains an 8 bit sequence number for each MSU. The sequence number is used to preserve message sequencing and to support complex SS7 procedures involving MSU retrieval during link changeover and changeback. As indicated in Figure 3, the MTP2 header is NOT part of the data transferred across the TCP/IP connection. The TALI protocol stack without SAAL still guarantees correct sequencing of SS7 data (this sequencing is provided by sequence numbers in the TCP layer). However, that protocol stack can not support SS7 changeover and changeback procedures 🙅‍♀️.
  • When the TALI protocol stack is implemented with the SAAL layer, as in Figure 4, the SEQUENCE NUMBER of the SS7 MSU IS part of the data transferred across TCP/IP. In SS7 DS1 links, the SSCOP trailer contains a 24 bit sequence number for each MSU. This 24 bit sequence number serves the same purposes as the 8 bit SS7 sequence number. As indicated in Figure 4, the SSCOP trailer IS part of the data transferred across the TCP/IP connection. The protocol stack in Figure 4 can support SS7 changeover and changeback procedures 🙌.
  • Implementing the TALI protocol with SAAL therefore provides support for SS7 co/cb and data retrieval, and can help to minimize MSU loss as SS7 links are deactivated. However, implementing SAAL is not a trivial matter 😤. The SAAL layer consists of 3 sublayers (SSCF, SSCOP, and MAAL), and one of them (SSCOP) is quite involved. It is envisioned that most SS7 to TCP/IP applications will NOT choose to implement SAAL.

2.3.2 An Alternate TALI Protocol Stack using SCTP 🦄

The TALI protocol is dependent on a reliable transport layer below it. When TALI was first designed, TCP was the only reliable, proven transport layer 🧱. Simple Control Transport Protocol (SCTP) is currently being designed as a transport layer specifically for signalling. Once SCTP is a proven and accepted transport protocol, SCTP can then be used in place of TCP, as shown in Figures 3 and 4 💜.

2.4 Inputs to the TALI Version 1.0 State Machine ✨

okay so Figure 5 🦋 shows everything that can poke the TALI State Machine, and there are a lot of inputs bestie. Here's the list 💅

  • Management events (like, requests from the human user of the TALI connection) that control how a particular TALI session runs 🎀
  • TALI messages received from the Peer 🫶 These include peer to peer messages and service data messages
  • Events from the User of the TALI layer 💖 The User is the layer above TALI in the protocol stack, which is either the SS7 or SAAL layer
  • Implementation Dependent Events 🔥 Every implementation has to feed inputs into the TALI state machine, like:
    • Socket Events 🧚
    • TALI protocol violations 💀 The state machine must detect protocol violations and act accordingly, no cap
    • Timer events ⏰
  +====+                                   +============+
  |    |    +---------+ +-------------+    |            |
  |User|    | Service | | Mgmt. Open  |    | MANAGEMENT |
  |Part|<-->| Message | | Mgmt. Close |<-->|            |
  |    |    |         | | Mgmt. Proh. |    |            |
  |    |    +---------+ | Mgmt. Allow |    +============+
  +====+          ^     +-------------+
                  |            ^
                  |            |
                  v            v
  +========================================================+
  |                 TALI State Machine                     |
  +========================================================+
        ^               ^                 ^             ^
        |               |                 |             |
        |               |                 |             |
        v               |                 |             |
   +---------+  +-----------------+ +-----------+ +------------+
   | Received|  | Connection est. | | Protocol  | | T1 Expired |
   | 'test'  |  | Connection lost | | Violation | | T2 Expired |
   | 'allo'  |  |                 | |           | | T3 Expired |
   | 'proh'  |  +-----------------+ +-----------+ | T4 Expired |
   | 'proa'  |          ^                 ^       +------------+
   | 'moni'  |          |                 |              ^
   | 'mona'  |          |                 |              |
   |    or   |          |                 |              |
   | Service |          |                 |              |
   | Message |    +========================================+
   +---------+    |         IMPLEMENTATION                 |
        ^         |           DEPENDENT                    |
        |         +========================================+
        |
        v
    +============+
    |    PEER    |
    |            |
    +============+

  Figure 5: Overview of Inputs to the TALI 1.0 State Machine
🎀 Figure 5 is the whole vibe in one picture: the User Part, Management, the Peer and the Implementation Dependent stuff all feed the TALI State Machine.

3. TALI Version 1.0 🌸

This chapter covers the states, messages, message exchange rules and state machine that must be implemented to provide a TALI version 1.0 protocol layer. Main character energy 👑

3.1 Overview of the TALI Message Structure 🍓

Table 2 gives you the summary of the messages and the message structure used in TALI version 1.0. It's giving neat little boxes 📦

+------------------------------------------------------------------+
| OCTET | DESCRIPTION              | SIZE     | VALUE  |    TYPE   |
+------------------------------------------------------------------+
| 0..3  | SYNC                     | 4 Octets |        | 4 byte    |
|       |                          |          |        | ASCII     |
+------------------------------------------------------------------+
|       |   TALI                   |          | 'TALI' |           |
+------------------------------------------------------------------+
| 4..7  | OPCODE                   | 4 Octets |        | 4 byte    |
|       |                          |          |        | ASCII     |
+------------------------------------------------------------------+
|       |   Test Service           |          | 'test' |           |
|       |   Allow Service          |          | 'allo' |           |
|       |   Prohibit Service       |          | 'proh' |           |
|       |   Prohibit Service Ack   |          | 'proa' |           |
|       |   Monitor Socket         |          | 'moni' |           |
|       |   Monitor Socket Ack     |          | 'mona' |           |
|       |   SCCP Service           |          | 'sccp' |           |
|       |   ISUP Service over TALI |          | 'isot' |           |
|       |   MTP3 Service over TALI |          | 'mtp3' |           |
|       |   Service over SAAL      |          | 'saal' |           |
+------------------------------------------------------------------+
| 8..9  | LENGTH                   | 2 Octets |        | integer   |
|       |   (least significant     |          |        |           |
|       |    byte first) non-0     |          |        |           |
|       |    if Service or         |          |        |           |
|       |    Socket monitor message|          |        |           |
+------------------------------------------------------------------+
| 10..X | DATA PAYLOAD             | variable |        | variable  |
+------------------------------------------------------------------+

              Table 2: Message Structure for TALI 1.0

Table 3 tells you which valid values the LENGTH field can take for each version 1.0 opcode 🧠 The LENGTH field is always the # of bytes in the DATA PAYLOAD part of a general TALI message. Not complicated, just vibes ✨

+------------------------------------------------------------------+
| OPCODE | VALID LENGTH VALUES | COMMENTS                          |
+------------------------------------------------------------------+
| test   | 0 bytes             |                                   |
+------------------------------------------------------------------+
| allo   | 0 bytes             |                                   |
+------------------------------------------------------------------+
| proh   | 0 bytes             |                                   |
+------------------------------------------------------------------+
| proa   | 0 bytes             |                                   |
+------------------------------------------------------------------+
| moni   | 0-200 bytes         | A maximum length is provided so   |
|        |                     | that the maximum ethernet frame   |
|        |                     | size is not exceeded.             |
+------------------------------------------------------------------+
| mona   | 0-200 bytes         | Mona reply length and content must|
|        |                     | match the original moni (with the |
|        |                     | exception of the opcode)          |
+------------------------------------------------------------------+
| sccp   | 12-265 bytes        | These are the valid sizes for the |
|        |                     | SCCP-ONLY portions of SCCP UDT    |
|        |                     | MSUs                              |
+------------------------------------------------------------------+
| isot   | 8-273 bytes         | The length is the number of octets|
|        |                     | in the MTP3 and higher layer(s) of|
|        |                     | the SS7 MSU.  This length includes|
|        |                     | the SIO byte, the MTP3 routing    |
|        |                     | label, the CIC code, and the      |
|        |                     | ISUP Message Type field, and any  |
|        |                     | other bytes that may exist as part|
|        |                     | of the SIF (Service Information   |
|        |                     | Field)                            |
+------------------------------------------------------------------+
| mtp3   | 5-280 bytes         | The length is the number of octets|
|        |                     | in the MTP3 and higher layer(s) of|
|        |                     | the SS7 MSU.  This length includes|
|        |                     | the SIO byte and the MTP3 routing |
|        |                     | labeld, and any other bytes that  |
|        |                     | may exist as part of the SIF      |
|        |                     | (Service Information Field)       |
+------------------------------------------------------------------+
| saal   | 11-280 bytes        | The length is the number of octets|
|        |                     | in the MTP3 and higher layer(s) of|
|        |                     | the SS7 MSU.  This length includes|
|        |                     | the SIO byte and all bytes in the |
|        |                     | SIF (Service Information Field)   |
|        |                     | field.  The MTP3 routing label is |
|        |                     | part of the SIF field.  Seven (7) |
|        |                     | octets of SSCOP trailer is added  |
|        |                     | to the message.  The SSCOP trailer|
|        |                     | bytes are also included in the    |
|        |                     | length.                           |
+------------------------------------------------------------------+

        Table 3: Valid Length Fields for Each Opcode in TALI 1.0

3.1.1 Types of TALI Fields ✨

okay so TALI messages are made of a few different field types, and each one comes with its own rules 💅 Here's the full breakdown, in a code block so every byte stays exact 🎀

+------------------------------------------------------------------+
|Field Type | Implementation Notes for that Type                   |
+------------------------------------------------------------------+
|4 byte     | * 4 byte ASCII text strings are used to define the   |
|ASCII text |   sync code and the opcode of the basic TALI message.|
|           | * These fields are case sensitive, the coding for    |
|           |   each sync and opcode literal needs to match the    |
|           |   case specified in Table 2.                         |
|           | * The standard ASCII conversion table is used to     |
|           |   transform each character into a byte.              |
|           | * The order of the ASCII characters is important.    |
|           |   The first character in the string must be the      |
|           |   first character transmitted across the wire.       |
|           | * For example, if the string being encoded is 'abCD',|
|           |   the order of the bytes as they are transferred     |
|           |   over the wire must be:                             |
|           |     1st byte: 0x61 ('a')  3rd byte: 0x43 ('C')       |
|           |     2nd byte: 0x62 ('b')  4th byte: 0x44 ('D')       |
|           | * The software for each implementation should be     |
|           |   written in a manner that accounts for the required |
|           |   byte order of transmission (ie: the Big Endian/    |
|           |   Little Endian characteristics of the processor     |
|           |   need to be dealt with in the software.             |
+------------------------------------------------------------------+
|Integer    | * A 1, 2 or 4 byte field to be treated as an integer |
|           |   value.  Integer fields should be transmitted Least |
|           |   Significant Byte first across the wire.            |
|           | * The software for each implementation should be     |
|           |   written in a manner that accounts for the required |
|           |   byte order of transmission (ie: the Big Endian/    |
|           |   Little Endian characteristics of the processor     |
|           |   need to be dealt with in the software.             |
+------------------------------------------------------------------+
|Variable   | * The definition of the message structure for this   |
|           |   field is governed by other specifications.         |
|           | * For example, when transferring MTP3 service data   |
|           |   via a 'mtp3' opcode, the DATA PAYLOAD begins with  |
|           |   the SIO byte of the MTP3 routing label.  The       |
|           |   structure for the entire DATA PAYLOAD is governed  |
|           |   by the MTP3 message structure defined in [1].      |
+------------------------------------------------------------------+
|X byte     | * ASCII text fields of sizes other than 4 bytes      |
|ASCII text |   should be supported according to the same rules    |
|           |   presented for the 4 byte ASCII text fields.  For   |
|           |   instance, an 8 byte string such as 'ab01cd23' could|
|           |   be used, where the 'a' would be the first byte of  |
|           |   the field transmitted out the wire.                |
+------------------------------------------------------------------+

Table 4: Implementation Notes for each Type of TALI field

3.2 Detailed TALI Message Structure 🦋

3.2.1 TALI Peer to Peer Messages 💜

these next subsections are the deep dive on the TALI Peer to Peer messages that version 1.0 implements 🫶 These messages start at the TALI layer on one end of the socket connection (the near end) and end at the TALI layer on the far end of the connection.

3.2.1.1 Test Message (test) 🙈

the test message is how a TALI implementation checks in with the remote end and basically asks, "hey, are you ready to carry SS7 service data?" 💅 Each implementation sends it periodically, based on a T1 timer interval. When a TALI implementation gets a test, it must reply with either proh or allo to say whether its node is willing to carry SS7 service data over that TALI connection.

+------------------------------------------------------------------+
| Octets | Field Name  | Description                               |
+------------------------------------------------------------------+
| 0..3   | SYNC        | 'TALI'                                    |
+------------------------------------------------------------------+
| 4..7   | OPCODE      | 'test'                                    |
+------------------------------------------------------------------+
| 8..9   | LENGTH      | Length = 0                                |
+------------------------------------------------------------------+

3.2.1.2 Allow Message (allo) 🌈

the allo message is sent as a reply to a test query, or whenever something internal in the implementation happens, to say that a TALI implementation IS willing to carry SS7 service data over the TALI session ✨ It tells the far end that SS7 traffic can go over the socket. allo is one of the 2 possible replies to a test message. Before SS7 traffic can be carried over a socket, both ends of the connection need to send allo messages. no cap, that's a whole handshake vibe 👑

+------------------------------------------------------------------+
| Octets | Field Name  | Description                               |
+------------------------------------------------------------------+
| 0..3   | SYNC        | 'TALI'                                    |
+------------------------------------------------------------------+
| 4..7   | OPCODE      | 'allo'                                    |
+------------------------------------------------------------------+
| 8..9   | LENGTH      | Length = 0                                |
+------------------------------------------------------------------+

3.2.1.3 Prohibit Message (proh) 🚫

the proh message is sent as a reply to a test query, or whenever something internal in the implementation happens, to say that a TALI implementation is NOT willing to carry SS7 service data over the TALI session 💀 It tells the far end that SS7 traffic can not be transmitted on the socket. proh is the other of the 2 possible replies to a test message. As long as 1 end of the connection stays in the 'prohibited' state, SS7 traffic can not be carried over the socket. lowkey the big red flag of the whole protocol 🚩

+------------------------------------------------------------------+
| Octets | Field Name  | Description                               |
+------------------------------------------------------------------+
| 0..3   | SYNC        | 'TALI'                                    |
+------------------------------------------------------------------+
| 4..7   | OPCODE      | 'proh'                                    |
+------------------------------------------------------------------+
| 8..9   | LENGTH      | Length = 0                                |
+------------------------------------------------------------------+

3.2.1.4 Prohibit Acknowledgement Message (proa) 🍓

the proa message is sent by a TALI implementation every single time it receives a proh from the far end 🥰 It's basically the "got it bestie, I heard your no and I'll act on it" message, so the far end knows its proh arrived correctly and will be acted on accordingly.

+------------------------------------------------------------------+
| Octets | Field Name  | Description                               |
+------------------------------------------------------------------+
| 0..3   | SYNC        | 'TALI'                                    |
+------------------------------------------------------------------+
| 4..7   | OPCODE      | 'proa'                                    |
+------------------------------------------------------------------+
| 8..9   | LENGTH      | Length = 0                                |
+------------------------------------------------------------------+

3.2.1.5 Monitor Message (moni) 🔍

the moni message is a generic ECHO thing that each TALI implementation can use however it likes 🧚 A TALI version 1.0 implementation doesn't have to send a moni to be compliant with the 1.0 spec. The main point of it is to give the TALI layer a way to measure the round-trip message transfer time on a socket ⏱️ Every received moni must get a mona back. The DATA portion of a moni is vendor implementation dependent. The DATA portion of each mona reply must exactly match the DATA portion of the moni it answers. Whether or not an implementation chooses to send moni, mona must be sent in response to each moni to stay compliant with the TALI protocol. no skipping the monas, periodt 💅

+------------------------------------------------------------------+
| Octets | Field Name  | Description                               |
+------------------------------------------------------------------+
| 0..3   | SYNC        | 'TALI'                                    |
+------------------------------------------------------------------+
| 4..7   | OPCODE      | 'moni'                                    |
+------------------------------------------------------------------+
| 8..9   | LENGTH      | Length                                    |
+------------------------------------------------------------------+
| 10..X  | DATA PAYLOAD| Vendor Dependent                          |
+------------------------------------------------------------------+

3.2.1.6 Monitor Acknowledge Message (mona) 🎀

like we said above, a mona must be sent in reply to each received moni 🫶 The contents of the mona DATA area must match the DATA area of the moni that came in.

+------------------------------------------------------------------+
| Octets | Field Name  | Description                               |
+------------------------------------------------------------------+
| 0..3   | SYNC        | 'TALI'                                    |
+------------------------------------------------------------------+
| 4..7   | OPCODE      | 'mona'                                    |
+------------------------------------------------------------------+
| 8..9   | LENGTH      | Length                                    |
+------------------------------------------------------------------+
| 10..X  | DATA PAYLOAD| Vendor Dependent                          |
+------------------------------------------------------------------+

3.2.2 Service Messages 🧚‍♀️

okay the next bit is about the TALI Service messages that version 1.0 implements 🔥 These are the ones that actually carry SS7 MSUs across the IP network, so this part explains how to wrap SS7 MSUs into TCP/IP frames using each of the TALI service opcodes. The service messages start at the layer above TALI, travel across the IP network inside a TALI service message, and get delivered to the layer above TALI at the far end of the connection. main character energy for sure 👑✨

3.2.2.1 SCCP Service Message (sccp) 💌

The sccp opcode is how you deliver SS7 MSUs with a Service Indicator of 3 (SCCP) over a TALI connection 📡. Heads up, bestie: this opcode is only used on TALI protocol stacks that are implemented without SAAL 🙅‍♀️. The MTP3 layer of the SS7 MSU is NOT part of the data sent across TCP/IP here. So the data part of the TALI sccp message starts at the first byte of the SCCP data area in the SS7 MSU (right after the MTP3 routing label) ✨. That first byte is an SCCP message type field 💅.

There are a few restrictions on which SCCP messages this opcode can carry, so pay attention 👀:

  • SCCP messages have an SCCP message type field. TALI 1.0 implementations only support Class 0 and Class 1 SCCP messages with a message type field of either:
    • UDT
    • UDTS
    • XUDT
    • XUDTS
  • SCCP messages must have a Point Code in the 'calling party' area to be transferred across the TCP/IP connection as an sccp message 📍. An implementation can choose to modify the original SCCP MSU to add an appropriate calling party point code before sending it across TALI, if it wants to 💖.
  • SCCP messages must have a Point Code in the 'called party' area to be transferred across the TCP/IP connection as an sccp message 📍. Same deal: an implementation can choose to modify the original SCCP MSU to add an appropriate called party point code before sending it across TALI 🎀.
  • The encoding of the SS7 SCCP MSUs, as they travel across TALI via sccp, should stay compliant with the ANSI specifications (T1.112 and T1.114) that apply to the SCCP and TCAP portions of the message, respectively 🧚.
NOTE 1: SCCP Subsystem Management for the IP based SCP's is supported via this sccp opcode 🙌. SS7 SCCP Management messages are controlled by an SCMG SS7 process. SCMG sends those management messages via SCCP UNITDATA (UDT) messages, so the SCMG messages can be sent across the TALI connection. Iconic, honestly 👑.
NOTE 2: sccp TALI messages will not include the MTP3 header, so they won't keep the original DPC/OPC of the SS7 MSU 😭. Each TALI implementation needs to figure out if and how to provide this DPC/OPC information in the SCCP portion of the message 🤔. For example, the DPC can be copied into the point code in the SCCP Called Party Address area, and the OPC can be copied into the point code in the SCCP Calling Party Address area 💜.
+------------------------------------------------------------------+
| Octets | Field Name  | Description                               |
+------------------------------------------------------------------+
| 0..3   | SYNC        | 'TALI'                                    |
+------------------------------------------------------------------+
| 4..7   | OPCODE      | 'sccp'                                    |
+------------------------------------------------------------------+
| 8..9   | LENGTH      | Length                                    |
+------------------------------------------------------------------+
| 10..X  | SCCP Data   | SCCP data starting at the first byte after|
|        |             | the Layer 3 Routing Label (data does not  |
|        |             | include the SIO or Routing Label)         |
+------------------------------------------------------------------+

3.2.2.1.1 SCCP Encapsulation using TALI 🦋

So here's what happens when an SCCP MSU shows up at an SG from a 56 Kbps or DS1 link and gets routed inside the SG toward an IP device 🫶. The SG does the following to the SS7 MSU:

  • discards the MTP Layer 2 information, CRC and flags 🗑️
  • places the DPC from MTP Layer 3 into the Called Party Address field of the SCCP layer. If the Calling Party Address field doesn't exist, it gets created, and then it's filled 📝
  • places the OPC from MTP Layer 3 into the Calling Party Address field of the SCCP layer, but only if there is no Calling Party Point Code 🌸
  • places the modified SCCP and unchanged TCAP data into the service payload area of the TALI packet 📦
  • sets the SYNC field
  • sets the OPCODE to sccp
  • sets the LENGTH to the number of octets in the SERVICE field 🔢

Once the fully formed sccp TALI packet is created, it gets handed to the TCP socket layer and sent off 🚀. The transmission process adds TCP, IP and MAC header information on top 🍓.

Because the routing information from MTP Layer 3 gets placed in the SCCP part of the outgoing message, the SG doesn't need to save any routing information 🙌.

                             SS7 MSU

        |          Layer 3          |     Layer 2      |
        |                           |                  |
   +----+---+-----+-----+-------+---+--+---+---+---+---+----+
   |Flag|FCS|TCAP |SCCP |Routing|SIO|LI|FIB|FSN|BIB|BSN|Flag|
   |    |   |Layer|Layer| Label |   |  |   |   |   |   |    |
   +----+---+-----+-----+-------+---+--+---+---+---+---+----+
            |           |
            |           |
            |           |
     TALI   +-----------+---+------+----+
     Packet |  Service  |LEN|Opcode|SYNC|
            +-----------+---+------+----+
            |                           |
            |                           |
            |                           |
            +---------------------------+------+------+------+
     IP     | TALI Packet               |TCP   | IP   | MAC  |
     Packet |                           |Header|Header|Header|
            +---------------------------+------+------+------+

Figure 6: Encapsulation of SCCP MSUs using the TALI 'sccp' opcode 🖼️

When an sccp TALI packet comes into an SG from an IP device, the SG does this to the sccp packet 📥:

  • validates the TALI header ✅
  • allocates space for a new SS7 message 🆕
  • regenerates the SIO with the Sub-Service Field set to National Network, priority of zero (0), and Service Indicator set to SCCP 🔁
  • extracts the SCCP/TCAP data from the SERVICE area and places it in the new SS7 message 🎁
  • sets the DPC to the SCCP Called Party Point Code 🎯
  • sets the OPC to the SCCP Calling Party Point Code 🎯
  • randomly generates the SLS 🎲

Once the sccp packet is transformed back into a normal SS7 MSU, the MSU gets routed inside the SG according to the normal SS7 routing procedures 🌈.

3.2.2.2 ISUP Service Message (isot) 🌷

The isot opcode delivers SS7 MSUs with a Service Indicator of 5 (ISUP) over a TALI connection 💫. Same rule as before: this opcode is only used on TALI protocol stacks that are implemented without SAAL 🙅‍♀️. The MTP3 layer of the SS7 MSU IS part of the data sent across TCP/IP for this one 💕. So the data portion of the TALI isot message begins with the SIO byte of the MTP3 header in the SS7 MSU 🧁.

+------------------------------------------------------------------+
| Octets | Field Name  | Description                               |
+------------------------------------------------------------------+
| 0..3   | SYNC        | 'TALI'                                    |
+------------------------------------------------------------------+
| 4..7   | OPCODE      | 'isot'                                    |
+------------------------------------------------------------------+
| 8..9   | LENGTH      | Length                                    |
+------------------------------------------------------------------+
| 10..X  | ISUP Data   | Raw ISUP data starting at the Layer 3 SIO |
|        |             | field.                                    |
+------------------------------------------------------------------+

3.2.2.2.1 ISUP Encapsulation using TALI 🎀

When an ISUP MSU arrives at an SG from a 56 Kbps or DS1 link and gets routed inside the SG to an IP device, the SG does this to the SS7 MSU 🛠️:

  • discards the MTP Layer 2 information, CRC and flags 🗑️
  • places MTP Layer 3 into the SERVICE payload area of the TALI packet 📦
  • sets the SYNC field
  • sets the OPCODE to isot
  • sets the LENGTH to the number of octets in the SERVICE field 🔢

Once the fully formed isot TALI packet is created, it gets handed to the TCP socket layer and sent 🚀. The transmission process adds TCP, IP and MAC header information 🍓.

Since the routing information gets placed in the TALI Packet, the SG doesn't need to save any routing information 💅.

                            SS7 MSU

        |          Layer 3            |     Layer 2      |
        |                             |                  |
   +----+---+----+----+---+-------+---+--+---+---+---+---+----+
   |Flag|FCS|ISUP|Msg.|CIC|Routing|SIO|LI|FIB|FSN|BIB|BSN|Flag|
   |    |   |Part|Type|   |Label  |   |  |   |   |   |   |    |
   +----+---+----+----+---+-------+---+--+---+---+---+---+----+
            |                         /
            |                        /
            |                       |
     TALI   +-----------------------+---+------+----+
     Packet |  Service              |LEN|Opcode|SYNC|
            +-----------------------+---+------+----+
            |                                       /
            |                              ---------
            |                             /
            +----------------------------+------+------+------+
     IP     | TALI Packet                |TCP   | IP   | MAC  |
     Packet |                            |Header|Header|Header|
            +----------------------------+------+------+------+

Figure 7: Encapsulation of ISUP MSUs using the TALI 'isot' opcode 🖼️

When an isot TALI packet is received on an SG from an IP device, the SG does this to the isot packet 📥:

  • validates the TALI header ✅
  • allocates space for a new SS7 message 🆕
  • extracts the MTP Layer 3 data from the SERVICE area and places it in the new SS7 message 🎁

Once the isot packet is transformed back into a normal SS7 MSU, the MSU gets routed inside the SG according to the normal SS7 routing procedures 🌈.

3.2.2.3 MTP3 Service Message (mtp3) 🧚

The mtp3 opcode delivers SS7 MSUs with a Service Indicator of 0-2, 4, 6-15 (non-SCCP, non-ISUP) over a TALI connection 🦋. It's also only used on TALI protocol stacks that are implemented without SAAL 🙅‍♀️. The MTP3 layer of the SS7 MSU IS part of the data sent across TCP/IP for this opcode 💖. The data portion of the TALI mtp3 message begins with the SIO byte of the MTP3 header in the SS7 MSU 🌸.

+------------------------------------------------------------------+
| Octets | Field Name  | Description                               |
+------------------------------------------------------------------+
| 0..3   | SYNC        | 'TALI'                                    |
+------------------------------------------------------------------+
| 4..7   | OPCODE      | 'mtp3'                                    |
+------------------------------------------------------------------+
| 8..9   | LENGTH      | Length                                    |
+------------------------------------------------------------------+
| 10..X  | Layer 3 MSU | Raw MSU data starting at the Layer 3 SIO  |
|        | Data        | field.                                    |
+------------------------------------------------------------------+

3.2.2.3.1 MTP3 Encapsulation using TALI ✨

okay so when an SS7 MSU with SI=0-2,4,6-15 shows up at an SG from a 56 Kbps or DS1 link and gets routed inside the SG to an IP device, the SG does this to it 💅

  • discards the MTP Layer 2 information, CRC and flags 🫧
  • places MTP Layer 3 into the SERVICE payload area of TALI packet 🎀
  • The SYNC field is set ✨
  • The OPCODE is set to 'mtp3' 🦋
  • The LENGTH is set to the number of octets in the SERVICE field 🌸

once the fully formed 'mtp3' TALI packet is made, it gets handed to the TCP socket layer and sent off. the transmission process then adds the TCP, IP and MAC header info on top. it's giving layers 🧁

                             SS7 MSU

           |      Layer 3              |     Layer 2      |
           |                           |                  |
      +----+---+-----------+-------+---+--+---+---+---+---+----+
      |Flag|FCS|Other Layer|Routing|SIO|LI|FIB|FSN|BIB|BSN|Flag|
      |    |   |3 Data     |Label  |   |  |   |   |   |   |    |
      +----+---+-----------+-------+---+--+---+---+---+---+----+
               |                       /
               |                 ------
               |                /
        TALI   +----------------+---+------+----+
        Packet |  Service       |LEN|Opcode|SYNC|
               +----------------+---+------+----+
               |                                /
               |                              --
               |                             /
               +----------------------------+------+------+------+
        IP     | TALI Packet                |TCP   | IP   | MAC  |
        Packet |                            |Header|Header|Header|
               +----------------------------+------+------+------+

      Figure 8: Encapsulation of SS7 MSUs with SI!=3,5,13 using 'mtp3'

when an 'mtp3' TALI packet comes into an SG from an IP device, the SG does this 🔥

  • validates the TALI header 🧐
  • Allocates space for a new SS7 message 🌈
  • extracts the MTP Layer 3 data from the SERVICE area and places it in the new SS7 message 💜

once the 'mtp3' packet has been turned back into a normal SS7 MSU, the MSU gets routed inside the SG using the normal SS7 routing procedures. main character energy 👑

3.2.2.4 SAAL Service Message (saal)

the 'saal' opcode is used to deliver SS7 MSUs with any Service Indicator over a TALI connection 🦋. it's only used on TALI protocol stacks that are implemented with SAAL, so it's a very specific lane 🛣️. the 'saal' opcode also carries SAAL peer to peer packets over a TALI connection. those are the SSCF peer to peer packets and the SSCOP peer to peer packets, other than SS7 service data 🧚.

when it's used to transfer SS7 MSUs, the MTP3 layer of the SS7 MSU IS part of the data sent across TCP/IP for this opcode. the data portion of the TALI 'saal' message starts at the SIO byte of the MTP3 header in the SS7 MSU and ends with the last byte of the SSCOP trailer 🫶

when it's used for SSCF/SSCOP peer to peer messages, the data portion of the TALI 'saal' message includes the entire SSCOP PDU ✨

   +------------------------------------------------------------------+
   | Octets | Field Name  | Description                               |
   +------------------------------------------------------------------+
   | 0..3   | SYNC        | 'TALI'                                    |
   +------------------------------------------------------------------+
   | 4..7   | OPCODE      | 'saal'                                    |
   +------------------------------------------------------------------+
   | 8..9   | LENGTH      | Length                                    |
   +------------------------------------------------------------------+
   | 10..X  | Layer 3     | Raw MSU data starting at the Layer 3 SIO  |
   |        | Data        | field.                                    |
   +------------------------------------------------------------------+
   | (X+1)  | SSCOP       | Zero (0) to three (3) octets of padding   |
   |  ..Y   | Trailer     | plus 4 octets for the trailer data.  The  |
   |        |             | total length of the Layer 3 Data and the  |
   |        |             | SSCOP trailer must be a multiple of 4.    |
   +------------------------------------------------------------------+

                        or

   +------------------------------------------------------------------+
   | Octets | Field Name  | Description                               |
   +------------------------------------------------------------------+
   | 0..3   | SYNC        | 'TALI'                                    |
   +------------------------------------------------------------------+
   | 4..7   | OPCODE      | 'saal'                                    |
   +------------------------------------------------------------------+
   | 8..9   | LENGTH      | Length                                    |
   +------------------------------------------------------------------+
   | 10..X  | SAAL Peer   | Raw SSCF/SSCOP peer to peer packets are   |
   |        | to Peer     | also transferred over the TALI connection |
   |        | message     | using this 'saal' opcode.                 |
   +------------------------------------------------------------------+

3.2.2.4.1 MTP3 and SAAL Peer to Peer Encapsulation using TALI

when an SS7 MSU (with any SI) arrives at an SG from a 56 Kbps or DS1 link and gets routed inside the SG for sending to an IP device, the SG does this 💖

  • discards the MTP Layer 2 information, CRC and flags 🫧
  • the MSU is passed from an MTP3 processing software layer to the SSCF and SSCOP layers (the SAAL layers). those layers convert the SS7 MSU into an SSCOP PDU. part of that conversion is adding an SSCOP trailer 🧩
  • the SSCOP PDU (whether it's a peer to peer SAAL message or an SS7 MSU in an SSCOP PDU) is copied into the SERVICE payload area of the TALI packet 🎀
  • The SYNC field is set ✨
  • The OPCODE is set to 'saal' 🦋
  • The LENGTH is set to the number of octets in the SERVICE field 🌸

once the fully formed 'saal' TALI packet is made, it gets handed to the TCP socket layer and sent. the transmission process adds TCP, IP and MAC header info 🧁

since the routing information lives inside the TALI packet, the SG doesn't need to save any routing information 🌟

                               SS7 MSU

           |          Layer 3          |     Layer 2      |
           |                           |                  |
      +----+---+-----------+-------+---+--+---+---+---+---+----+
      |Flag|FCS|Other Layer|Routing|SIO|LI|FIB|FSN|BIB|BSN|Flag|
      |    |   |3 Data     |Label  |   |  |   |   |   |   |    |
      +----+---+-----------+-------+---+--+---+---+---+---+----+
               |                       |
               |                       |
               |                       |
       +-------+-----------------------+
       |SSCOP  |  Service              |
       |Trailer|                       |
       +-------+-----------------------+
       |                               |
       +-------+-----------------------+---+------+----+
       |Service with SSCOP Trailer     |LEN|Opcode|SYNC|
       +-------+-----------------------+---+------+----+
       |                                               /
       |                              -----------------
       |                             /
       +----------------------------+------+------+------+
       | TALI Packet                |TCP   | IP   | MAC  |
       |                            |Header|Header|Header|
       +----------------------------+------+------+------+

   Figure 9: Encapsulation of SAAL PDUs using the TALI 'saal' opcode

when an 'saal' TALI packet is received at the SG from an IP device, the SG does this 🔍

  • validates the TALI header 🧐
  • Allocates space for a new SSCOP PDU message 🌈
  • extracts the SSCOP PDU data from the SERVICE area and places it in the new SSCOP PDU message 💜

once the 'saal' packet has been turned back into a normal DS1 SSCOP PDU, the SSCOP PDU goes to the SAAL layer for receive processing. if it's a peer to peer PDU, it gets processed completely in the appropriate SAAL layer. if it's an SS7 MSU, the MSU gets turned back into a normal SS7 MSU and routed inside the SG using the normal SS7 routing procedures 🚦

3.3 TALI Timers ⏰

Version 1.0 of the TALI specification defined 4 TALI timers that are used as part of the TALI state machine. they're generically named 'T1' through 'T4'. brief descriptions of each one are in the subsections below. timer expiration events for each of T1-T4 show up as inputs to the TALI state machine. for the exact processing of each timer (when to start/stop, and how to process timer expirations), check out the TALI state machine 🕵️‍♀️

both ends of the TALI connection have there own T1-T4 timers. the T1-T4 timer values can be set on each end of the connection independently of the settings on the far end. for each timer, a default value and range is recommended in the following sections 💅

3.3.1 T1 Timer

the T1 timer is the time interval between the origination of a 'test' message at each TALI implementation. each time T1 expires, the TALI implementation should send a 'test' 🧪

3.3.2 T2 Timer

the T2 timer is the amount of time the Peer has to return an 'allo' or a 'proh' in response to a 'test'. if the far end fails to reply with 'allo' or 'proh' before T2 expires, the sender of the 'test' treats the T2 expiration as a protocol violation 🚨. note that T2 must be < T1 for these timers to work as designed 🙈

3.3.3 T3 Timer

the T3 timer controls how long the near end should keep processing Service Data received from the far end after a Management Prohibit Traffic Event has happened (at the near end) 🫣. it's used when there's a transition from NEA-FEA (both ends allowed to send service data) to NEP-FEA (only the far end willing to send service data). on that transition, it's reasonable to expect the far end needs some time to adjust its TALI state machine and divert service data traffic away from this socket 🦋. the T3 timer controls how much time the far end has to divert traffic 💜

3.3.4 T4 Timer

the T4 timer is the time interval between the origination of a 'moni' message at each TALI implementation. each time T4 expires, the TALI implementation should send a 'moni' 🌸

okay so bestie, here's the timer cheat sheet 📋 the table below shows the recommended default and the configurable range for each TALI timer 💅

+------------------------------------------------------------------+
|Name|  Min  |  Max  |Default| Description                         |
+------------------------------------------------------------------+
| T1 | 100ms | 60sec | 4 sec | Send test PDU timer                 |
+------------------------------------------------------------------+
| T2 | 100ms | 60sec | 3 sec | Response timer for an allo or proh  |
|    |       |       |       | response to test message.           |
+------------------------------------------------------------------+
| T3 | 100ms | 60sec | 5 sec | Timer controls how long to process  |
|    |       |       |       | rcvd serv data after an NE          |
|    |       |       |       | transition from NEA to NEP.  System |
|    |       |       |       | is waiting for a proa response to   |
|    |       |       |       | the first proh send when NE         |
|    |       |       |       | transitions from NEA to NEP.        |
+------------------------------------------------------------------+
| T4 | 100ms | 60sec |10 sec | Send moni PDU timer                 |
+------------------------------------------------------------------+

                         Table 5: Timers
🚨 NOTE: T1 has to be at least one (1) millisecond bigger than T2, or the system can get stuck in the T1 expired condition 🙃 If T1 is equal to or less than T2, it will expire, restart T2, and stop enforcing responses to the test message. 💀

enforcing the min and max timer values is up to each implementation 🫶

3.4 TALI User Events 🎛️

every TALI implementation must give you a bunch of user event controls over how the TALI state machine behaves for each TALI connection ✨ how you get to those controls is up to the implementation 💖

3.4.1 Management Open Socket Event 🔌

the 'mgmt open socket' event, together with the 'mgmt close socket' event, lets the user decide when each defined TALI connection forms its TCP socket connection 🦋 when 'open socket' happens for a TALI connection, that connection should start trying to form a TCP socket connection to the peer 🚀

the steps to connect depend on whether that end of the TALI connection is the client or the server 👑 the exact steps are implementation dependent and may vary based on the TCP stack being used 🧚

generally, TALI clients form socket connections with these BSD sockets calls:

Socket()
Bind()
Connect()

and generally, TALI servers form socket connections with these BSD sockets calls:

Socket()
Bind()
Listen()
Accept()

3.4.2 Management Close Socket Event 🚪

the 'mgmt close socket' event can be issued by the user when they want the TCP socket for a TALI socket closed right away, or when they want it to stop trying to connect to the peer 🙅‍♀️ after 'close socket' is acted on, the TALI connection won't be established until 'mgmt open socket' is issued 🔁

3.4.3 Management Allow Traffic Event 🟢

the 'mgmt allow traffic' event, together with the 'mgmt prohibit traffic' event, lets the user control when each defined TALI connection is willing to carry SS7 service data over that particular TALI connection 🌸 when 'mgmt allow traffic' is issued, the TALI implementation becomes willing to carry service data ✨ the TALI state for the near end should move to NEA (near end allowed) if the connection is already established 💜

3.4.4 Management Prohibit Traffic Event 🔴

the 'mgmt prohibit traffic' event is the total opposite of 'allow traffic' 🙈 when 'mgmt prohibit traffic' is issued, the TALI implementation becomes unwilling to carry SS7 service data over that particular TALI connection 🫠 the TALI state for the near end should move to NEP (near end prohibited) if the connection is already established 🍓

3.5 Other Implementation Dependent TALI Events 👀

on top of timers, each TALI implementation needs to be able to detect these events and react to them accordingly 🧠

  • Connection Established. When the TCP socket connection is first established, the TALI state machine must be notified. 🎉
  • Connection Lost. When the TCP socket connection is lost, because of socket errors during reads or writes, the TALI state machine must be notified. 💔
  • Protocol Violations. Any violation of the TALI protocol, as discussed in 3.7.1.3. 🚨

3.6 TALI States 🌈

the TALI version 1.0 spec runs on a state machine that considers 6 TALI states 💅 each end of the TALI connection keeps its own TALI state 🫶

+------------------------------------------------------------------+
| Name       | Description                                         |
+------------------------------------------------------------------+
| OOS        | The TALI connection is out of service.  This usually|
|            | corresponds to a user event to 'close' the socket,  |
|            | or a user event to 'deactivate the SS7 link'.       |
+------------------------------------------------------------------+
| Connecting | The TALI layer is attempting to establish a TCP     |
|            | socket connection to the peer.  Servers are         |
|            | 'accepting', clients are 'connecting'.              |
+------------------------------------------------------------------+
| NEP-FEP    | The TCP socket connection is established.  Neither  |
|            | side of the connection is ready to use the socket   |
|            | for service PDUs.                                   |
+------------------------------------------------------------------+
| NEP-FEA    | The TCP socket connection is established.  The NE is|
|            | not ready to use the socket for service PDUs.  The  |
|            | FE is ready to use the socket for service PDUs.     |
+------------------------------------------------------------------+
| NEA-FEP    | The TCP socket connection is established.  The NE is|
|            | ready to use the socket for service PDUs.  The FE is|
|            | not ready to use the socket for service PDUs.       |
+------------------------------------------------------------------+
| NEA-FEA    | The TCP socket connection is established.  Both     |
|            | sides are ready to use the socket for service PDUs. |
|            | This is the only state where normal bi-directional  |
|            | SS7 data transfer occurs.                           |
+------------------------------------------------------------------+

                              Table 6: TALI States

3.7 TALI Version 1.0 State Machine 🤖

this section gives the state machine that every TALI implementation must follow to be compliant with this spec 📜✨

3.7.1 State Machine Concepts 💭

a few concepts get covered before we get to the actual state machine 📚

3.7.1.1 General Protocol Rules 📏

  1. Neither side can send service data unless both sides are allowed.
  2. Each side initializes to the prohibited state for both near end and far end.
  3. State changes between the NEx-FEx states are signaled with either an 'allo' or 'proh'.
  4. Each side can poll the far end's state with a 'test'. Upon sending 'test', T1 and T2 should always be restarted.
  5. Each side polls the far end with a 'test' every T1 expiration.
  6. The reply to a 'test' is based on the state of the near end only.
  7. The reply to a 'test' is either 'allo' or 'proh'.
  8. A far end signals the last service PDU has been transmitted with either a 'proh' or a 'proa'.
  9. Upon receiving a 'proh', the receiver must always reply with 'proa'.
  10. The NE cannot gracefully close a socket unless a 'proh' is sent and 'proa' is received.
  11. On the transition from NEA to NEP, after sending a 'proh', the near end must continue to process received service data until a 'proa' is received or until a T3 timer expires.

3.7.1.2 Graceful Shutdown of a Socket 🧼

the state table treats a management request to close the socket as a 'hard' shutdown 💥 it closes the socket right away no matter what state it's in 😤 so the correct steps for a graceful shutdown of a socket (from the NEA_FEP or NEA_FEA states) are:

  1. Management issues a Management Prohibit Traffic Event on the socket.
  2. Management waits for T3 to expire.
  3. Management can then issue a Close Socket Event on the socket.

3.7.1.3 TALI Protocol Violations 🚩

each TALI implementation must detect when violations of the TALI protocol happen and react accordingly 🫣 protocol violations include:

  • Invalid sync code in a received message
  • Invalid opcode in a received message
  • Invalid length field in a received message
  • Not receiving an 'allo' or 'proh', in response to the origination of a 'test', before the T2 timer expires
  • Receiving Service Messages on a prohibited socket.
  • TCP Socket errors - Connection Lost

in the state machine coming up, State/Event combos that should be treated as protocol violations are marked with a 'PV' in the state/event cell 🔍 all of the 'PV' events then get processed as per the 'Protocol Violation' row in the table 💅🖤

3.7.2 The State Machine ✨

Okay bestie, this is the big one 🎀 The state machine is where all the TALI drama actually happens, so buckle up 💅

Here's the internal data it needs. There's a boolean called sock_allowed, and it basically says whether the NE is allowed to carry Service Messages 🦋

Initial conditions are giving "fresh start" 🌸

Initial Conditions:
sock_allowed = FALSE
state = OOS
no timers running

Now the main event, Table 7 💖 Read it by finding your current state across the top, then the event down the side. Whatever's in the box is what happens 🧚

   +------------------------------------------------------------------+
   |   State| OOS  |Connecting| NEP-FEP | NEP-FEA | NEA-FEP | NEA-FEA |
   |Event   |      |          |         |         |         |         |
   +------------------------------------------------------------------+
   |T1 Exp. |      |          |Send test|Send test|Send test|Send test|
   |        |      |          |Start T1 |Start T1 |Start T1 |Start T1 |
   |        |      |          |Start T2 |Start T2 |Start T2 |Start T2 |
   +------------------------------------------------------------------+
   |T2 Exp. |      |          |   PV    |   PV    |   PV    |   PV    |
   +------------------------------------------------------------------+
   |T3 Exp. |      |          |   PV    |   PV    |         |         |
   +------------------------------------------------------------------+
   |T4 Exp. |      |          |Send moni|Send moni|Send moni|Send moni|
   |        |      |          |Start T4 |Start T4 |Start T4 |Start T4 |
   +------------------------------------------------------------------+
   |Rcv test|      |          |Send proh|Send proh|Send allo|Send allo|
   +------------------------------------------------------------------+
   |Rcv allo|      |          | Stop T2 | Stop T2 | Stop T2 | Stop T2 |
   |        |      |          | NEP-FEA |         | NEA-FEA |         |
   +------------------------------------------------------------------+
   |Rcv proh|      |          | Stop T2 | Stop T2 | Stop T2 | Stop T2 |
   |        |      |          |Send proa|Send proa|Send proa|Flush or |
   |        |      |          |         | NEP-FEP |         | reroute |
   |        |      |          |         |         |         |Send proa|
   |        |      |          |         |         |         | NEA-FEP |
   +------------------------------------------------------------------+
   |Rcv proa|      |          | Stop T3 | Stop T3 |         |         |
   +------------------------------------------------------------------+
   |Rcv moni|      |          |Convert  |Convert  |Convert  |Convert  |
   |        |      |          | to mona | to mona | to mona | to mona |
   |        |      |          |Send mona|Send mona|Send mona|Send mona|
   +------------------------------------------------------------------+
   |Rcv mona|      |          |Implemen-|Implemen-|Implemen-|Implemen-|
   |        |      |          |tation   |tation   |tation   |tation   |
   |        |      |          |dependent|dependent|dependent|dependent|
   +------------------------------------------------------------------+
   |Rcv     |      |          |   PV    |If T3 run|   PV    |Process  |
   | Service|      |          |         | Process |         |         |
   |        |      |          |         |Else PV  |         |         |
   +------------------------------------------------------------------+
   |Connect.|      | Start T1 |         |         |         |         |
   |Estab.  |      | Start T2 |         |         |         |         |
   |        |      | Start T4 |         |         |         |         |
   |        |      |(if non-0)|         |         |         |         |
   |        |      |if sock_  |         |         |         |         |
   |        |      |  allowed |         |         |         |         |
   |        |      |  = TRUE  |         |         |         |         |
   |        |      | send allo|         |         |         |         |
   |        |      | send test|         |         |         |         |
   |        |      | NEA-FEP  |         |         |         |         |
   |        |      |else      |         |         |         |         |
   |        |      | send proh|         |         |         |         |
   |        |      | send test|         |         |         |         |
   |        |      | NEP-FEP  |         |         |         |         |
   +------------------------------------------------------------------+
   |Connect.|      |          |   PV    |   PV    |   PV    |   PV    |
   |Lost    |      |          |         |         |         |         |
   +------------------------------------------------------------------+
   |Protocol|      |          |Stop all |Stop all |Stop all |Stop all |
   |Violat. |      |          | timers  | timers  | timers  | timers  |
   |        |      |          |Close the|Close the|Close the|Close the|
   |        |      |          | socket  | socket  | socket  | socket  |
   |        |      |          |Connect- |Connect- |Connect- |Connect- |
   |        |      |          |  ing    |  ing    |  ing    |  ing    |
   +------------------------------------------------------------------+
   |Mgmt.   |Open  |          |         |         |         |         |
   |Open    |socket|          |         |         |         |         |
   |Socket  |Conne-|          |         |         |         |         |
   |        | cting|          |         |         |         |         |
   +------------------------------------------------------------------+
   |Mgmt.   |      |Close the |Stop all |Stop all |Stop all |Stop all |
   |Close   |      | socket   | timers  | timers  | timers  | timers  |
   |Socket  |      |OOS       |Close the|Close the|Close the|Close the|
   |        |      |          | socket  | socket  | socket  | socket  |
   |        |      |          |OOS      |OOS      |OOS      |OOS      |
   +------------------------------------------------------------------+
   |Mgmt.   |sock_ |sock_allo-|sock_all-|sock_all-|sock_all-|sock_all-|
   |Prohibit|allow-| wed=FALSE| owed=   | owed=   | owed=   | owed=   |
   |Socket  |ed =  |          | FALSE   | FALSE   | FALSE   | FALSE   |
   |        |FALSE |          |         |         |send proh|send proh|
   |        |      |          |         |         |start t3 |start t3 |
   |        |      |          |         |         | NEP-FEP | NEP-FEA |
   |        |      |          |         |         |         |         |
   +------------------------------------------------------------------+
   |Mgmt.   |sock_ |sock_allo-|sock_all-|sock_all-|sock_all-|sock_all-|
   |Allow   |allow-| wed=TRUE | owed=   | owed=   | owed=   | owed=   |
   |Traffic |ed =  |          | TRUE    | FALSE   | TRUE    | TRUE    |
   |        |TRUE  |          |send allo|send allo|         |         |
   |        |      |          | NEA-FEP | NEA-FEA |         |         |
   +------------------------------------------------------------------+
   |User    |reject| reject   | reject  | reject  | reject  | send    |
   |Part    |data  | data     | data    | data    | data    | data    |
   |Msgs.   |      |          |         |         |         |         |
   +------------------------------------------------------------------+

                     Table 7: TALI 1.0 State Machine

3.8 TALI 1.0 Implementation Notes 🍓

Okay so a few things about the TALI 1.0 implementation didn't get a proper spotlight in the state machine or the earlier text 🙈 (or they got mentioned but we're going over them again here, because they matter). Some of these notes are about what the software layer above TALI is expected to do, so keep that in mind as you read 🫶

3.8.1 Failure on a TCP/IP Socket

  • The failure to read or write from a TCP socket shall be detected and generate a connection lost event.

3.8.2 Congestion on a TCP/IP Socket

  • Message streams can be monitored for congestion via implementation dependent methods.
  • One possible definition of congestion for the previous requirement might be when a TCP socket is blocked.

3.9 TALI 1.0 Limitations 💀

Here's where the TALI 1.0 spec and implementation admit they've got some limits 🥺 There are a couple we need to flag:

  • For SCCP traffic, only UDT and XUDT Class 0 and Class 1 traffic should be managed by this protocol.
  • When the MTP3 Routing Label is not part of the data transmitted across the wire, priority zero (0) traffic is used for all traffic when the SIO is regenerated.

4. TALI Version 2.0 👑

Okay, version 2.0 is giving "upgrade with the same vibe" 🌈 It adds several things on top of 1.0, and it does that by introducing three new TALI opcodes. The basic functionality and most of the 1.0 details are NOT changed by the 2.0 additions, so you don't have to relearn everything 🦋

Here's the summary of the messages and the message structure used in TALI 2.0 💜

   +------------------------------------------------------------------+
   | OCTET | DESCRIPTION           | SIZE     | VALUE  |    TYPE      |
   +------------------------------------------------------------------+
   | 0..3  | SYNC                  | 4 Octets |        | 4 byte ASCII |
   +------------------------------------------------------------------+
   |       |   TALI                |          | 'TALI' |              |
   +------------------------------------------------------------------+
   | 4..7  | OPCODE                | 4 Octets |        | 4 byte ASCII |
   +------------------------------------------------------------------+
   |       |   Test Service        |          | 'test' |              |
   |       |   Allow Service       |          | 'allo' |              |
   |       |   Prohibit Service    |          | 'proh' |              |
   |       |   Prohibit Service Ack|          | 'proa' |              |
   |       |   Monitor Socket      |          | 'moni' |              |
   |       |   Monitor Socket Ack  |          | 'mona' |              |
   |       |   SCCP Service        |          | 'sccp' |              |
   |       |   ISUP Service o/TALI |          | 'isot' |              |
   |       |   MTP3 Service o/TALI |          | 'mtp3' |              |
   |       |   Service o/SAAL      |          | 'saal' |              |
   |       |   Management Message  |          | 'mgmt' |              |
   |       |   Extended Service Msg|          | 'xsrv' |              |
   |       |   Special Message     |          | 'spcl' |              |
   +------------------------------------------------------------------+
   | 8..9  | LENGTH                | 2 Octets |        | integer      |
   |       |   (least significant  |          |        |              |
   |       |    byte first) non-0  |          |        |              |
   |       |    if Service or      |          |        |              |
   |       |    Socket monitor msg |          |        |              |
   +------------------------------------------------------------------+
   | 10..X | DATA PAYLOAD          | variable |        | variable     |
   +------------------------------------------------------------------+

Since 2.0 barely changes 1.0, this chapter only covers a few things 💅 Specifically:

  • Detailed information on how a TALI implementation can identify itself as a 2.0 implementation versus a 1.0 implementation
  • Detailed information on how to provide backward compatibility for a connection to a far end that is only TALI 1.0 capable
  • Detailed information regarding the new 2.0 opcodes
  • Detailed information regarding any other changes to the information presented in previous sections that need to be implemented in order to be 2.0 compatible.

So the main thing to know is that you should read this chapter as if you're upgrading an existing TALI 1.0 implementation to pick up the new 2.0 features 🎀✨

4.1 Overview of TALI Version 2.0 Features ✨

okay so bestie, TALI 2.0 is basically 1.0 with a glow-up 💅 you only need a small number of changes to your 1.0 implementation to support it 🦋 Figure 10 shows everything that feeds the 2.0 State Machine. The only differences from the 1.0 inputs are these:

Three new TALI opcodes can be sent and received between a TALI node and its peer 🌸 They are:

  • 'mgmt'
  • 'xsrv'
  • 'spcl'

Three new User Part capabilities also need to be supported by the layer above TALI in each implementation 🎀 The user part has to provide support for 'mgmt', 'xsrv', and 'spcl' data.

You'll get more detail on the three new opcodes in their own sections of this chapter 📖 but here's the quick tea on what each one is for:

  • 'mgmt' - This opcode is meant to let MANAGEMENT data pass between the TALI endpoints, which is data that manages how the device operates 🧚 Examples of this management data include:
    • configuration data, like which SS7 traffic streams a peer would like to receive over a specific socket
    • SS7 Network Management data, like information about point code (un)availability and congestion
    • enabling or disabling various socket options, like which messages are supported or how to format data
  • 'xsrv' - Extended Service Opcodes 🚀 The TALI protocol could be extended to carry other kinds of traffic that aren't covered by the 1.0 service data opcodes ('sccp', 'isot', 'mtp3', or 'saal'). By defining a new 'xsrv' service opcode, TALI opens the door to being used for other types of data transport 🌈
  • 'spcl' - Special services ⭐ Vendors may want to build special services into their TALI implementations that only switch on when the implementation is connected to other equipment running the same special services 👑 This opcode gives a general way to find out more about who the TALI session is connected to, and a way to turn on special features based on the vendor and implementation on the far end.
   +====+    +---------+                    +============+
   |    |    | Service | +-------------+    |            |
   |User|    | Message,| | Mgmt. Open  |    | MANAGEMENT |
   |Part|<-->| MGMT,   | | Mgmt. Close |<-->|            |
   |    |    | XSRV,   | | Mgmt. Proh. |    |            |
   |    |    | SPCL    | | Mgmt. Allow |    +============+
   +====+    +---------+ +-------------+
                   ^            ^
                   |            |
                   v            v
   +========================================================+
   |                 TALI State Machine                     |
   +========================================================+
         ^               ^                 ^             ^
         |               |                 |             |
         v               |                 |             |
    +---------+          |                 |             |
    | Received|   +-----------------+ +-----------+ +------------+
    | 'test', |   | Connection est. | | Protocol  | | T1 Expired |
    | 'allo', |   | Connection lost | | Violation | | T2 Expired |
    | 'proh', |   |                 | |           | | T3 Expired |
    | 'proa', |   +-----------------+ +-----------+ | T4 Expired |
    | 'moni', |          ^                  ^       +------------+
    | 'mona', |          |                  |             ^
    | 'mgmt', |          |                  |             |
    | 'xsrv', |          |                  |             |
    | 'spcl', |          |                  |             |
    |   or    |    +========================================+
    | Service |    |         IMPLEMENTATION                 |
    | Message |    |           DEPENDENT                    |
    +---------+    +========================================+
         ^
         |
         v
     +============+
     |    PEER    |
     |            |
     +============+

     Figure 10: Overview of Inputs to the TALI 2.0 State Machine

4.2 TALI Version Identification 🦋

okay so the 1.0 spec didn't give you a simple way to figure out which TALI version you're talking to 🙈 BUT the general purpose 'moni' message from 1.0 can totally solve that in 2.0 🔥

Let's recall how loosely 'moni' was defined back in 1.0:

  • The main job of 'moni' was to be a general purpose ECHO 🏓 One thing that ECHO could be used for was measuring Round Trip TALI/TALI processing time.
  • The data part of a 'moni' could be anywhere from 0-200 bytes long. What went in that area was totally up to the implementation.
  • Nothing required an implementation to ever send a 'moni'.
  • If an implementation did send 'moni', it should use the T4 timer to control how often it sends them.
  • The receiver of a 'moni' should not make any assumptions about its data part 🙅‍♀️ The receiver should just turn the 'moni' into a 'mona' and send it back with the same data part.

TALI 2.0 implementations should use the 'moni' message to identify the version, following these bullets 💖

  • The main purpose of 'moni' is now twofold:
  • To provide version identification
    • To keep providing a general purpose ECHO capability, which can be used to measure Round Trip time or do other implementation specific tasks ✨
  • The data part of a 'moni' is now split into 2 portions:
    • a portion dedicated to version identification, which is 12 bytes long and has a specific format that must be followed 🎀
    • followed by a free format section that an implementation can use however it likes 🧁
  • The overall length of a 'moni' data part should still not exceed 200 bytes. This is required to keep backward compatibility with 1.0 implementations, which may check for a maximum length of 200 bytes on the 'moni' opcode 🫶
  • If a TALI implementation wants to identify itself as a version 2.0 node, it must send a 'moni' encoded as per Table 8. Every 'moni' it sends should follow the encoding in Table 8. The version label should not change from 'moni' to 'moni'. The data after the version label can change from 'moni' to 'moni', and it can keep being used for RTT calculations or other purposes 🌟
  • If a TALI implementation is trying to figure out whether the far end of the TALI connection has implemented version 2.0, the implementation must examine any received 'moni' messages that arrive from the far end and see whether they conform to the new, stricter 'moni' encoding in Table 8. When a TALI 2.0 node receives 'moni', it compares the 12 bytes of data in the VER LABEL field with a list of predetermined strings to work out the functionality of the TALI node it's connected to 🔍 If the data doesn't match any of the predetermined strings, the Far End is assumed to be a TALI 1.0 node.
  • Each TALI implementation must assume that the far end of the connection is a 1.0 implementation until an arriving 'moni' announces that the far end supports TALI version 2.0 🥺 If a 'moni' never arrives, the implementation knows the far end has implemented version 1.0 of the specification.
  • TALI 1.0 implementations can receive newly encoded 'moni' messages and simply ignore the data 😌 They will keep operating as if the far end is always a 1.0 node (ignore the data part of the 'moni', convert the 'moni' to a 'mona', and return the 'mona').
  • The next section has more info about backwards compatibility, meaning 2.0 implementations connected to devices that implemented version 1.0 of the specification 💅
   +------------------------------------------------------------------+
   | Octets | Field Name  | Description                  | Field Type |
   +------------------------------------------------------------------+
   | 0..3   | SYNC        | 'TALI'                       |4 byte ASCII|
   +------------------------------------------------------------------+
   | 4..7   | OPCODE      | 'moni'                       |4 byte ASCII|
   +------------------------------------------------------------------+
   | 8..9   | LENGTH      | Length (includes the version | Integer    |
   |        |             | label and data fields)       |            |
   +------------------------------------------------------------------+
   | 10..21 | Ver. Label  | 'vers xxx.yyy'               | 12 byte    |
   |        | See note    |                              | ASCII      |
   +------------------------------------------------------------------+
   | 22..X  | DATA        | Vendor Dependent             | Variable   |
   |        |             | Maximum length of this       |            |
   |        |             | message (as coded in octets 8|            |
   |        |             | -9, and stored in bytes 10-X)|            |
   |        |             | should not exceed 200 bytes. |            |
   +------------------------------------------------------------------+

               Table 8: Version Control 'moni' Message
   NOTE: xxx.yyy = provides the Major and Minor release number of the
                   TALI specification being implemented.
         001.000 = Tali version 1.0
         002.000 = Tali version 2.0     // this specification.
         002.001 = Tali version 2.1     // a minor change to 2.0
         003.000 = Tali version 3.0
         and so on.

The 'vers 002.000' field is an 12 byte field of field type 'ascii text'. As such, 'v' should be the first byte of the field that is transmitted out the wire 🦋✨

That's the end of 4.2, and honestly the whole version-ID trick is so iconic 🌈

4.3 Backwards Compatibility 💖

Okay bestie, so when we add new functionality to TALI, backwards compatibility from TALI version 2.0 to version 1.0 is required 🫶. It's so important because TALI 2.0 nodes might be connected to far ends that only support version 1.0. These two implementations need to keep inter-operating, and the 2.0 node has to fall back to supporting only 1.0 opcodes in that situation 🦋.

The last section explained how a TALI 2.0 implementation can use the moni it sends to identify itself as a 2.0 node, and how it can use the moni it receives to figure out if the far end is also a 2.0 node 💅. On top of that, here's how backwards compatibility must be achieved ✨:

  • As documented in the version 1.0 specification, TALI 1.0 implementations that receive TALI messages with mgmt, xsrv, and spcl opcodes will treat the message as a Protocol Violation (invalid opcode received). The Protocol Violation will cause the socket to be dropped immediately 💀.
  • It is therefore required that a 2.0 implementation only send mgmt, xsrv, and spcl opcodes after it has used a received moni message to determine that the far end is a 2.0 (or later) implementation and has identified itself as a 2.0 (or later) implementation 🌸.
  • Each TALI 2.0 implementation must use the moni as described in the previous section to identify themselves as 2.0, and to learn if the far end is 2.0 🎀.
  • Each TALI 2.0 implementation should maintain a variable as part of its state machine, far_end_version. The far_end_version should be initialized to 1.0 when the socket is established. Each time a 2.0 implementation receives moni, it should update the far_end_version variable. If the moni did not contain a version label, the far_end_version should be reset to 1.0. If the moni did contain a version label for 2.0 (or a later version), the far_end_version should be set accordingly 🧚.
  • Each time a 2.0 implementation receives a new 2.0 opcode (mgmt, xsrv, and spcl) from the far end, it should examine the far_end_version. If the far_end_version indicates the far end is a 1.0 implementation, the received TALI message should be treated as a Protocol Violation (invalid opcode). If the far_end_version is 2.0 (or later), the 2.0 implementation should process the received mgmt/xsrv/spcl according to that node's capabilities for that opcode 🔥.
  • Each time a 2.0 implementation receives a request to send a TALI message with a 2.0 opcode (mgmt/xsrv/spcl) from a higher layer of software, it should examine the far_end_version. If the far_end_version indicates the far end is a 1.0 implementation, the request to send the 2.0 opcode should be denied or ignored (an implementation decision) and the 2.0 opcode must NOT be sent to the far end 🙈. If the far_end_version indicates the far end is 2.0 (or later), the request can be satisfied and the TALI message with the 2.0 opcode can be sent to the far end 💜.
  • Each TALI 2.0 implementation can provide a varying level of support for each of the three new 2.0 opcodes (mgmt/xsrv/spcl). In other words, an implementation may wish to only support SOME OF the primitives within the new opcodes. The level of support for each 2.0 opcode (mgmt/xsrv/spcl) is independent of the other two 2.0 opcodes 🌈.
  • The basic message structure for TALI messages using the new 2.0 opcodes is presented in Table 9 📋.
  • The minimal level of support that is required for each of the 2.0 opcodes (mgmt/xsrv/spcl) is to be able to receive TALI messages with these opcodes, recognize the new opcode, and ignore the message without affecting the state machine. The TALI state should not change. The socket connection should stay up. In other words, a 2.0 implementation can elect to ignore any received mgmt/xsrv/spcl messages, if that implementation does not care to support the capability intended by that particular opcode 😌.
  • A partial level of support for a 2.0 opcode could be implemented. Partial support may consist of understanding the data structure for the 2.0 opcode, but only supporting some of the variants of the opcode. The message structure for each of the new 2.0 opcodes consists of an extra Primitive field that follows the TALI opcode and message length fields. Each Primitive is used to differentiate a variant of the opcode. It is envisioned that each new 2.0 opcode can be extended by adding new Primitives, as more capabilities are defined for the opcode, without having to add new TALI opcodes 🦄. A 2.0 implementation may understand and be willing to act on some of the Primitives for an opcode, but not others. Receiving variants of a 2.0 opcode that an implementation does not understand need to be ignored and not affect the 2.0 state machine 🍓.
  • The full level of support for a 2.0 opcode could be implemented. This support would consist of understanding and fully supporting every Primitive within the 2.0 opcode 👑.

Here's Table 9, the basic structure for the new 2.0 opcodes:

+------------------------------------------------------------------+
| Octets | Field Name  | Description                  | Field Type |
+------------------------------------------------------------------+
| 0..3   | SYNC        | 'TALI'                       |4 byte ASCII|
+------------------------------------------------------------------+
| 4..7   | OPCODE      | 'mgmt', 'xsrv' or 'spcl'     |4 byte ASCII|
+------------------------------------------------------------------+
| 8..9   | LENGTH      | Length (length of the rest   | Integer    |
|        |             | of this packet)              |            |
+------------------------------------------------------------------+
| 10..13 | Primitive   | 'wxyz', or a 4 byte text     |  4 byte    |
|        | See note    | that is appropriate for the  |  ASCII     |
|        |             | given opcode                 |            |
+------------------------------------------------------------------+
| 14..X  | DATA        | The content of the data area | Variable   |
|        |             | is dependent on the opcode/  |            |
|        |             | primitive combination        |            |
+------------------------------------------------------------------+

    Table 9: Basic Message Structure for New 2.0 TALI Opcodes

NOTE: The Primitive field acts as a modifier for each opcode. Within an opcode, different operations or groups of operations can be defined and supported. The Primitive identifies each different operation or set of operations 🎀.


4.3.1 Generating Protocol Violations based on Received Messages

As implied by some of the bullets before Table 9, it's a goal of the 2.0 TALI specification to relax some of the error checking that happens when received TALI messages get processed 😭✨.

Version 1.0 of this specification was super strict about the fields it checked for each received message. As each message was processed, the SYNC code, opcode and length field were checked. If any of these fields were invalid, an internal protocol violation was generated, and processing that violation caused the socket to go down 💀. On top of those 3 specific checks (sync, opcode, length), the overall vibe of version 1.0 was to treat any received data the receiver didn't understand, or that it decided had incorrectly coded fields, as a protocol violation 🙅‍♀️.

Version 2.0 introduces the possibility of partial support for opcodes, partial support for primitives, and partial support for various fields (like support for ANSI Pt Codes but not ITU Pt Codes) 🌍. So the overall approach to data the receiver doesn't support needs to be relaxed from version 1.0's strict treatment. Version 2.0 implementations should be more tolerant when they receive messages they don't support (or which they believe contain incorrectly coded fields). This tolerance should include NOT treating these receives as protocol violations 🫧.

Version 2.0 implementations should perform the following level of strict/loose checks on the received messages 📝:

  • Checks against the sync codes, opcodes and lengths for version 1.0 and version 2.0 opcodes should be performed (against Table 3 and Table 11). Invalid data in these fields should be treated as cause for protocol violations 🚨.
  • Checks against the opcode field for messages with new 2.0 opcodes (mgmt/xsrv/spcl) should be performed to determine whether the message can be processed by the implementation. If an implementation chooses to NOT support a particular 2.0 opcode, the received message should be discarded. Internal data (such as measurements, logs of messages, user notifications) could record the event, and the TALI state should NOT be affected 🍵.
  • Checks against the primitive field for messages with new 2.0 opcodes (mgmt/xsrv/spcl) should be performed to determine whether the message can be processed by the implementation. If an implementation does not understand a particular primitive, or has chosen NOT to implement the features for a particular primitive, the received message should be discarded. Internal data (such as measurements, logs of messages, user notifications) could record the event, and the TALI state should NOT be affected 🌷.
  • Checks against other field types in messages with new 2.0 opcodes (such as checking the encoding of a Point Code field for a valid Pt Code type) should also be performed in a 'soft' manner. Errors found in individual fields should cause the received message to be discarded. Internal data (such as measurements, logs of messages, user notifications) could record the event, and the TALI state should NOT be affected 🧁.

The goals behind this gentler treatment of errors in received data are:

  • To keep the socket up in order to perform the primary purpose of the connection (ie: to continue to transport SS7 data) in spite of improperly formatted/unsupported TALI messages related to other features/extensions/etc. 🛟
  • To allow applications to support and use some of the features for a particular TALI revision without requiring the application to implement all of the functionality for the TALI revision 🧩.
  • To increase the extensibility of the protocol. Looser receive checks are preferred in order to be able to add new primitives and new primitive operations as they are defined 🚀.

4.4 Overview of the TALI Message Structure 🦋

The basic message structure for all TALI messages is unchanged with the addition of new 2.0 opcodes. The base TALI header still consists of SYNC + OPCODE + LENGTH, as described in Table 2 🌸.

The message structure for the new 2.0 opcodes was shown in Table 9. These messages define an extra required field, PRIMITIVE, that follows the LENGTH field of Table 2 💖.

4.4.1. Types of TALI Fields ✨

Okay so, Table 4 in the version 1.0 spec already gave implementation notes for every "types of fields" entry in 1.0 🌸 The good news is that TALI 2.0 keeps using all of those types 💖 It also adds some brand-new field types for messages that use the new 2.0 opcodes 🔥 Those new ones are in the table below, and they get used alongside the Table 4 types to implement the 2.0 protocol. It's giving teamwork 🫶

   +-----------+------------------------------------------------------+
   |Field Type | Implementation Notes for that Type                   |
   +------------------------------------------------------------------+
   |SS7 Point  | Used to transmit point code information for ANSI or  |
   |Code       | ITU variants of point codes across the TALI interface|
   |           | * The point code structure is 4 bytes. Byte 3 is used|
   |           |   to identify the TYPE of point code. The actual     |
   |           |   point code is then encoded in bytes 0-2 (w/byte 0  |
   |           |   being the least significant byte and the first byte|
   |           |   transmitted across the wire)                       |
   |           | * Byte 3: encoding of the type of point code (PC)    |
   |           |   0 = an ANSI Full PC                                |
   |           |   1 = an ITU International Full PC w/ a 3/8/3 coding |
   |           |       scheme for zone/area/identifier                |
   |           |   2 = an ITU National Full PC w/ a raw 14 bit PC     |
   |           |   3 = unused                                         |
   |           |   4 = an ANSI Cluster PC                             |
   |           | * For ANSI Full PC w/byte 3=0.  These point codes are|
   |           |   24 bit point codes as follows:                     |
   |           |   Byte 2 = Network                                   |
   |           |   Byte 1 = Cluster                                   |
   |           |   Byte 0 = Member                                    |
   |           | * For ITU International Full PC (3/8/3) w/byte 3=1.  |
   |           |   These point codes use 14 bits (stored in the 14    |
   |           |   least significant bits in bytes 0&1).  Byte 2 is   |
   |           |   unused.  The 14 bits should be interpreted as 3    |
   |           |   bits of zone, 8 bits of area and 3 bits of         |
   |           |   signaling point identifier.  The 3 bits of         |
   |           |   signaling point identifier are the 3 least         |
   |           |   significant bits.                                  |
   |           | * For ITU National Full PC w/byte 3=2. These point   |
   |           |   codes use 14 bits (stored in the 14 least          |
   |           |   significant bits in bytes 0&1).  Byte 2 is unused. |
   |           |   The 14 bits represent a single 14-bit quantity that|
   |           |   constitutes the point code.                        |
   |           | * For unused w/byte 3=3.  Bytes 0 through 2 are      |
   |           |   undefined.                                         |
   |           | * For ANSI Cluster PC, w/byte 3=4.  These point codes|
   |           |   are 24 bit point codes as follows:                 |
   |           |   Byte 2 = Network                                   |
   |           |   Byte 1 = Cluster                                   |
   |           |   Byte 0 = 0. This field is ignored and should be    |
   |           |   coded as 0...all members of the cluster are implied|
   |           | * Byte 0 is the first byte that is transmitted across|
   |           |   the wire, followed by byte 1, byte 2, then byte 3. |
   +------------------------------------------------------------------+
   |Bit-Field  | * Field containing an array of N bits, where N is a  |
   |           |   multiple of 8.  Bit-Field types should be          |
   |           |   transmitted such that the byte containing bits 0   |
   |           |   through 7 is transmitted across the wire first,    |
   |           |   followed by the byte containing bits 8 through 15, |
   |           |   etc.                                               |
   |           | * The software for each implementation should be     |
   |           |   written in a manner that accounts for the required |
   |           |   byte order of transmission (ie: the Big Endian/    |
   |           |   Little Endian characteristics of the processor need|
   |           |   to be dealt with in the software).                 |
   +------------------------------------------------------------------+
   |Version    |A TALI version label is a 12 byte ASCII text field.   |
   |Label      |The label is of a format 'vers xxx.yyy', where xxx.yyy|
   |           |are used to identify the version such as 002.000.  As |
   |           |with other ASCII text fields, the first byte of the   |
   |           |text field (the 'v') should be the first byte         |
   |           |transmitted out the wire.                             |
   +------------------------------------------------------------------+
   |Primitive  |Messages that use the new TALI 2.0 opcodes all have a |
   |           |4 byte text ASCII field referred to as a Primitive.   |
   |           |The Primitive acts as a modifier for the opcode. This |
   |           |allows a single opcode to be used to perform multiple |
   |           |actions.                                              |
   +------------------------------------------------------------------+
   |Primitive  |A Primitive can be used to specify either a specific  |
   |Operation  |action or a set of actions.  When the Primitive field |
   |           |is used to specify a set of actions, an operation     |
   |           |field is used to pick a specific operation within that|
   |           |group of actions. Operation fields are 4 byte integers|
   +------------------------------------------------------------------+
   |Private    |Various RFC documents have detailed a set of assigned |
   |Enterprise |numbers (RFC 1700, Assigned Numbers) and defined data |
   |Code       |structures (RFC 1155, Structure and Identification of |
   |(PEC)      |Management Information for IP-based Internets)        |
   |           |that are used on IP networks to provide network       |
   |           |management information.                               |
   |           |Network Management Object Identifiers (OID) are used  |
   |           |to recognize specific organizations, companies,       |
   |           |protocols, and so on, in a manner that all vendors can|
   |           |agree on.                                             |
   |           |An Object Identifier exists which uniquely describes  |
   |           |each company that does business in the data/telecomm  |
   |           |industry.  That OID is referred to as an 'SMI Network |
   |           |Management Private Enterprise Code', which we are     |
   |           |shortening to Private Enterprise Code of PEC in this  |
   |           |document for simplicity.  Each PEC is assumed to have |
   |           |a defined prefix of                                   |
   |           |'iso.org.dod.internet.private.enterprise' or          |
   |           |(1.3.6.1.4.1).                                        |
   |           |                                                      |
   |           |The PEC for each company can be found via a file at:  |
   |           |ftp://ftp.isi.edu/in-notes/iana/assignments/          |
   |           | enterprise-numbers                                   |
   |           |                                                      |
   |           |To encode the PEC for a vendor in each implementation |
   |           |of TALI, a 2 byte integer field is used.  The contents|
   |           |of the integer field should match the PEC code for    |
   |           |that company in the file mentioned above.             |
   |           |                                                      |
   |           |For example, Tekelec, which has a PEC of 323, will    |
   |           |code this 2 byte field as '0x0143'.                   |
   |           |                                                      |
   |           |Like other integer fields, the PEC value is           |
   |           |transmitted Least Significant Byte first across the   |
   |           |ethernet wire.                                        |
   +------------------------------------------------------------------+

Table 10: Implementation for new field types introduced in TALI 2.0 🎀

4.5. Detailed TALI Message Structures for New 2.0 Opcodes 🧚

okay so the message structures for the 1.0 opcodes are totally unchanged from what we already covered, with ONE exception: the moni message 💅 its 2.0 format was explained earlier, so go look there if you need it.

Next up, we get the detailed message structures and the capabilities for each of the new 2.0 opcodes. Before we dive in, Table 11 tells you the minimum and maximum LENGTH field values that should be supported for each new opcode (plus moni/mona). It also shows how the ITU support added in 2.0 changes things. The routing label for ITU point codes only uses 4 octets instead of 7 like ANSI does 🦋

   +------------------------------------------------------------------+
   | Opcode | Valid Length | Comments                                 |
   |        | Field Values |                                          |
   +------------------------------------------------------------------+
   | moni   | 0-200 bytes  | The overall length of the data portion   |
   |        |              | for 'moni' on TALI 2.0 implementations   |
   |        |              | is unchanged from version 1.0 of the     |
   |        |              | specification and remains at 200 bytes   |
   |        |              | to provide backwards compatibility.      |
   +------------------------------------------------------------------+
   | mona   | 0-200 bytes  | The overall length of the data portion   |
   |        |              | for 'mona' on TALI 2.0 implementations   |
   |        |              | is unchanged from version 1.0 of the     |
   |        |              | specification and remains at 200 bytes   |
   |        |              | to provide backwards compatibility.      |
   +------------------------------------------------------------------+
   | mgmt   | 4-4096 bytes | The minimum length of 4 bytes is required|
   |        |              | to provide space for the Primitive field.|
   |        |              | The maximum length allows large TCP      |
   |        |              | packets to be supported if desired.      |
   +------------------------------------------------------------------+
   | xsrv   | 4-4096 bytes | The minimum length of 4 bytes is required|
   |        |              | to provide space for the Primitive field.|
   |        |              | The maximum length allows large TCP      |
   |        |              | packets to be supported if desired.      |
   +------------------------------------------------------------------+
   | spcl   | 4-4096 bytes | The minimum length of 4 bytes is required|
   |        |              | to provide space for the Primitive field.|
   |        |              | The maximum length allows large TCP      |
   |        |              | packets to be supported if desired.      |
   +------------------------------------------------------------------+
   | sccp   | 9-265 bytes  | These are the valid sizes for the        |
   |        |              | SCCP-ONLY portions of SCCP UDT MSUs.     |
   +------------------------------------------------------------------+
   | isot   | 8-273 bytes  | The length is the number of octets that  |
   |        |              | in the MTP3 and higher layer(s) of the   |
   |        |              | SS7 MSU.  This length includes the SIO   |
   |        |              | byte and all bytes in the SIF (Service   |
   |        |              | Information Field) field.  The MTP3      |
   |        |              | routing label is part of the SIF field.  |
   +------------------------------------------------------------------+
   | mtp3   | 8-280 bytes  | The length is the number of octets that  |
   |        |              | in the MTP3 and higher layer(s) of the   |
   |        |              | SS7 MSU.  This length includes the SIO   |
   |        |              | byte and all bytes in the SIF (Service   |
   |        |              | Information Field) field.  The MTP3      |
   |        |              | routing label is part of the SIF field.  |
   +------------------------------------------------------------------+
   | saal   | 8-280 bytes  | The length is the number of octets that  |
   |        |              | in the MTP3 and higher layer(s) of the   |
   |        |              | SS7 MSU.  This length includes the SIO   |
   |        |              | byte and all bytes in the SIF (Service   |
   |        |              | Information Field) field.  The MTP3      |
   |        |              | routing label is part of the SIF field.  |
   |        |              | Seven (7) octets of SSCOP trailer is     |
   |        |              | added to the message.  The SSCOP trailer |
   |        |              | bytes are also included in the length.   |
   +------------------------------------------------------------------+

     Table 11: Valid Length Fields for Opcodes Affected by TALI 2.0

4.5.1. Management Message (mgmt) 💜

okay the mgmt opcode is basically the管理 lane 😭 it lets Management data (or data that manages how the device runs) get passed between the TALI endpoints over the socket connection. mgmt messages can be received and processed in any of the TALI NEx-FEx states, so no state is off limits 🙌 There are three PRIMITIVES for this opcode:

  • 'rkrp' - Routing Key Registration Primitive. This is the one that lets nodes set up which SS7 traffic streams they want to receive over each socket. And the best part? This 'routing key registration' happens in-band, right through TALI messages 🌸
  • 'mtpp' - MTP3 Primitives. This one passes SS7 MTP3 network management messages about the (un)availability and congestion states of SS7 devices over to the IP device's SG 🍓
  • 'sorp' - Socket Options Registration Primitive. This one lets each TALI device turn various socket options on or off ✨

As of version 2.0, these three ('rkrp', 'mtpp', and 'sorp') are the ONLY defined primitives for mgmt. More can be added later to level up the Management capabilities of the SG or IP devices, so we'll see 👀 Here's the basic message structure for the 2.0 mgmt messages, and it's the same for all 3 primitives 🎀

   +------------------------------------------------------------------+
   | Octets | Field Name  | Description                               |
   +------------------------------------------------------------------+
   | 0..3   | SYNC        | 'TALI'                                    |
   +------------------------------------------------------------------+
   | 4..7   | OPCODE      | 'mgmt'                                    |
   +------------------------------------------------------------------+
   | 8..9   | LENGTH      | Length                                    |
   +------------------------------------------------------------------+
   | 10..13 | Primitive   | 'rkrp', 'mtpp' or 'sorp'  Each of these   |
   |        |             | primitives specify a group of applicable  |
   |        |             | management operations.                    |
   +------------------------------------------------------------------+
   | 14..17 | Primitive   | The operation field specifies the one     |
   |        | Operation   | operation within the group of operations  |
   |        |             | identified by the primitive.              |
   +------------------------------------------------------------------+
   | 18..   | Message     | The content of the message data area is   |
   |        | Data        | dependent on the combination of opcode/   |
   |        |             | primitive/operation fields.  Each of those|
   |        |             | combinations could use a different message|
   |        |             | data structure.                           |
   +------------------------------------------------------------------+

              Table 12: Message Structure for 'mgmt' opcode

the message data area changes depending on the opcode/primitive/operation combo 🌈 so every combo can bring its own data structure, which is honestly iconic 💅

4.5.1.1 Routing Key Registration Primitive (rkrp) 💖

The rkrp primitive lets IP nodes update the application routing key table in the SG by sending TALI messages that set up which SS7 traffic streams they want on each socket. ✨ This routing key registration happens in-band, through TALI messages, so you don't have to touch the SG user interface to configure the routing keys. It's basically giving yourself a VIP pass 🎀

Remember from earlier in this doc that the spec supports five (5) types of fully specified routing keys 🦋

  • A key for SCCP traffic, where key = DPC-SI-SSN, where SI=3.
  • A key for ISUP traffic, where key = DPC-SI-OPC-CIC Range, where SI=5. The CIC values for traditional ISUP are 14 bit quantities in ANSI networks and 12 bit quantities in ITU networks.
  • A key for TUP traffic, where key = DPC-SI-OPC-CIC Range, where SI=4. This key is only supported for ITU networks. The CIC values for TUP keys are 12 bit quantities in ITU networks.
  • A key for QBICC traffic (an extension of ISUP which uses 32 bit CIC codes), where key = DPC-SI-OPC-CIC, where SI=13. The CIC values for QBICC keys are 32 bit quantities for ANSI and ITU networks.
  • A key for OTHER-MTP3-SI (non-SCCP, non-ISUP, non-QBICC for ANSI and non-SCCP, non-ISUP, non-QBICC, non-TUP for ITU) traffic, where key = DPC-SI

Each of these is a fully specified key, which means the exact content of the MSU being routed has to match the data in the routing key. 🙈

Now for the extra stuff! 🌈 Extensions have been added for partial match and default routing keys. These help when the SG can't find a fully specified routing key that matches an MSU, so the traffic doesn't just get dropped. Partial match keys give you closest-match routing, like "ignore the CIC" for ISUP/QBICC/TUP traffic, or "ignore the SSN" for SCCP traffic. 🧚 Default keys are the last resort: they're where the MSU goes when no full or partial routing key was found. Iconic backup plan 💅

The partial and default key types are in the table below. The 4th column tells you which data structure the TALI rkrp message uses to operate on each key type. ✨ Note: the keys are listed top to bottom in the hierarchical search order an SG uses to find a routing key for an MSU. Partial and default keys only get used after the SG has tried to find a fully specified key that matches the MSU. 👑

+--------+------------+--------------------------------+-----------+
|Key     | Key        | Comments                       | Cross     |
|Type    | Attributes |                                | Reference |
+--------+------------+--------------------------------+-----------+
|Partial | DPC-SI-OPC |Used as backup routes for CIC   | 4.5.1.1.2 |
|        |            |based traffic (but ignoring the |           |
|        |            |CIC field).                     |           |
+--------+------------+--------------------------------+-----------+
|Partial | DPC-SI     |Used as backup routes for CIC   | 4.5.1.1.4 |
|        |            |based or SCCP traffic (but      |           |
|        |            |ignoring the OPC-CIC or SSN).   |           |
|        |            |Routes traffic based solely on  |           |
|        |            |DPC and SI of the MSU.          |           |
+--------+------------+--------------------------------+-----------+
|Partial | DPC        |Used as a backup route for any  | 4.5.1.1.4 |
|        |            |MSU type.  Routes traffic based |           |
|        |            |solely on the DPC field.        |           |
+--------+------------+--------------------------------+-----------+
|Partial | SI         |Used as a backup route for any  | 4.5.1.1.4 |
|        |            |MSU type.  Routes traffic based |           |
|        |            |solely on the SI field.         |           |
+--------+------------+--------------------------------+-----------+
|Default | -          |If no other type of routing key | 4.5.1.1.5 |
|        |            |for an MSU can be found, use    |           |
|        |            |this one.                       |           |
+--------+------------+--------------------------------+-----------+

Table 13: Partial and Default Routing Keys (in hierarchical order)

Each rkrp message says what it wants to do through an RKRP Operation field. 🎀 The capabilities are:

  • ENTER: This one links a specific socket to a specific application routing key. 💖 The socket in the link is always the one the rkrp came in on, and the routing key names an SS7 traffic stream that should go over that socket. Several sockets can share the same routing key, and when they do, they all get traffic in a 'load sharing' mode 🫶 An override field can wipe out any other socket links for that routing key and add just one. ENTER works for fully specified SCCP keys, CIC based keys (ISUP, Q.BICC, and TUP), OTHER-MTP3-SI keys, all types of partial keys, and the default routing key. 🔥
  • DELETE: This one removes the link between a specific socket and a specific application routing key. Again, the socket is always the one the rkrp arrived on. Other socket links for the same routing key are NOT affected by the deletion. 🙅‍♀️ Once the last socket link for a routing key is deleted, the whole routing key entry is removed from the database. DELETE works for the same key types as ENTER. 💀
  • SPLIT: This one turns one application routing key into 2 application routing keys that together cover exactly the same SS7 traffic stream as the original. ✂️ Right after a split, both new entries keep the same socket links as the original key. After that, you can change the socket links for each of the 2 ranges independently of the other. SPLIT only works on fully specified CIC based keys (ISUP, QBICC, and TUP). Each one is uniquely identified by its DPC/SI/OPC/CIC range combination. The CIC range is a continuous set of numbers from CICS(start) to CICE(end), and it matches the CIC value in a CIC based MSU. 🌸
  • RESIZE: This one changes the CIC range for a single application routing key. 📏 It only works on fully specified CIC based routing keys. It swaps the CICS/CICE values for a routing key with a new CIC range (NCICS/NCICE). You can pick a lot of different NCICS/NCICE ranges based on the existing CICS/CICE. The main limit is that the new range can't already exist in the database and can't overlap any other entry in it. The socket links for the routing key are NOT affected by the CICS/CICE change. RESIZE is only for fully specified CIC based keys (ISUP, Q.BICC, and TUP), same as SPLIT. 🦋

These are the RKRP Operations (and their encodings) supported for TALI version 2.0:

           0x0001 - ENTER ISUP KEY
           0x0002 - DELETE ISUP KEY
           0x0003 - SPLIT ISUP KEY
           0x0004 - RESIZE ISUP KEY
           0x0005 - ENTER Q.BICC ISUP KEY
           0x0006 - DELETE Q.BICC ISUP KEY
           0x0007 - SPLIT Q.BICC ISUP KEY
           0x0008 - RESIZE Q.BICC ISUP KEY
           0x0009 - ENTER SCCP KEY
           0x000A - DELETE SCCP KEY
           0x000B - ENTER OTHER-MTP3-SI KEY
           0x000C - DELETE OTHER-MTP3-SI KEY
           0x000D - ENTER TUP KEY (ITU only)
           0x000E - DELETE TUP KEY (ITU only)
           0x000F - SPLIT TUP KEY (ITU only)
           0x0010 - RESIZE TUP KEY (ITU only)
           0x0011 - ENTER DPC-SI-OPC PARTIAL KEY
           0x0012 - DELETE DPC-SI-OPC PARTIAL KEY
           0x0013 - ENTER DPC-SI PARTIAL KEY
           0x0014 - DELETE DPC-SI PARTIAL KEY
           0x0015 - ENTER DPC PARTIAL KEY
           0x0016 - DELETE DPC PARTIAL KEY
           0x0017 - ENTER SI PARTIAL KEY
           0x0018 - DELETE SI PARTIAL KEY
           0x0019 - ENTER DEFAULT
           0x001A - DELETE DEFAULT KEY
           0x001B - MULTIPLE REGISTRATION SUPPORT

The message data area of an rkrp message changes with the RKRP Operation, and there are several different structures in play. ✨ You can tell which one applies by looking at the RKRP Operation field. 🧚

To keep implementation simple, each of these structures covers every operation needed for its key type. 💅 That means some fields are required for a given operation, while others don't apply to that rkrp message. The sender should initialize unused fields to 0, and the receiver should ignore them. 🫶

4.5.1.1.1 RKRP Data Structures 🎀

4.5.1.1.1.1 Common Fields in all RKRP Messages 🎀

okay so bestie, every RKRP data structure is about to show up in this part, and they ALL start with the same three fields. 💅 That's on purpose. If a receiver gets an RKRP request it doesn't recognize, it can still answer in a consistent way, so nobody gets left on read. 🫶 The data structure should begin at byte 14 of the TALI message, as shown in Table 12. ✨

Table 14 lists the fields every 'rkrp' data structure has in common:

+------------------------------------------------------------------+
| Octets | Field Name  | Description                  | Field Type |
+------------------------------------------------------------------+
| 2      | RKRP        | Identifies which 'rkrp'      | Integer    |
|        | Operation   | operation is desired.        |            |
+------------------------------------------------------------------+
| 2      | Request/    | Identifies whether the 'rkrp'| Integer    |
|        | Reply       | message is a request (from an|            |
|        |             | IP node to SG) for some type |            |
|        |             | of 'rkrp' action, or a reply |            |
|        |             | to a previous request (from  |            |
|        |             | the SG back to the IP node). |            |
|        |             | This integer field uses the  |            |
|        |             | following encodings:         |            |
|        |             | 0x0000=Request               |            |
|        |             | 0x0001=Reply.  See Success/  |            |
|        |             | Failure code for more info.  |            |
+------------------------------------------------------------------+
| 2      | Success/    | Provides a success/failure   | Integer    |
|        | Failure     | indication as part of the    |            |
|        | Code        | reply back to the IP node    |            |
|        |             | for each processed request.  |            |
|        |             | This field is only used when |            |
|        |             | the Request/Reply field is   |            |
|        |             | 0x0001.  This field uses the |            |
|        |             | encodings from in section 5. |            |
+------------------------------------------------------------------+

Table 14: Common Fields in ALL 'rkrp' Data Structures 💖

The big reason all of these start with the same fields is so a receiver can reply to unknown RKRP messages in a consistent manner. 🦋 When an implementation gets an RKRP request message it doesn't understand, it should turn that request into a reply and use the success/failure code to say the operation is not supported, with an RKRP Reply Code of Unsupported rkrp Operation. 🙈

It is a requirement that these common fields keep being used as new RKRP operations get added to this specification. 💀 That's the only way the "reply to anything unknown" trick will always work, so no skipping it, periodt! 👑

4.5.1.1.1.2 CIC Based Routing Key Operations 🌸

The data structure for 'rkrp' messages about CIC-based MSUs (ISUP, Q.BICC ISUP, and TUP (ITU only)) is in the next table. ✨ It also begins at byte 14 of the TALI message, as shown in Table 12. 🧚

Note 1: the number of bits used in each CIC field depends on the SI and network type. 🍓

  • ISUP operations (0x0001 - 0x0004) are assumed to use 14 bit CIC values from the corresponding fields in the structure when DPC/OPC indicate an ANSI network (12 bits used in ITU networks). Only the 14(12) least significant bits of the 32 bit CIC field will be used. 💅
  • Q.BICC ISUP operations (0x0005 - 0x0008) are assumed to use 32 bit CIC values from the corresponding fields in the structure. 🌈
  • TUP operations (0x000d - 0x0010) are assumed to use 12 bit CIC values from the corresponding fields in the structure when DPC/OPC indicate an ITU network. Only the 12 least significant bits of the 32 bit CIC field will be used. TUP operations are not supported for ANSI networks. 🙅‍♀️

Note 2: this same structure should be used to specify the partial key DPC-SI-OPC(ignoreCIC). 🔑 When you're specifying a DPC-SI-OPC partial key, the CIC fields in this structure should be set to 0 by the sender. 🫶

   +------------------------------------------------------------------+
   | Octets | Field Name  | Description                  | Field Type |
   +------------------------------------------------------------------+
   | 2      | RKRP        | Identifies which 'rkrp'      | Integer    |
   |        | Operation   | operation is desired.        |            |
   +------------------------------------------------------------------+
   | 2      | Request/    | Identifies whether the 'rkrp'| Integer    |
   |        | Reply       | message is a request (from an|            |
   |        |             | IP node to SG) for some type |            |
   |        |             | of 'rkrp' action, or a reply |            |
   |        |             | to a previous request (from  |            |
   |        |             | the SG back to the IP node). |            |
   |        |             | This integer field uses the  |            |
   |        |             | following encodings:         |            |
   |        |             | 0x0000=Request               |            |
   |        |             | 0x0001=Reply.  See Success/  |            |
   |        |             | Failure code for more info.  |            |
   +------------------------------------------------------------------+
   | 2      | Success/    | Provides a success/failure   | Integer    |
   |        | Failure     | indication as part of the    |            |
   |        | Code        | reply back to the IP node    |            |
   |        |             | for each processed request.  |            |
   |        |             | This field is only used when |            |
   |        |             | the Request/Reply field is   |            |
   |        |             | 0x0001.  This field uses the |            |
   |        |             | encodings listed in section  |            |
   |        |             | 5.                           |            |
   +------------------------------------------------------------------+
   | 2      | RKRP flags  | This is a 2 byte bit-field   | Bit-field  |
   |        |             | that provides 16 possible    |            |
   |        |             | flags that can control       |            |
   |        |             | various aspects of the       |            |
   |        |             | operation.                   |            |
   |        |             | Bit 0 - An Override bit is   |            |
   |        |             | used on the ENTER operation  |            |
   |        |             | to control how the socket    |            |
   |        |             | associations for a routing   |            |
   |        |             | key should be manipulated.   |            |
   |        |             | This flag determines if the  |            |
   |        |             | ENTER is to add the given    |            |
   |        |             | socket association in a      |            |
   |        |             | 'load-sharing' mode or if    |            |
   |        |             | the new association should   |            |
   |        |             | replace (Override) all       |            |
   |        |             | existing associations.  This |            |
   |        |             | flag is only examined on     |            |
   |        |             | ENTER operations.            |            |
   |        |             | Bit 0=0, Load Sharing Mode   |            |
   |        |             | Bit 0=1, Override Mode       |            |
   |        |             | Bits 1-15, currently         |            |
   |        |             | undefined                    |            |
   +------------------------------------------------------------------+
   | 1      | SI          | Service Indicator.  The SI   | Integer    |
   |        |             | field in an SS7 MSU          |            |
   |        |             | identifies the type of       |            |
   |        |             | traffic being carried by the |            |
   |        |             | MSU (0=SNM, 3=SCCP, 5=ISUP,  |            |
   |        |             | etc).  Each application      |            |
   |        |             | routing key must specify a   |            |
   |        |             | specific SI value that it    |            |
   |        |             | relates to.                  |            |
   |        |             | SI should be 5 for ISUP keys.|            |
   |        |             | SI should be 13 for Q.BICC   |            |
   |        |             | ISUP keys.                   |            |
   |        |             | SI should be 4 for TUP keys. |            |
   +------------------------------------------------------------------+
   | 4      | DPC         | Destination Point Code.  Each| SS7 Point  |
   |        |             | SS7 MSU contains a DPC that  | Code       |
   |        |             | identifies the destination   |            |
   |        |             | for the MSU.  Each           |            |
   |        |             | application routing key must |            |
   |        |             | specify a specific DPC value |            |
   |        |             | that it relates to.          |            |
   +------------------------------------------------------------------+
   | 4      | OPC         | Origination Point Code.  Each| SS7 Point  |
   |        |             | SS7 MSU contains a OPC that  | Code       |
   |        |             | identifies the source of the |            |
   |        |             | MSU.  ISUP routing keys must |            |
   |        |             | each specify a single OPC    |            |
   |        |             | that the application routing |            |
   |        |             | key relates to.              |            |
   +------------------------------------------------------------------+
   | 4      | CICS        | Circuit Identification Code  | Integer    |
   |        |             | Start.  Each SS7 ISUP MSU    |            |
   |        |             | contains a CIC code.  Each   |            |
   |        |             | ISUP/QBICC/TUP routing key   |            |
   |        |             | identifies a range of CIC    |            |
   |        |             | values that are applicable   |            |
   |        |             | for the routing key.  The    |            |
   |        |             | CICS value is the low end of |            |
   |        |             | the CIC range.               |            |
   +------------------------------------------------------------------+
   | 4      | CICE        | Circuit Identification Code  | Integer    |
   |        |             | End.  Each SS7 ISUP MSU      |            |
   |        |             | contains a CIC code.  Each   |            |
   |        |             | ISUP/QBICC/TUP routing key   |            |
   |        |             | identifies a range of CIC    |            |
   |        |             | values that are applicable   |            |
   |        |             | for the routing key.  The    |            |
   |        |             | CICE value is the high end   |            |
   |        |             | of the CIC range.            |            |
   +------------------------------------------------------------------+
   | 4      | SPLIT CIC   | The SPLIT field is used on   | Integer    |
   |        |             | the SPLIT operation to       |            |
   |        |             | specify where in the existing|            |
   |        |             | CIC range (given by CICS/    |            |
   |        |             | CICE) an existing routing key|            |
   |        |             | should be split into 2       |            |
   |        |             | routing keys.  To be valid,  |            |
   |        |             | the following relationship   |            |
   |        |             | must be true before the SPLIT|            |
   |        |             | is performed:                |            |
   |        |             |    CICS < SPLIT <= CICE.     |            |
   |        |             | After the SPLIT is performed,|            |
   |        |             | the 2 routing keys are as    |            |
   |        |             | follows:                     |            |
   |        |             |    CICS to SPLIT-1           |            |
   |        |             |    SPLIT to CICE             |            |
   +------------------------------------------------------------------+
   | 4      | NCICS       | The NCICS and NCICE fields   | Integer    |
   |        |             | are used on the RESIZE       |            |
   |        |             | operation to specify how the |            |
   |        |             | CIC range for existing       |            |
   |        |             | routing key should be        |            |
   |        |             | modified.  NCICS specifies   |            |
   |        |             | the new value that should    |            |
   |        |             | replace the existing CICS    |            |
   |        |             | value in the routing key.    |            |
   +------------------------------------------------------------------+
   | 4      | NCICE       | The NCICS and NCICE fields   | Integer    |
   |        |             | are used on the RESIZE       |            |
   |        |             | operation to specify how the |            |
   |        |             | CIC range for existing       |            |
   |        |             | routing key should be        |            |
   |        |             | modified.  NCICE specifies   |            |
   |        |             | the new value that should    |            |
   |        |             | replace the existing CICE    |            |
   |        |             | value in the routing key.    |            |
   +------------------------------------------------------------------+

Table 15: Message Data Structure CIC based Routing Key Operations 📋✨

Okay so, here's the handy-dandy chart that tells you which fields are Required (R) and which are Not Applicable (NA) for each RKRP Operation, based on the RKRP Operation field 💅. The table we just looked at is Table 15, so you can check it against that. 🎀

And bestie, this part is lowkey important 🫶: any field marked NA should be initialized to 0 by the sender and ignored by the receiver. We already talked about this earlier, but it's worth repeating because it's so easy to mess up 🙈

Okay so the CIC table wraps up right here, and it's giving very organized 💅

   +------------------------------------------------------------------+
   |      Operation  | ENTER | DELETE | SPLIT | RESIZE | ENTER/DELETE |
   |                 | (ISUP,| (ISUP, | (ISUP,| (ISUP, | PARTIAL DPC  |
   |                 | QBICC,| QBICC, | QBICC,| QBICC, | SI OPC KEY   |
   | Field           | TUP)  | TUP)   | TUP)  | TUP)   |              |
   +------------------------------------------------------------------+
   | Request/Reply   | R     | R      | R     | R      | R            |
   +------------------------------------------------------------------+
   | Success/Failure | R     | R      | R     | R      | R            |
   +------------------------------------------------------------------+
   | RKRP Flags      | R     | R      | R     | R      | R            |
   +------------------------------------------------------------------+
   | SI              | R     | R      | R     | R      | R            |
   +------------------------------------------------------------------+
   | DPC             | R     | R      | R     | R      | R            |
   +------------------------------------------------------------------+
   | OPC             | R     | R      | R     | R      | R            |
   +------------------------------------------------------------------+
   | CICS            | R     | R      | R     | R      | NA           |
   +------------------------------------------------------------------+
   | CICE            | R     | R      | R     | R      | NA           |
   +------------------------------------------------------------------+
   | SPLIT CIC       | NA    | NA     | R     | NA     | NA           |
   +------------------------------------------------------------------+
   | NCICS           | NA    | NA     | NA    | R      | NA           |
   +------------------------------------------------------------------+
   | NCICE           | NA    | NA     | NA    | R      | NA           |
   +------------------------------------------------------------------+

Table 16: Required/Not Applicable Fields for CIC based Routing Keys

4.5.1.1.1.3 SCCP Routing Key Operations ✨

Now for the SCCP routing keys 🦋 The data structure for rkrp messages about SCCP routing keys is in the next table, and it should begin at byte 14 of the TALI message, same as Table 12 shows.

   +------------------------------------------------------------------+
   | Octets | Field Name  | Description                  | Field Type |
   +------------------------------------------------------------------+
   | 2      | RKRP        | Identifies which 'rkrp'      | Integer    |
   |        | Operation   | operation is desired.        |            |
   +------------------------------------------------------------------+
   | 2      | Request/    | Identifies whether the 'rkrp'| Integer    |
   |        | Reply       | message is a request (from an|            |
   |        |             | IP node to SG) for some type |            |
   |        |             | of 'rkrp' action, or a reply |            |
   |        |             | to a previous request (from  |            |
   |        |             | the SG back to the IP node). |            |
   |        |             | This integer field uses the  |            |
   |        |             | following encodings:         |            |
   |        |             | 0x0000=Request               |            |
   |        |             | 0x0001=Reply.  See Success/  |            |
   |        |             | Failure code for more info.  |            |
   +------------------------------------------------------------------+
   | 2      | Success/    | Provides a success/failure   | Integer    |
   |        | Failure     | indication as part of the    |            |
   |        | Code        | reply back to the IP node    |            |
   |        |             | for each processed request.  |            |
   |        |             | This field is only used when |            |
   |        |             | the Request/Reply field is   |            |
   |        |             | 0x0001.  This field uses the |            |
   |        |             | encodings listed in section  |            |
   |        |             | 5.                           |            |
   +------------------------------------------------------------------+
   | 2      | RKRP flags  | This is a 2 byte bit-field   | Bit-field  |
   |        |             | that provides 16 possible    |            |
   |        |             | flags that can control       |            |
   |        |             | various aspects of the       |            |
   |        |             | operation.                   |            |
   |        |             | Bit 0 - An Override bit is   |            |
   |        |             | used on the ENTER operation  |            |
   |        |             | to control how the socket    |            |
   |        |             | associations for a routing   |            |
   |        |             | key should be manipulated.   |            |
   |        |             | This flag determines if the  |            |
   |        |             | ENTER is to add the given    |            |
   |        |             | socket association in a      |            |
   |        |             | 'load-sharing' mode or if    |            |
   |        |             | the new association should   |            |
   |        |             | replace (Override) all       |            |
   |        |             | existing associations.  This |            |
   |        |             | flag is only examined on     |            |
   |        |             | ENTER operations.            |            |
   |        |             | Bit 0=0, Load Sharing Mode   |            |
   |        |             | Bit 0=1, Override Mode       |            |
   |        |             | Bits 1-15, currently         |            |
   |        |             | undefined                    |            |
   +------------------------------------------------------------------+
   | 1      | SI          | Service Indicator.  The SI   | Integer    |
   |        |             | field in an SS7 MSU          |            |
   |        |             | identifies the type of       |            |
   |        |             | traffic being carried by the |            |
   |        |             | MSU (0=SNM, 3=SCCP, 5=ISUP,  |            |
   |        |             | etc).  Each application      |            |
   |        |             | routing key must specify a   |            |
   |        |             | specific SI value that it    |            |
   |        |             | relates to.                  |            |
   |        |             | SI should be 3 for SCCP keys.|            |
   +------------------------------------------------------------------+
   | 4      | DPC         | Destination Point Code.  Each| SS7 Point  |
   |        |             | SS7 MSU contains a DPC that  | Code       |
   |        |             | identifies the destination   |            |
   |        |             | for the MSU.  Each           |            |
   |        |             | application routing key must |            |
   |        |             | specify a specific DPC value |            |
   |        |             | that it relates to.          |            |
   +------------------------------------------------------------------+
   | 1      | SSN         | SubSystem Number.  Each SCCP | Integer    |
   |        |             | MSU contains a subsystem     |            |
   |        |             | number that identifies the   |            |
   |        |             | SCCP subsystem that should   |            |
   |        |             | process the MSU.  SCCP       |            |
   |        |             | routing keys must each       |            |
   |        |             | specify a single SSN that    |            |
   |        |             | the application routing key  |            |
   |        |             | relates to.                  |            |
   +------------------------------------------------------------------+

Table 17: Message Data Structure SCCP Routing Key Operations

Next up is the Required (R) or Not Applicable (NA) breakdown for every field in Table 17, based on the RKRP Operation field 🎀 As I said before, the NA fields are the unused ones, and the sender should initialize them to 0 while the receiver should ignore them 🫶

              +--------------------------------------------+
              |      Operation  | ENTER SCCP | DELETE SCCP |
              | Field           |            |             |
              +--------------------------------------------+
              | Request/Reply   | R          | R           |
              +--------------------------------------------+
              | Success/Failure | R          | R           |
              +--------------------------------------------+
              | RKRP Flags      | R          | R           |
              +--------------------------------------------+
              | SI              | R          | R           |
              +--------------------------------------------+
              | DPC             | R          | R           |
              +--------------------------------------------+
              | SSN             | R          | R           |
              +--------------------------------------------+

Table 18: Required/Not Applicable Fields for SCCP Routing Keys

4.5.1.1.1.4 DPC-SI, DPC and SI based Routing Key Operations ✨

okay bestie, this section is where the DPC-SI, DPC, and SI routing key ops live 🦋 the data structure is the same one used for all the rkrp messages about DPC-SI based stuff (full keys for non-SCCP, non-CIC traffic, or partial keys for CIC based or SCCP), DPC based stuff (partial key), and SI based stuff (partial key). it's giving consistency 💅 and it starts at byte 14 of the TALI message, per Table 12 🌸

+------------------------------------------------------------------+
| Octets | Field Name  | Description                  | Field Type |
+------------------------------------------------------------------+
| 2      | RKRP        | Identifies which 'rkrp'      | Integer    |
|        | Operation   | operation is desired.        |            |
+------------------------------------------------------------------+
| 2      | Request/    | Identifies whether the 'rkrp'| Integer    |
|        | Reply       | message is a request (from an|            |
|        |             | IP node to SG) for some type |            |
|        |             | of 'rkrp' action, or a reply |            |
|        |             | to a previous request (from  |            |
|        |             | the SG back to the IP node). |            |
|        |             | This integer field uses the  |            |
|        |             | following encodings:         |            |
|        |             | 0x0000=Request               |            |
|        |             | 0x0001=Reply.  See Success/  |            |
|        |             | Failure code for more info.  |            |
+------------------------------------------------------------------+
| 2      | Success/    | Provides a success/failure   | Integer    |
|        | Failure     | indication as part of the    |            |
|        | Code        | reply back to the IP node    |            |
|        |             | for each processed request.  |            |
|        |             | This field is only used when |            |
|        |             | the Request/Reply field is   |            |
|        |             | 0x0001.  This field uses the |            |
|        |             | encodings from section 5.    |            |
+------------------------------------------------------------------+
| 2      | RKRP flags  | This is a 2 byte bit-field   | Bit-field  |
|        |             | that provides 16 possible    |            |
|        |             | flags that can control       |            |
|        |             | various aspects of the       |            |
|        |             | operation.                   |            |
|        |             | Bit 0 - An Override bit is   |            |
|        |             | used on the ENTER operation  |            |
|        |             | to control how the socket    |            |
|        |             | associations for a routing   |            |
|        |             | key should be manipulated.   |            |
|        |             | This flag determines if the  |            |
|        |             | ENTER is to add the given    |            |
|        |             | socket association in a      |            |
|        |             | 'load-sharing' mode or if    |            |
|        |             | the new association should   |            |
|        |             | replace (Override) all       |            |
|        |             | existing associations.  This |            |
|        |             | flag is only examined on     |            |
|        |             | ENTER operations.            |            |
|        |             | Bit 0=0, Load Sharing Mode   |            |
|        |             | Bit 0=1, Override Mode       |            |
|        |             | Bits 1-15, currently         |            |
|        |             | undefined                    |            |
+------------------------------------------------------------------+
| 1      | SI          | Service Indicator.  The SI   | Integer    |
|        |             | field in an SS7 MSU          |            |
|        |             | identifies the type of       |            |
|        |             | traffic being carried by the |            |
|        |             | MSU (0=SNM, 3=SCCP, 5=ISUP,  |            |
|        |             | etc).  Each application      |            |
|        |             | routing key must specify a   |            |
|        |             | specific SI value that it    |            |
|        |             | relates to.                  |            |
+------------------------------------------------------------------+
| 4      | DPC         | Destination Point Code.  Each| SS7 Point  |
|        |             | SS7 MSU contains a DPC that  | Code       |
|        |             | identifies the destination   |            |
|        |             | for the MSU.  Each           |            |
|        |             | application routing key must |            |
|        |             | specify a specific DPC value |            |
|        |             | that it relates to.          |            |
+------------------------------------------------------------------+
Table 19: Message Data Structure DPC/SI, DPC and SI based Routing
          Key Operations

so the fields in Table 19 are: RKRP Operation (2 octets, which operation you want), Request/Reply (2 octets, 0x0000 means it's a request from the IP node to the SG, 0x0001 means it's a reply back), Success/Failure Code (2 octets, only used when Request/Reply is 0x0001, and it uses the encodings from section 5), RKRP flags (2 octets, 16 possible bits 🎀), SI (1 octet, the Service Indicator, like 0=SNM, 3=SCCP, 5=ISUP), and DPC (4 octets, the Destination Point Code, which every application routing key has to specify) 🧚

the flags are where it gets spicy 🔥 Bit 0 is the Override bit, and it's only checked on ENTER operations. Bit 0=0 means Load Sharing Mode (the new socket association gets added alongside the others), and Bit 0=1 means Override Mode (the new one replaces all existing associations). Bits 1-15 are currently undefined, so it's a "not yet, sweetie" situation 💜

now the R/NA cheat sheet 📋 Table 20 tells you which fields are Required (R) or Not Applicable (NA) for each RKRP Operation. the NA fields should be initialized to 0 by the sender and ignored by the receiver, just like we talked about earlier 🫶

      +-------------------------------------------------------+
      |      Operation  | ENTER/  | ENTER/  | ENTER/ | ENTER/ |
      |                 | DELETE  | DELETE  | DELETE | DELETE |
      |                 | OTHER   | DPC-SI  | DPC    | SI     |
      | Field           | MTP3 SI | PARTIAL | ONLY   | ONLY   |
      +-------------------------------------------------------+
      | Request/Reply   | R       | R       | R      | R      |
      +-------------------------------------------------------+
      | Success/Failure | R       | R       | R      | R      |
      +-------------------------------------------------------+
      | RKRP Flags      | R       | R       | R      | R      |
      +-------------------------------------------------------+
      | SI              | R       | R       | NA     | R      |
      +-------------------------------------------------------+
      | DPC             | R       | R       | R      | NA     |
      +-------------------------------------------------------+

      Table 20: Required/Not Applicable Fields for DPC/SI, DPC
                and SI based Routing Keys
quick read of Table 20: Request/Reply, Success/Failure, and RKRP Flags are Required for all four operation types 🌈 SI is NA for the DPC ONLY operation, and DPC is NA for the SI ONLY operation. so if you're doing DPC ONLY, skip SI. if you're doing SI ONLY, skip DPC. simple, iconic 👑

4.5.1.1.1.5 Default Routing Key Operations ✨

okay so a default routing key is basically the catch-all 🌸 The data structure for 'rkrp' messages that enter or delete one lives in the table below. It should start at byte 14 of the TALI message, same spot as Table 12 shows 💖

+------------------------------------------------------------------+
| Octets | Field Name  | Description                  | Field Type |
+------------------------------------------------------------------+
| 2      | RKRP        | Identifies which 'rkrp'      | Integer    |
|        | Operation   | operation is desired.        |            |
+------------------------------------------------------------------+
| 2      | Request/    | Identifies whether the 'rkrp'| Integer    |
|        | Reply       | message is a request (from an|            |
|        |             | IP node to SG) for some type |            |
|        |             | of 'rkrp' action, or a reply |            |
|        |             | to a previous request (from  |            |
|        |             | the SG back to the IP node). |            |
|        |             | This integer field uses the  |            |
|        |             | following encodings:         |            |
|        |             | 0x0000=Request               |            |
|        |             | 0x0001=Reply.  See Success/  |            |
|        |             | Failure code for more info.  |            |
+------------------------------------------------------------------+
| 2      | Success/    | Provides a success/failure   | Integer    |
|        | Failure     | indication as part of the    |            |
|        | Code        | reply back to the IP node    |            |
|        |             | for each processed request.  |            |
|        |             | This field is only used when |            |
|        |             | the Request/Reply field is   |            |
|        |             | 0x0001.  This field uses the |            |
|        |             | encodings listed in section  |            |
|        |             | 5.                           |            |
+------------------------------------------------------------------+
| 2      | RKRP flags  | This is a 2 byte bit-field   | Bit-field  |
|        |             | that provides 16 possible    |            |
|        |             | flags that can control       |            |
|        |             | various aspects of the       |            |
|        |             | operation.                   |            |
|        |             | Bit 0 - An Override bit is   |            |
|        |             | used on the ENTER operation  |            |
|        |             | to control how the socket    |            |
|        |             | associations for a routing   |            |
|        |             | key should be manipulated.   |            |
|        |             | This flag determines if the  |            |
|        |             | ENTER is to add the given    |            |
|        |             | socket association in a      |            |
|        |             | 'load-sharing' mode or if    |            |
|        |             | the new association should   |            |
|        |             | replace (Override) all       |            |
|        |             | existing associations.  This |            |
|        |             | flag is only examined on     |            |
|        |             | ENTER operations.            |            |
|        |             | Bit 0=0, Load Sharing Mode   |            |
|        |             | Bit 0=1, Override Mode       |            |
|        |             | Bits 1-15, currently         |            |
|        |             | undefined                    |            |
+------------------------------------------------------------------+

Table 21: Message Data Structure for Default Routing Keys

Next up is the Required (R) or Not Applicable (NA) breakdown for each field in Table 21, based on the RKRP Operation field 🧚 Same reminder as before: unused fields (the NA ones) should be set to 0 by the sender and ignored by the receiver, so nobody gets confused 💅

          +-------------------------------------+
          |      Operation  | ENTER   | DELETE  |
          | Field           | DEFAULT | DEFAULT |
          +-------------------------------------+
          | Request/Reply   | R       | R       |
          +-------------------------------------+
          | Success/Failure | R       | R       |
          +-------------------------------------+
          | RKRP Flags      | R       | R       |
          +-------------------------------------+

Table 22: Required/Not Applicable Fields for Default Routing Keys


4.5.1.1.1.6 Support for Multiple RKRP Registration Operations 🦋

the whole point of letting multiple RKRP operations ride in one TALI message (opcode = mgmt, primitive = rkrp) is to cut down on message count and byte overhead when a huge batch of registrations is going out 🚀 less wrapper, more payload, iconic behaviour 🌈

This functionality is added by 2 mechanisms:

  • a new RKRP operation (0X001B, MULTIPLE REGISTRATIONS SUPPORT) is defined. It's meant for a query/reply exchange, so you can check whether the far end supports multiple RKRP registrations per TALI message before you actually use that capability 👀
  • the basic 'rkrp' message structure is extended so that multiple rkrp operations can follow one another inside a single tali message ✨

4.5.1.1.1.6.1 Multiple Registrations Support 💜

okay so this is where the new RKRP operation and its data structure get introduced 🎀 Its job is to figure out whether a far end device can handle multiple RKRP registration operations in one TALI message, which is very much a "check the vibe before you commit" situation 😌

The data structure for the 'multiple registrations support' operation is in the table below. Like the last one, it should begin at byte 14 of the TALI message, as shown in Table 12 🌸

+------------------------------------------------------------------+
| Octets | Field Name  | Description                  | Field Type |
+------------------------------------------------------------------+
| 2      | RKRP        | Identifies which 'rkrp'      | Integer    |
|        | Operation   | operation is desired.        |            |
+------------------------------------------------------------------+
| 2      | Request/    | Identifies whether the 'rkrp'| Integer    |
|        | Reply       | message is a request (from an|            |
|        |             | IP node to SG) for some type |            |
|        |             | of 'rkrp' action, or a reply |            |
|        |             | to a previous request (from  |            |
|        |             | the SG back to the IP node). |            |
|        |             | This integer field uses the  |            |
|        |             | following encodings:         |            |
|        |             | 0x0000=Request               |            |
|        |             | 0x0001=Reply.  See Success/  |            |
|        |             | Failure code for more info.  |            |
+------------------------------------------------------------------+
| 2      | Success/    | Provides a success/failure   | Integer    |
|        | Failure     | indication as part of the    |            |
|        | Code        | reply back to the IP node    |            |
|        |             | for each processed request.  |            |
|        |             | This field is only used when |            |
|        |             | the Request/Reply field is   |            |
|        |             | 0x0001.  This field uses the |            |
|        |             | encodings listed in section  |            |
|        |             | 5.                           |            |
+------------------------------------------------------------------+
| 4      | Operations  | This field is used by the    | Integer    |
|        | Per Message | reply to tell the requester  |            |
|        |             | the maximum # of RKRP        |            |
|        |             | registration operations per  |            |
|        |             | TALI message that are        |            |
|        |             | supported by the             |            |
|        |             | implementation.              |            |
|        |             | * This field should be set   |            |
|        |             |   to 0 when the request/     |            |
|        |             |   reply field is set to      |            |
|        |             |   Request.                   |            |
|        |             | * This field should be set to|            |
|        |             |   the Maximum # of operations|            |
|        |             |   per TALI message that a    |            |
|        |             |   TALI implementation is     |            |
|        |             |   willing to support when the|            |
|        |             |   request/reply field is set |            |
|        |             |   to Reply.                  |            |
+------------------------------------------------------------------+

Table 23: Message Data Structure for Multiple Registrations Support Operation

Here's the Required (R) or Not Applicable (NA) rundown for every field in the structure above 💅 Same deal as always: NA fields should be initialized to 0 by the sender and ignored by the receiver 🫶

        +-------------------------------------------------+
        |      Operation  | MULTIPLE      | MULTIPLE      |
        |                 | REGISTRATIONS | REGISTRATIONS |
        |                 | SUPPORT       | SUPPORT       |
        | Field           | REQUEST       | REPLY         |
        +-------------------------------------------------+
        | Request/Reply   | R             | R             |
        +-------------------------------------------------+
        | Success/Failure | R             | R             |
        +-------------------------------------------------+
        | Operations Per  | R             | R             |
        | Message         |               |               |
        +-------------------------------------------------+

Table 24: Required/Not Applicable Fields for Multiple Registrations Support Operation

4.5.1.1.1.6.2 Multiple RKRP Operations in a Single Message ✨

okay so once you've used the MULTIPLE REGISTRATIONS SUPPORT operation to find out that the far end can handle multiple RKRP operations per TALI message 🎀, a device that wants to use that can start sending more than 1 registration request/reply in each message. bestie, the trick is to take the basic mgmt message structure (the one in Table 12) and stack the operations so each one sits right after the one before it 💅. Here's what a TALI message with 3 RKRP operations in it looks like:

+------------------------------------------------------------------+
| Octets | Field Name  | Description                               |
+------------------------------------------------------------------+
| 0..3   | SYNC        | 'TALI'                                    |
+------------------------------------------------------------------+
| 4..7   | OPCODE      | 'mgmt'                                    |
+------------------------------------------------------------------+
| 8..9   | LENGTH      | Length. The length should be set such that|
|        |             | all (3 in this example) operations are    |
|        |             | accounted for.                            |
+------------------------------------------------------------------+
| 10..13 | Primitive   | 'rkrp'                                    |
+------------------------------------------------------------------+
| 14..17 | Primitive   | The fisrt operation field identifies a    |
|        | Operation   | specific rkrp operation to be performed.  |
|        | #1          |                                           |
+------------------------------------------------------------------+
| 18..x  | Message     | The length of the message data (and the   |
|        | Data for    | interpretation of those bytes) for        |
|        | Operation   | operation #1 depends on the message data  |
|        | #1          | required for rkrp operation #1            |
+------------------------------------------------------------------+
| x+1..  | Primitive   | The fisrt operation field identifies a    |
|   x+4  | Operation   | specific rkrp operation to be performed.  |
|        | #2          |                                           |
+------------------------------------------------------------------+
| x+5..y | Message     | The length of the message data (and the   |
|        | Data for    | interpretation of those bytes) for        |
|        | Operation   | operation #2 depends on the message data  |
|        | #2          | required for rkrp operation #2            |
+------------------------------------------------------------------+
| y+1..  | Primitive   | The fisrt operation field identifies a    |
|   y+4  | Operation   | specific rkrp operation to be performed.  |
|        | #3          |                                           |
+------------------------------------------------------------------+
| y+5..z | Message     | The length of the message data (and the   |
|        | Data for    | interpretation of those bytes) for        |
|        | Operation   | operation #3 depends on the message data  |
|        | #3          | required for rkrp operation #3            |
+------------------------------------------------------------------+

   Table 25: Message Structure for 'mgmt' opcode with multiple
             'rkrp' operations in 1 TALI Message

ok real talk, this part is literally important 😭. to avoid unpredictable behavior, a node using the 'multiple registrations per TALI msg' capability must be sure the far end device supports the capability. the ONLY way to be sure is to successfully send a MULTIPLE REGISTRATION SUPPORT request and get a MULTIPLE REGISTRATION SUPPORT reply back. no shortcuts, bestie 🙅‍♀️🫶


4.5.1.2 MTP3 Primitive (mtpp) 🦋

the 'mtpp' primitive lets IP nodes find out about point code (un)availability and congestion levels 🌈. these messages give you info similar to the TFP/TFA (TransFer Prohibited and TransFer Allowed), TFC (TransFer Congested) and RCT (Route Congestion Test) messages, which are encoded as SS7 SNM (Signaling Network Management) MSUs in traditional SS7 networks. the 'mtp3 primitives' let that status info travel in-band, via TALI messages, to the IP nodes. it's giving teamwork 🧚

the specific info in each 'mtpp' message is shown in an 'MTPP Operation' field. the capabilities the different MTPP Operation fields cover are:

  • POINT CODE UNAVAILABLE: this primitive operation announces that an SS7 Point Code is Unavailable (ie: the SG has NO route available to send traffic for the destination). the PT CODE field tells you which SS7 Pt Code this operation is about 💀.
  • POINT CODE AVAILABLE: this primitive operation announces that an SS7 Point Code is Available (ie: the SG has SOME route available to send traffic for the destination). the PT CODE field tells you which SS7 Pt Code this operation is about 🌸.
  • REQUEST FOR POINT CODE STATUS: this primitive operation lets one end of the connection poll the other end for the available/unavailable status of a specific SS7 pt code 👀. for instance, the IP node can poll the SG with: Can you send traffic successfully for the destination indicated? the receiver of the request replies with either a point code available or pt code unavailable primitive, respectively.
  • CLUSTER UNAVAILABLE: this primitive operation announces that an entire Cluster of SS7 Point Codes (ex: 10-10-*) is Unavailable (ie: the SG has NO route available to send traffic for any of the destinations in that cluster). the PT CODE field tells you which SS7 Cluster Pt Code this operation is about 🙈.
  • CLUSTER AVAILABLE: this primitive operation announces that at least 1 SS7 Point Code within a cluster is Available (ie: the SG has SOME route available to send traffic for at least 1 of the destinations in that cluster). the PT CODE field tells you which SS7 Cluster Pt Code this operation is about ✨.
  • REQUEST FOR CLUSTER STATUS: this primitive operation lets one end of the connection poll the other end for the available/unavailable status of a cluster of SS7 pt codes 🍓. for instance, the IP node can poll the SG with: Can you send traffic successfully for any of the destinations in the cluster? the receiver of the request replies with either a cluster available or cluster unavailable primitive, respectively.
  • CONGESTED DESTINATION: this primitive operation announces that the path towards an SS7 Point Code is Congested 🔥. the PT CODE field tells you which SS7 Pt Code this operation is about, and the CONGESTION LEVEL field tells you how severe the congestion is.
  • REQUEST FOR CONGESTION STATUS: this primitive operation lets one end of the connection poll the other end for the congestion status of an SS7 pt code 🌊. for instance, the IP node can poll the SG with: Is the path to the specified destination still congested? this request is used to abate congestion towards an SS7 destination.
    • As an implementation note: when the SG receives this request, it generates and sends a Route Congestion Test (RCT) SS7 Network Management Message with a priority set to match the congestion level in the request 👑. the RCT is sent towards the SS7 destination. if the SS7 destination is still congested, the RCT results in an SS7 Transfer Controlled (TFC) arriving back at the SG, which gets converted into a CONGESTED DESTINATION primitive and sent on to the IP node 💜.
  • USER PART UNAVAILABLE: SS7 nodes send User Part Unavailable messages when a user part mounted on a node is no longer available for service 🥺. this primitive operation gives an IP Node the same info the SS7 UPU message carries.

in order to keep the implementation simple, a single data structure is defined for all of the 'mtpp' operations 🎀. depending on the 'mtpp operation', some fields will be required and some won't be applicable for each MTPP message. unused fields should be initialized to 0 by the sender and ignored by the receiver. the data structure used for 'mtpp' messages is shown in the next table, and it should begin at byte 14 of the TALI message, as shown in Table 12 🧁.

   +------------------------------------------------------------------+
   | Octets | Field Name  | Description                  | Field Type |
   +------------------------------------------------------------------+
   | 2      | MTPP        | Identifies which 'mtpp'      | Integer    |
   |        | Operation   | operation/capability is      |            |
   |        |             | provided in this message.    |            |
   |        |             | This integer field uses the  |            |
   |        |             | following encodings:         |            |
   |        |             | 0x0001 = PC Unavailable      |            |
   |        |             | 0x0002 = PC Available        |            |
   |        |             | 0x0003 = Request for PC      |            |
   |        |             |          Status              |            |
   |        |             | 0x0004 = Cluster Unavailable |            |
   |        |             | 0x0005 = Cluster Available   |            |
   |        |             | 0x0006 = Request for Cluster |            |
   |        |             |          Status              |            |
   |        |             | 0x0007 = Congested           |            |
   |        |             |          Destination, w/Cong |            |
   |        |             |          Level               |            |
   |        |             | 0x0008 = Request for         |            |
   |        |             |          Congestion Status   |            |
   |        |             | 0x0009 = User Part           |            |
   |        |             |          Unavailable         |            |
   +------------------------------------------------------------------+
   | 4      | Concerned   | Identifies the SS7 Point Code| SS7 Point  |
   |        | Point       | that is relevant to the mtpp | Code       |
   |        | Code        | operation.  The mtpp         |            |
   |        |             | operation is concerning this |            |
   |        |             | point code (or cluster).     |            |
   +------------------------------------------------------------------+
   | 4      | Source      | This field is only used on   | SS7 Point  |
   |        | Point       | the 'Congested Destination'  | Code       |
   |        | Code        | and 'Request for Congestion  |            |
   |        |             | Status' operations.          |            |
   |        |             | * When used in an 'Congestion|            |
   |        |             |   Destination' operation,    |            |
   |        |             |   this field contains the Pt |            |
   |        |             |   Code of the Source of the  |            |
   |        |             |   traffic that was           |            |
   |        |             |   experiencing congestion as |            |
   |        |             |   it made its way to the     |            |
   |        |             |   Concerned Pt Code.  In     |            |
   |        |             |   terms of the original SS7  |            |
   |        |             |   MSUs (the TransFer         |            |
   |        |             |   Controlled MSU) that       |            |
   |        |             |   provided congestion        |            |
   |        |             |   information, the CPC of the|            |
   |        |             |   TFC is the 'Concerned Point|            |
   |        |             |   Code' of the resulting MTPP|            |
   |        |             |   primitive and the DPC of   |            |
   |        |             |   the TFC is the 'Source     |            |
   |        |             |   Point Code' of the         |            |
   |        |             |   resulting MTPP primitive.  |            |
   |        |             | * When used in an 'Request   |            |
   |        |             |   for Congestion Status'     |            |
   |        |             |   operation, this field      |            |
   |        |             |   indicates which Source Pt  |            |
   |        |             |   Code is trying to abate the|            |
   |        |             |   congestion of the concerned|            |
   |        |             |   Pt Code.  In terms of the  |            |
   |        |             |   original SS7 MSUs (the     |            |
   |        |             |   Route Congestion Test MSU) |            |
   |        |             |   that is used to poll for   |            |
   |        |             |   congestion, the DPC of the |            |
   |        |             |   RCT is the 'Concerned Point|            |
   |        |             |   Code' of the MTPP primitive|            |
   |        |             |   and the OPC of the RCT is  |            |
   |        |             |   the 'Source Point Code' of |            |
   |        |             |   the MTPP primitive.        |            |
   +------------------------------------------------------------------+
   | 2      | Congestion  | This field is used on the    | Integer    |
   |        | Level       | 'Congested Destination' and  |            |
   |        |             | 'Request for Congestion      |            |
   |        |             | Status' operations to        |            |
   |        |             | indicate the congestion level|            |
   |        |             | of the destination.  This    |            |
   |        |             | integer field uses the       |            |
   |        |             | following encodings:         |            |
   |        |             | 0x0000 = Congestion Level 0  |            |
   |        |             | 0x0001 = Congestion Level 1  |            |
   |        |             | 0x0002 = Congestion Level 2  |            |
   |        |             | 0x0003 = Congestion Level 3  |            |
   +------------------------------------------------------------------+
   | 2      | Cause Code  | This field is used on the    | Integer    |
   |        |             | 'User Part Unavailable'      |            |
   |        |             | operation to indicate the    |            |
   |        |             | Cause Code for why the UPU is|            |
   |        |             | being sent.  This integer    |            |
   |        |             | field uses the following     |            |
   |        |             | encodings:                   |            |
   |        |             | 0x0000 = Cause Unknown       |            |
   |        |             | 0x0001 = User Part Unequipped|            |
   |        |             | 0x0002 = User Part           |            |
   |        |             |          Inaccessible        |            |
   +------------------------------------------------------------------+
   | 2      | User ID     | This field is used on the    | Integer    |
   |        |             | 'User Part Unavailable'      |            |
   |        |             | operation to indicate which  |            |
   |        |             | user part is unavailable. The|            |
   |        |             | User ID field identifies the |            |
   |        |             | type of traffic that was     |            |
   |        |             | unavailable (0=SNM, 3=SCCP,  |            |
   |        |             | 5=ISUP, etc).                |            |
   +------------------------------------------------------------------+

    Table 26: Message Data Structure for use with the 'mtpp' Primitive

okay so this next table is the big cheat sheet for the mtpp message data structure 💅✨ Each row tells you a field, how many octets it takes up, what it's for, and what kind of field it is. The MTPP Operation field is the boss here 👑 because it tells you which operation or capability the message is carrying, and that decides what the other fields are doing.

Now, the table below is where it all clicks 🦋. It shows which fields are Required (R) or Not Applicable (NA) for each MTPP Operation, based on that MTPP Operation field. Quick reminder from the spec: the NA fields are the unused ones, and those should be initialized to 0 by the sender and ignored by the receiver 🫶 so nobody gets confused by leftover junk.

   +------------------------------------------------------------------+
   |          Field  | Concerned | Source | Congestion | Cause | User |
   |                 | Point     | Point  |  Level     | Code  | ID   |
   | Operation       | Code      | Code   |            |       |      |
   +------------------------------------------------------------------+
   | PC Unavailable  | R         | NA     | NA         | NA    | NA   |
   +------------------------------------------------------------------+
   | PC Available    | R         | NA     | NA         | NA    | NA   |
   +------------------------------------------------------------------+
   | Request for PC  | R         | NA     | NA         | NA    | NA   |
   | Status          |           |        |            |       |      |
   +------------------------------------------------------------------+
   | Cluster         | R         | NA     | NA         | NA    | NA   |
   | Unavailable     |           |        |            |       |      |
   +------------------------------------------------------------------+
   | Cluster         | R         | NA     | NA         | NA    | NA   |
   | Available       |           |        |            |       |      |
   +------------------------------------------------------------------+
   | Request for     | R         | NA     | NA         | NA    | NA   |
   | Cluster Status  |           |        |            |       |      |
   +------------------------------------------------------------------+
   | Congested       |           |        |            |       |      |
   | Destination w/  | R         | R      | R          | NA    | NA   |
   | Cong. Level     |           |        |            |       |      |
   +------------------------------------------------------------------+
   | Request for     |           |        |            |       |      |
   | Congestion      | R         | R      | R          | NA    | NA   |
   | Status          |           |        |            |       |      |
   +------------------------------------------------------------------+
   | User Part       | R         | NA     | NA         | R     | R    |
   | Unavailable     |           |        |            |       |      |
   +------------------------------------------------------------------+

      Table 27: Required/Not Applicable Fields for MTPP Operations

Table 27 is basically the "which fields do I actually need to fill in?" map 🗺️ Find your operation in the left column, then scroll across: every R is a field you need, and every NA is one you leave at 0 and ignore on the receiving end 💜 Congestion stuff (the Congested Destination and Request for Congestion Status ops) is the only place Source Point Code and Congestion Level show up as R, and User Part Unavailable is the only one that needs Cause Code and User ID 🙈

4.5.1.3 Socket Option Registration Primitive (sorp) ✨

okay so the sorp primitive is giving control 💅 it lets IP nodes set various options on a socket by socket basis, so the IP node gets some say over the communication that happens across the TALI connection. and the best part is this control gets sent in-band, through TALI messages, straight to the IP nodes. iconic 🦋

the SORP capabilities the IP device can use in SG look like this:

  • Set SORP Flags 🎀: used to set the flags bit field. the receiver should store the bit settings from the SORP Flag field.
  • Request Current SORP Flags Settings 🔍: used to poll the status of the bit field options. the receiver should send back a Reply w/ Current SORP Flag settings.
  • Reply w/ Current SORP Flag Settings 💌: used to answer a poll, showing the current bit field settings to the far end.

as of TALI 2.0, each socket option is stored as a bit in a 32 bit bit-field. every bit is the setting for 1 option 🌸. a 0 means the option is DISABLED and a 1 means it's ENABLED. these are the options that are currently supported:

  • ENABLE/DISABLE BROADCAST PHASE MTPP PRIMITIVES 📡: okay so traditional STPs send Broadcast Phase TFPs and TFAs to all adjacent nodes when point code availability changes for destinations in the STP's SS7 routing table. SG nodes such as the SG turn these Broadcast Phase TFA/TFP SS7 messages into TALI mtpp primitives. this option lets each IP node tell the remote end whether it wants to receive the mtpp primitives that come from SS7 broadcast phase messages 🫶.
    • implementation note 🧚: in the SG, each defined socket has a flag, enable_broadcast_phase_primitives, which is initialized to FALSE each time the socket connects. the IP node should send the ENABLE BROADCAST PHASE MESSAGES operation to the SG to announce that it wants to receive unsolicited status changes for a particular socket. when the SG is deciding where to send broadcast phase TFAs/TFPs, it checks the enable_broadcast_phase_primitives flag for each socket on that socket.
  • ENABLE/DISABLE RESPONSE METHOD MTPP PRIMITIVES 🔁: traditional STPs send Response Method TFPs to adjacent nodes when those nodes keep sending MSUs to the STP that can not be delivered (ie: the STP already told the adjacent node that a destination is Unavailable, but the adjacent node keeps sending traffic to that unavailable DPC anyway 💀). these Response Method messages go out in response to MSUs received at the STP. SG nodes such as the SG convert these Response Method TFP messages into TALI mtpp primitives. this option lets each IP node tell the remote end whether it wants the mtpp primitives from SS7 response method messages 💜.

two other SS7 Network Management messages, TFCs (transfer controlled) and UPUs (user part unavailable), also belong to this RESPONSE METHOD grouping. TFCs and UPUs are kind of like response method TFPs, because an earlier action by the IP Node (sending traffic toward some destination) caused a response method event back to the IP Node. the main difference is that a response method TFP becomes an MTPP primitive and goes back to only the original socket, while response method TFCs/UPUs may need to be copied to multiple sockets (after being converted to mtpp primitives), since there's no way to tell which socket caused the response method event 🤷‍♀️.

  • implementation node 🍓: in the SG, each defined socket has a flag, enable_response_method_primitives, which is initialized to FALSE each time the socket connects. the IP node should send the ENABLE RESPONSE METHOD MTPP PRIMITIVES operation to the SG to announce that it wants response method TFPs when appropriate for a particular socket. before the SG sends a response method TFP (converted to a mtpp primitive) back to an IP node, the SG checks the enable_response_method_primitives flag for that socket and only sends if the flag allows it.
  • ENABLE/DISABLE NORMALIZED SCCP 🧩: version 1.0 of TALI said the sccp TALI opcode must be used on point to multipoint connections to transmit SCCP MSUs between the SG and IP nodes. with the sccp opcode, the MTP3 header part of the original SS7 MSU got stripped off and was NOT part of the data sent across the TALI connection. the sender of the sccp TALI message had to copy the DPC/OPC fields from the MTP3 header into the right fields in the SCCP portion of the message (into the Called/Calling Party Address Pt Code fields) before sending it as a sccp opcode 😭. this option gives a way to send SCCP MSUs across TALI point to multipoint connections that keep the MTP3 header as part of the data, and does NOT change the original SS7 SCCP MSU at all ✨.

when the ENABLE NORMALIZED SCCP primitive is received, SCCP MSUs should be sent across the TALI interface using the mtp3 opcode. this transmission should include the entire MTP3 header + the sccp portion of the original MSU. no modification of the original SS7 MSU should occur. when the DISABLE NORMALIZED SCCP primitive is received, SCCP MSUs should be sent across the TALI interface using the sccp opcode as specified in version 1.0 of TALI 👑.

  • ENABLE/DISABLE NORMALIZED ISUP 🌈: version 1.0 of TALI said the isot TALI opcode must be used on point to multipoint connections to transmit ISUP MSUs between the SG and IP nodes. with the isot opcode, the whole original SS7 MSU, MTP3 header included, got sent in an isot TALI message. this option says the far end would rather get ISUP MSUs with the mtp3 TALI opcode instead of isot. when the option is ENABLED, the mtp3 opcode carries ISUP MSUs, MTP3 header included, across the TALI connection. when it's DISABLED, the isot opcode is used like in TALI Release 1.0 🎀.

the data structure for sorp messages is in the table below. it should start at byte 14 of the TALI message, as shown in Table 12 🦋.

+------------------------------------------------------------------+
| Octets | Field Name  | Description                  | Field Type |
+------------------------------------------------------------------+
| 2      | SORP        | Identifies which 'sorp'      | Integer    |
|        | Operation   | operation/capability is      |            |
|        |             | provided in this message.    |            |
|        |             | This integer field uses the  |            |
|        |             | following encodings:         |            |
|        |             | 0x0001 = Set SORP Flags      |            |
|        |             | 0x0002 = Request Current     |            |
|        |             |          SORP Flags Settings |            |
|        |             | 0x0003 = Reply w/ Current    |            |
|        |             |          SORP Flag Settings  |            |
+------------------------------------------------------------------+
| 2      | SORP Flags  | A 4 byte bit-field that uses | Bit-Field  |
|        |             | each bit as an enabled/      |            |
|        |             | disabled flag for a          |            |
|        |             | particular socket option.    |            |
|        |             | Bit x = 0 indicates the      |            |
|        |             |         option is DISABLED.  |            |
|        |             | Bit x = 1 indicates the      |            |
|        |             |         option is ENABLED.   |            |
|        |             | The assignments for each BIT |            |
|        |             | are as follows:              |            |
|        |             | Bit 0 = Broadcast Phase MTPP |            |
|        |             |         Primitives           |            |
|        |             | Bit 1 = Response Method MTPP |            |
|        |             |         Primitives           |            |
|        |             | Bit 2 = Normalized SCCP      |            |
|        |             | Bit 3 = Normalized ISUP      |            |
+------------------------------------------------------------------+

Table 28: Message Data Structure to be used for 'sorp' Primitive


4.5.2 Extended Service Message (xsrv) 🧚

the Extended Service, xsrv, opcode was added to the TALI 2.0 protocol to lay the groundwork for carrying other types of service traffic (beyond sccp, isot, mtp3, and saal) in future revisions of this protocol 🌸. that means no brand new opcode is needed each time a new service type gets identified and added. the PRIMITIVE field uniquely identifies each new service type as it's added. some xsrv messages can be received and processed in any of the TALI NEx-FEx state, while others can only be received and processed in the NEA-FEA state (like Service data in version 1.0 of TALI) 💅.

there are no specific PRIMITIVES defined for this opcode in this release. some new service messages are expected to be added later on. this opcode is there to group the new service data types together 🫶.

+------------------------------------------------------------------+
| Octets | Field Name  | Description                               |
+------------------------------------------------------------------+
| 0..3   | SYNC        | 'TALI'                                    |
+------------------------------------------------------------------+
| 4..7   | OPCODE      | 'xsrv'                                    |
+------------------------------------------------------------------+
| 8..9   | LENGTH      | Length                                    |
+------------------------------------------------------------------+
| 10..13 | Primitive   | To be determined                          |
+------------------------------------------------------------------+
| 14..   | Message     | To be determined                          |
|   2000 | Data        |                                           |
+------------------------------------------------------------------+

4.5.3 Special Message (spcl) 🎀

okay bestie, this one is lowkey my favourite. The spcl opcode is how vendors sneak their own special services into TALI 2.0 🧚 The fancy features only switch on when your implementation is talking to other gear that has the same special services. spcl messages can be received and processed in any of the TALI NEx-FEx states. The big idea is that it gives you a general way to find out who your TALI session is connected to, and to turn on special features based on the vendor or implementation on the far end. it's giving detective energy 🔍

As part of 2.0, 4 primitives are defined for this opcode, no cap:

  • smns - Special Messages Not Supported.
  • qury - Query.
  • rply - Reply.
  • usim - UnSolicited Information Message.

More primitives can show up in future versions of TALI, so keep your eyes open 👀

+------------------------------------------------------------------+
| Octets | Field Name  | Description                               |
+------------------------------------------------------------------+
| 0..3   | SYNC        | 'TALI'                                    |
+------------------------------------------------------------------+
| 4..7   | OPCODE      | 'spcl'                                    |
+------------------------------------------------------------------+
| 8..9   | LENGTH      | Length                                    |
+------------------------------------------------------------------+
| 10..13 | Primitive   | 'smns' - special messages not supported   |
|        |             | 'qury' - query                            |
|        |             | 'rply' - reply                            |
|        |             | 'usim' - UIM (unsolicited information msg)|
+------------------------------------------------------------------+
| 14..X  | Data        | Vendor dependent                          |
+------------------------------------------------------------------+

4.5.3.1 Special Messages Not Supported (smns) 🙅‍♀️

this one is the polite "no thank you" 💅 It gets sent as a response to a spcl message with a qury PRIMITIVE. A node MAY send it when it wants the Far End to know that it doesn't do spcl messages and would rather not get them in the future.

+------------------------------------------------------------------+
| Octets | Field Name  | Description                               |
+------------------------------------------------------------------+
| 0..3   | SYNC        | 'TALI'                                    |
+------------------------------------------------------------------+
| 4..7   | OPCODE      | 'spcl'                                    |
+------------------------------------------------------------------+
| 8..9   | LENGTH      | Length                                    |
+------------------------------------------------------------------+
| 10..13 | Primitive   | 'smns'                                    |
+------------------------------------------------------------------+

4.5.3.2 Query Message (qury) 🔎

this is how you go digging 🕵️‍♀️ A qury can be sent to Query the far end of the connection, so you can find out more about the VENDOR, the TALI version, or other features. Every 2.0 implementation is expected to respond to a qury with a rply, which is literally the whole point of it 🫶

+------------------------------------------------------------------+
| Octets | Field Name  | Description                               |
+------------------------------------------------------------------+
| 0..3   | SYNC        | 'TALI'                                    |
+------------------------------------------------------------------+
| 4..7   | OPCODE      | 'spcl'                                    |
+------------------------------------------------------------------+
| 8..9   | LENGTH      | Length                                    |
+------------------------------------------------------------------+
| 10..13 | Primitive   | 'qury'                                    |
+------------------------------------------------------------------+

4.5.3.3 Reply Message (rply) 🪞

the rply is where a TALI 2.0 implementation introduces itself properly 💖 The reply carries:

  • PEC - a 2 byte field that identifies the vendor for the TALI implemenation.
  • Version Number - a 12 byte field that identifies the TALI version of the implementation.
  • Other Vendor Specific Data - the format of any remaining data that a particular vendor wants to provide is specific to each vendor.
+------------------------------------------------------------------+
| Octets | Field Name  | Description                               |
+------------------------------------------------------------------+
| 0..3   | SYNC        | 'TALI'                                    |
+------------------------------------------------------------------+
| 4..7   | OPCODE      | 'spcl'                                    |
+------------------------------------------------------------------+
| 8..9   | LENGTH      | Length                                    |
+------------------------------------------------------------------+
| 10..13 | Primitive   | 'rply'                                    |
+------------------------------------------------------------------+
| 14..15 | PEC         | Private Enterprise Code *                 |
|        |             | (Vendor ID Number, Integer Field)         |
+------------------------------------------------------------------+
| 16..27 | Version     | 'vers xxx.yyy'                            |
|        | Label       |                                           |
+------------------------------------------------------------------+
| 28..?  | Other Vendor| Free Format data area, specific to each   |
|        | Specific    | vendor                                    |
|        | Data        |                                           |
+------------------------------------------------------------------+

*See Table 4 for details on the PEC field.

4.5.3.4 Unsolicited Information Message (USIM) 📣

the usim brings the same info as the rply, just without being asked 🙈 A 2.0 implementation can send it at any time, whereas the rply SHOULD only be sent in reply to a qury. Main character energy: the usim speaks first 💅

+------------------------------------------------------------------+
| Octets | Field Name  | Description                               |
+------------------------------------------------------------------+
| 0..3   | SYNC        | 'TALI'                                    |
+------------------------------------------------------------------+
| 4..7   | OPCODE      | 'spcl'                                    |
+------------------------------------------------------------------+
| 8..9   | LENGTH      | Length                                    |
+------------------------------------------------------------------+
| 10..13 | Primitive   | 'usim'                                    |
+------------------------------------------------------------------+
| 14..15 | PEC         | Private Enterprise Code *                 |
|        |             | (Vendor ID Number, Integer Field)         |
+------------------------------------------------------------------+
| 16..27 | Version     | 'vers xxx.yyy'                            |
|        | Label       |                                           |
+------------------------------------------------------------------+
| 28..?  | Other Vendor| Free Format data area, specific to each   |
|        | Specific    | vendor                                    |
|        | Data        |                                           |
+------------------------------------------------------------------+

4.6 TALI Timers ⏱️

okay so TALI 2.0 doesn't add any new timers 🎉 The T1-T4 timers from before are still in effect, so nothing new to memorise.

It's expected that most implementations wanting to call themselves 2.0 (or later) would use a non-zero value for T4, but this is a not a hard requirement 🤷‍♀️ The only real requirement for identifying yourself as 2.0 is to send at least 1 moni in the 2.0 format when the connection gets established. that's it, that's the tea ☕

4.7 TALI User Events 🧁

2.0 doesn't introduce any new user events either. The ones from Section 3.4 (mgmt open, mgmt close, mgmt allow, mgmt proh, connection established, connection lost) are all still in effect, so you already know them 💜

4.8 TALI States 🌸

same deal here: no new TALI states in 2.0 ✨ The states from Section 3.6 remain in effect. Easy.

4.9 TALI Version 2.0 State Machine 🦋

this section is the state machine every TALI 2.0 implementation MUST follow to be compliant with this spec. Throughout the doc we've been saying that a 2.0 implementation is just a few small additions on top of a 1.0 implementation, and every 2.0 implementation MUST be willing to interoperate in a backwards compatible mode. A 2.0 implementation connected to a 1.0 implementation MUST fall back to 1.0 features only. so it always plays nice with the older crowd 🫶

4.9.1 State Machine Concepts 🧠

before we get to the actual state machine, there are a few concepts to get through first 💅

4.9.1.1 General Protocol Rules 📜

the general protocol rules from the 1.0 spec, section 3.7.1.1, still apply to 2.0 implementations. On top of those, these rules apply to 2.0 nodes too:

  • A 2.0 implementation SHOULD identify the TALI version it has implemented via the moni message.
  • A 2.0 implementation SHOULD process any received moni messages, attempting to determine the TALI version of the far end. A 2.0 implementation MUST use an internal flag, such as far_end_version, to track the TALI version that the far end of the connection has implemented. The far_end_version flag SHOULD be initialized to version 1.0.
  • A 2.0 implementation SHOULD reject/ignore internal requests (from software layers in it's own product, or requests from the management interface for the device) to send TALI messages that require 2.0 opcodes when the far end is a 1.0 implementation. A 2.0 implementation SHOULD only send TALI messages that require new 2.0 opcodes (mgmt, xsrv, spcl) when it knows the far end is capable of processing those opcodes (when far_end_version is 2.0 or greater).
  • Upon receiving a TALI message with a 2.0 opcode, a 2.0 implementation SHOULD interrogate its far_end_flag. If the far end is not 2.0 or greater, the arrival of the message SHOULD be treated as a Protocol Violation. If the far end is 2.0 or greater, the message SHOULD be processed according to the node's 2.0 capabilities, or ignored (if the node has chosen not to implement any 2.0 functionalities).

4.9.1.2 Graceful Shutdown of a Socket 🚪

the steps for a graceful shutdown of each socket were covered in the 1.0 spec, section 3.7.1.2. Good news: those steps haven't changed for 2.0 implementations, so you can keep doing what you were doing 💖

4.9.1.3 TALI Protocol Violations ⚠️

Every TALI implementation has to spot when the TALI protocol gets broken and respond accordingly 🫶 Here's what counts as a violation, bestie:

  • Invalid sync code in a received message
  • Invalid opcode in a received message
  • Invalid length field in a received message
  • Not receiving an 'allo' or 'proh', in response to the origination of a 'test' ,, before the T2 timer expires 🙈
  • Receiving Service Messages on a prohibited socket
  • TCP Socket errors - Connection Lost
  • Receiving a TALI message with a 2.0 opcode ('mgmt', 'xsrv', ' spcl') from a far end that has not identified itself as a 2.0 implementation 💀

In the state machine below, any State/Event combo that counts as a protocol violation is marked with a 'PV' in its cell. Every 'PV' event then gets handled by the Protocol Violation row in the table, so it's all connected ✨

4.9.2 The State Machine 🧠

Here's the internal data the state machine needs to keep track of:

  • boolean sock_allowed. This flag indicates whether the NE is allowed to carry Service Messages.
  • Far_end_version. This enumeration should track the TALI version of the far end of the socket.

Here are the starting conditions, the way the machine begins its life 🌸

sock_allowed = FALSE
far_end_version = 1.0
state = OOS
no timers running

And here's the whole table, the main event of the section, so get comfy 💅

+------------------------------------------------------------------+
|   State| OOS  |Connecting| NEP-FEP | NEA-FEP | NEA-FEP | NEA-FEA |

Wait, correction, I'm keeping the exact original table below so nothing gets lost in translation 🎀

+------------------------------------------------------------------+
|   State| OOS  |Connecting| NEP-FEP | NEA-FEP | NEA-FEA |

No, scratch that, let me paste the full, exact version so it's 100% faithful 🦋

   +------------------------------------------------------------------+
   |   State| OOS  |Connecting| NEP-FEP | NEA-FEP | NEA-FEA | NEA-FEA |

Let me restart this bit cleanly, because the table has to be character-perfect. Here is the exact original, from the top:

+------------------------------------------------------------------+
|   State| OOS  |Connecting| NEP-FEP | NEP-FEA | NEA-FEP | NEA-FEA |
|Event   |      |          |         |         |         |         |
+------------------------------------------------------------------+
|T1 Exp. |      |          |Send test|Send test|Send test|Send test|
|        |      |          |Start T1 |Start T1 |Start T1 |Start T1 |
|        |      |          |Start T2 |Start T2 |Start T2 |Start T2 |
+------------------------------------------------------------------+
|T2 Exp. |      |          |   PV    |   PV    |   PV    |   PV    |
+------------------------------------------------------------------+
|T3 Exp. |      |          |   PV    |   PV    |         |         |
+------------------------------------------------------------------+
|T4 Exp. |      |          |Send moni|Send moni|Send moni|Send moni|
|        |      |          |Start T4 |Start T4 |Start T4 |Start T4 |
+------------------------------------------------------------------+
|Rcv test|      |          |Send proh|Send proh|Send allo|Send allo|
+------------------------------------------------------------------+
|Rcv allo|      |          | Stop T2 | Stop T2 | Stop T2 | Stop T2 |
|        |      |          | NEP-FEA |         | NEA-FEA |         |
+------------------------------------------------------------------+
|Rcv proh|      |          | Stop T2 | Stop T2 | Stop T2 | Stop T2 |
|        |      |          |Send proa|Send proa|Send proa|Flush or |
|        |      |          |         | NEP-FEP |         | reroute |
|        |      |          |         |         |         |Send proa|
|        |      |          |         |         |         | NEA-FEP |
+------------------------------------------------------------------+
|Rcv proa|      |          | Stop T3 | Stop T3 |         |         |
+------------------------------------------------------------------+
|Rcv moni|      |          |Update   |Update   |Update   |Update   |
|        |      |          |'far end |'far end |'far end |'far end |
|        |      |          |version' |version' |version' |version' |
|        |      |          |based on |based on |based on |based on |
|        |      |          |moni     |moni     |moni     |moni     |
|        |      |          |Convert  |Convert  |Convert  |Convert  |
|        |      |          | to mona | to mona | to mona | to mona |
|        |      |          |Send mona|Send mona|Send mona|Send mona|
+------------------------------------------------------------------+
|Rcv mona|      |          |Implemen-|Implemen-|Implemen-|Implemen-|
|        |      |          |tation   |tation   |tation   |tation   |
|        |      |          |dependent|dependent|dependent|dependent|
+------------------------------------------------------------------+
|Rcv     |      |          |   PV    |If T3 run|   PV    |Process  |
| Service|      |          |         | Process |         |         |
|        |      |          |         |Else PV  |         |         |
+------------------------------------------------------------------+
|Rcv mgmt|      |          |If FE<   |If FE<   |If FE<   |If FE<   |
|        |      |          | 2.0 PV  | 2.0 PV  | 2.0 PV  | 2.0 PV  |
|        |      |          |Else     |Else     |Else     |Else     |
|        |      |          | Process | Process | Process | Process |
+------------------------------------------------------------------+
|Rcv xsrv|      |          |If FE<   |If FE<   |If FE<   |If FE<   |
|        |      |          | 2.0 PV  | 2.0 PV  | 2.0 PV  | 2.0 PV  |
|        |      |          |Else     |Else     |Else     |Else     |
|        |      |          | Process | Process | Process | Process |
+------------------------------------------------------------------+
|Rcv spcl|      |          |If FE<   |If FE<   |If FE<   |If FE<   |
|        |      |          | 2.0 PV  | 2.0 PV  | 2.0 PV  | 2.0 PV  |
|        |      |          |Else     |Else     |Else     |Else     |
|        |      |          | Process | Process | Process | Process |
+------------------------------------------------------------------+
|Connect.|      | Start T1 |         |         |         |         |
|Estab.  |      | Start T2 |         |         |         |         |
|        |      | Start T4 |         |         |         |         |
|        |      |(if non-0)|         |         |         |         |
|        |      |if sock_  |         |         |         |         |
|        |      |  allowed |         |         |         |         |
|        |      |  = TRUE  |         |         |         |         |
|        |      | send allo|         |         |         |         |
|        |      | send test|         |         |         |         |
|        |      | NEA-FEP  |         |         |         |         |
|        |      |else      |         |         |         |         |
|        |      | send proh|         |         |         |         |
|        |      | send test|         |         |         |         |
|        |      | NEP-FEP  |         |         |         |         |
+------------------------------------------------------------------+
|Connect.|      |          |   PV    |   PV    |   PV    |   PV    |
|Lost    |      |          |         |         |         |         |
+------------------------------------------------------------------+
|Protocol|      |          |Stop all |Stop all |Stop all |Stop all |
|Violat. |      |          | timers  | timers  | timers  | timers  |
|        |      |          |Close the|Close the|Close the|Close the|
|        |      |          | socket  | socket  | socket  | socket  |
|        |      |          |Connect- |Connect- |Connect- |Connect- |
|        |      |          |  ing    |  ing    |  ing    |  ing    |
+------------------------------------------------------------------+
|Mgmt.   |Open  |          |         |         |         |         |
|Open    |socket|          |         |         |         |         |
|Socket  |Conne-|          |         |         |         |         |
|        | cting|          |         |         |         |         |
+------------------------------------------------------------------+
|Mgmt.   |      |Close the |Stop all |Stop all |Stop all |Stop all |
|Close   |      | socket   | timers  | timers  | timers  | timers  |
|Socket  |      |OOS       |Close the|Close the|Close the|Close the|
|        |      |          | socket  | socket  | socket  | socket  |
|        |      |          |OOS      |OOS      |OOS      |OOS      |
+------------------------------------------------------------------+
|Mgmt.   |sock_ |sock_allo-|sock_all-|sock_all-|sock_all-|sock_all-|
|Prohibit|allow-| wed=FALSE| owed=   | owed=   | owed=   | owed=   |
|Socket  |ed =  |          | FALSE   | FALSE   | FALSE   | FALSE   |
|        |FALSE |          |         |         |send proh|send proh|
|        |      |          |         |         |start t3 |start t3 |
|        |      |          |         |         | NEP-FEP | NEP-FEA |
|        |      |          |         |         |         |         |
+------------------------------------------------------------------+
|Mgmt.   |sock_ |sock_allo-|sock_all-|sock_all-|sock_all-|sock_all-|
|Allow   |allow-| wed=TRUE | owed=   | owed=   | owed=   | owed=   |
|Traffic |ed =  |          | TRUE    | FALSE   | TRUE    | TRUE    |
|        |TRUE  |          |send allo|send allo|         |         |
|        |      |          | NEA-FEP | NEA-FEA |         |         |
+------------------------------------------------------------------+
|User    |reject| reject   | reject  | reject  | reject  | send    |
|Part    |data  | data     | data    | data    | data    | data    |
|Msgs.   |      |          |         |         |         |         |
+------------------------------------------------------------------+
|Request |      |          |If FE<2.0|If FE<2.0|If FE<2.0|If FE<2.0|
|to Tx   |      |          | Ignore  | Ignore  | Ignore  | Ignore  |
|mgmt    |      |          |Else     |Else     |Else     |Else     |
|        |      |          | Process | Process | Process | Process |
+------------------------------------------------------------------+
|Request |      |          |If FE<2.0|If FE<2.0|If FE<2.0|If FE<2.0|
|to Tx   |      |          | Ignore  | Ignore  | Ignore  | Ignore  |
|xsrv    |      |          |Else     |Else     |Else     |Else     |
|        |      |          | Process | Process | Process | Process |
+------------------------------------------------------------------+
|Request |      |          |If FE<2.0|If FE<2.0|If FE<2.0|If FE<2.0|
|to Tx   |      |          | Ignore  | Ignore  | Ignore  | Ignore  |
|spcl    |      |          |Else     |Else     |Else     |Else     |
|        |      |          | Process | Process | Process | Process |
+------------------------------------------------------------------+

Table 29: TALI 2.0 State Machine

4.10 TALI 2.0 Specification Limitations 🌈

Okay, the TALI 2.0 spec has a few limitations, and they're the areas where the protocol could grow later on ✨ Here they are:

  • Support for different types of routing keys is limited. It is envisioned that new routing key types will need to be added and supported as new applications are identified.
  • An opcode, or new primitive within an existing opcode, could be added as a means of returning unknown or unsupported data to the sender. In addition to discarding and storing internal debug data, an implementation may want to return the original TALI message to the sender when the receiver of the message deems the message to be unknown, unsupported, or incorrectly formatted. 🦋

5. Success/Failure Codes 💅

okay so here's the full list of every success/failure code we know about for rkrp ✨ new ones just get tacked onto the end as they show up, so the list only grows 🌸

Error #    Meaning
1          Transaction successfully completed.
2          Length of TALI msg is insufficient to contain all
           required information for rkrp operation
3          Unsupported 'rkrp' operation
4          Invalid SI.  SI must be in range 0..15
5          Invalid SI/operation combination.  Split and resize only
           supported for SI=4,5,13.  Enter, delete and override
           supported for all SI.
6          Invalid DPC.  Point code cannot be zero, and must be full
           point code.
7          Invalid SSN.  SSN must be in range 0..255.
8          Invalid OPC.  Point code cannot be zero, and must be full
           point code.
9          Invalid CICS.  Must be in range appropriate for SI and PC
           type.
10         Invalid CICE.  Must be in range appropriate for SI and PC
           type.
11         Invalid CIC range.  CICS must be less than or equal to
           CICE.  On a split operation, CICS must be strictly less
           than than CICE (cannot split an range with only one
           entry).
12         Invalid NCICS.  Must be in range appropriate for SI and
           PC type.

13         Invalid NCICE.  Must be in range appropriate for SI and
           PC type.
14         Invalid new CIC range.  NCICS must be less than or equal
           to NCICE.
15         Invalid SPLIT value.   Must be in range appropriate for
           SI and PC type.  Must be greater than CICS and less than
           or equal to CICE.
16         No free entries in table.
17         CIC range overlaps but does not match existing entry.
18         Entry already has 16 associations.
19         Entry to be changed not found in table.
20         New entry would overlap another entry (allowed to overlap
           the entry being changed, but no others).
21         Entry to be deleted not found in table.
22         TUP routing keys are not supported for ANSI networks

6. Security Considerations 🔐

okay this part is lowkey serious, so pay attention bestie 🫶 TALI is an interface that carries SS7 traffic and management messages across an IP network. Just like traditional PSTN networks, the IP networks running TALI are expected to be well engineered systems 💜 virtual private networks and firewalls are totally expected to show up in the picture, and using IPSEC would add some extra security benefit to the network 🛡️ it's giving "lock your house before you leave" energy ✨


7. References 📚

here are all the sources this doc points to, in order, so you can go find them if you're nerdy like me 🤓

[1]  Bell Communications Research, Specification of Signaling System
     Number 7, GT-246-CORE, Bellcore, Issue 1, December 1994.

[2]  Postel, J., "Internet Protocol", STD 5, RFC 791, September 1981.

[3]  Postel, J., "Internet Control Message Protocol", STD 5, RFC 792,
     September 1981.

[4]  Postel, J., "Transmission Control Protocol", STD 7, RFC 793,
     September 1981.

[5]  Logical Link Control, IEEE 802.2 and ISO 8802.2

[6]  Carrier Sense Multiple Access with Collision Detection
     (Ethernet), IEEE 802.3 and ISO 8802-3 CSMA/CD.

[7]  Virtual LAN, IEEE 802.1 Q and ISO 8802-1Q CSMA/CD.

[8]  Bell Communications Research, Generic Requirements for CCS Nodes
     Supporting ATM High-Speed Signaling Links (HSLs), GR-2878-CORE,
     Issue 1, Bellcore, November 1995.

[9]  Bell Communications Research, Asynchronous Transfer Mode (ATM)
     and ATM Adaptation Layer (AAL) Protocols, GR-1113-CORE,
     Bellcore.

[10] American National Standards Institute, B-ISDN Signaling ATM
     Adaptation Layer - Service Specific Connection Oriented Protocol
     (SSCOP), T1.637.

[11] American National Standards Institute, B-ISDN Signaling ATM
     Adaptation Layer - Service Specific Coordination Function for
     Support of Signaling at the Network Node Interface (SSCF at the
     NNI), T1.645.

[12] American National Standards Institute, B-ISDN Signaling ATM
     Adaptation Layer - Layer Management for the SAAL at the NNI,
     T1.652.

8. Acknowledgments 🫶

the authors wanna give a big shoutout to Ken Morneault 🌷 thank you for your comments and contributions to the document, you're literally iconic 👑


9. Authors' Addresses 🎀

meet the squad 💖 all four authors are from Tekelec, same address, different phone lines, so you know who to call:

David Sprague
Tekelec
5200 Paramount Pkwy.
Morrisville, NC  27560
Phone: +1 919-460-5563
EMail: david.sprague@tekelec.com


Dan Brendes
Tekelec
5200 Paramount Pkwy.
Morrisville, NC  27560
Phone: +1 919-460-2162
EMail: dan.brendes@tekelec.com


Robby Benedyk
Tekelec
5200 Paramount Pkwy.
Morrisville, NC  27560
Phone: +1 919-460-5533
EMail: robby.benedyk@tekelec.com


Joe Keller
Tekelec
5200 Paramount Pkwy.
Morrisville, NC  27560
Phone: +1 919-460-5549
EMail: joe.keller@tekelec.com

the legal stuff, kept exactly as written 🙈

Copyright (C) The Internet Society (2001).  All Rights Reserved.

This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works.  However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.

The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assigns.

This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS 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.

Acknowledgement 🌈

funding for the RFC Editor function is currently provided by the Internet Society ✨ and that's the whole doc, bestie, we made it 🦋💅

📦 where this page comes from