TCAP Messages

Introduction

The SIGTRAN Application (SigtranApp) uses TCAP messages to pass inbound and outbound TCAP content internally over the n2svcd message bus.

The following applications from the core n2svcd module use SigtranApp.

The following LuaApp services from the core n2svcd module use SigtranApp.

The following applications from the n2sip module use SigtranApp.

The internal TCAP messages are:

Note that this page uses the term “on-the-wire” to refer to the sending or receiving of TCAP content by the SigtranApp. This term is also inclusive of the case where the message is sent by local loopback and does not physically transit a Network Interface Controller (NIC).

Context for TCAP Messages

Note that when using send_message to send TCAP-… internal messages across the IPC message bus, the contexts are non-standard.

The context for the SigtranApp is the Local TID in hex format (if confirmed).

The “Other App” context is “|” e.g. “424|ssp.scp”.

Message Sender Context Recipient Context
TCAP-RECV (BEGIN, Uncorrelated)
SigtranApp -> Other App
New Local TID `undef`
TCAP-RECV (BEGIN, Correlated, e.g. ARI)
SigtranApp -> Other App
New Local TID "|"
For previous transaction.
TCAP-RECV (non-BEGIN)
SigtranApp -> Other App
Local TID "|"
TCAP-SEND (BEGIN)
Other App -> SigtranApp
"|" New Local TID
TCAP-SEND (non-BEGIN)
Other App -> SigtranApp
"|" Existing Local TID
TCAP-FAIL
TCAP-SENT
Local TID (iff present in TCAP-SEND) "|"
TCAP-TXNCHECK-REQUEST
SigtranApp -> Other App
Existing Local TID "|"
TCAP-TXNCHECK-RESPONSE
Other App -> SigtranApp
"|" Existing Local TID

TCAP-RECV

The TCAP-RECV message is generated by SigtranApp and sent to the receiving app when an inbound TCAP message is received over the SIGTRAN interface. The SigtranApp is responsible for determining which application should receive the TCAP.

For a TCAP BEGIN, this is done using the handlers configuration which will examine the originator, and/or the SCCP SSN, and/or may perform inspection of the user content.

For a TCAP non-BEGIN, there must be an existing context for the Local Transaction ID (TID).

Refer to the SigtranApp Configuration documentation for more information on handling and routing of TCAP-BEGIN within SigtranApp.

The receiving application is responsible for deciding how to process the TCAP-RECV when it arrives. Refer to the documentation for the receiving application.

The attributes of the TCAP-RECV message are:

Field Type Description
type BEGIN, CONTINUE, END, ABORT [Required] One of the specified constant string types.
remote_sccp SCCP Address Object [BEGIN, Required] The far-end SCCP address as received in this TCAP message.
See below for definition of the structure for all local_sccp and remote_sccp elements.
local_sccp SCCP Address Object [BEGIN, Required] Our local SCCP address as received in this TCAP message.
See below for definition of the structure for all local_sccp and remote_sccp elements.
remote_tid Hex String [BEGIN/CONTINUE, Required] Far-end transaction ID in hexadecimal format.
local_tid Hex String [Required] Local transaction ID in hexadecimal format.
For type = BEGIN this is assigned locally by SigtranApp.
For other type values this was received on-the-wire.
dialogue Dialogue Object An object containing parameters related to the TCAP dialogue.
components Array of Component Objects An array of Objects representing TCAP components (if any are present).
Not present for type = ABORT.
abort Object Information extracted from ABORT message received.
p_cause Integer The reason.p-abortCause if present.
u_source 0 / 1 The reason.u-abortCause.single-ASN1-type.dialoguePDU.dialogueAbort.abort-source if present.
u_info_0_octets Binary The reason.u-abortCause.single-ASN1-type.dialoguePDU.dialogueAbort.user-information[0].encoding.octet-aligned if present.
bytes Binary [Required] The TCAP-encoded bytes received on-the-wire.

TCAP-SEND

The TCAP-SEND is sent to the SigtranApp by another application wishing to place TCAP bytes on-the-wire. This message can be used to send any TCAP message type.

The attributes of the TCAP-SEND message are:

Field Type Description
ack_sent 0 / 1 Do we require a TCAP-SENT response for tracing purposes?
(Default = 0)
type BEGIN / CONTINUE / END / ABORT [Required] Specify the type of message to be constructed.
remote_sccp SCCP Address Object [Required for BEGIN] The far-end SCCP destination address to which the TCAP BEGIN is sent.
This field is not used for TCAP types other than BEGIN.
local_tid Hex String [Required for CONTINUE/END/ABORT] Local transaction ID in hexadecimal format.
The calling application must specify this when continuing an existing transaction. When starting a new transaction with type = BEGIN then the SigtranApp will assign a local transaction ID and provide it to the originating application by using TCAP-CONTINUE.
Note that remote_tid is never specified in TCAP-SEND, instead it is managed by SigtranApp.
components Array of Component Objects Applicable for BEGIN/CONTINUE/END only. Not used for ABORT.
An array of Objects representing TCAP components (if any are present).
dialogue Dialogue Object Applicable for BEGIN/CONTINUE/END only. Not used for ABORT.
An object containing parameters related to the TCAP dialogue.
abort Object Applicable for ABORT only. Not used for BEGIN/CONTINUE/END.
An object containing parameters related to the ABORT content.
p_cause Integer Applicable for ABORT only. Not used for BEGIN/CONTINUE/END.
The value to encode into reason.p-abortCause if present.
u_source 0 / 1 Applicable for ABORT only. Not used for BEGIN/CONTINUE/END.
The value to encode into reason.u-abortCause.single-ASN1-type.dialoguePDU.dialogueAbort.abort-source if present.
u_info_0_octets Binary Applicable for ABORT only. Not used for BEGIN/CONTINUE/END.
The value to encode into reason.u-abortCause.single-ASN1-type.dialoguePDU.dialogueAbort.user-information[0].encoding.octet-aligned if present.

Note: The local SCCP address is never specified when using TCAP-SEND. It will be set automatically by the SigtranApp which performs the final message encoding and delivery.

TCAP-SENT

The TCAP-SENT is sent by the SigtranApp by another application whenever a TCAP-SEND results in a TCAP message being placed on-the-wire.

The attributes of the TCAP-SENT message are:

Field Type Description
type BEGIN/CONTINUE/END/ABORT [Required] The type of TCAP message that was placed on-the-wire.
bytes Binary [Required] The TCAP-encoded bytes placed on-the-wire.

TCAP-FAIL

The TCAP-FAIL is sent by the SigtranApp by another application whenever a TCAP-SEND does not successfully place a TCAP message on-the-wire.

The attributes of the TCAP-FAIL message are:

Field Type Description
type BEGIN/CONTINUE/END/ABORT [Required] The type of TCAP message that was not placed on-the-wire.
local_tid Hex String [Required] Local transaction ID in hexadecimal format.
When this TCAP-FAIL is for type BEGIN, the sending application is responsible for capturing and storing this local transaction ID and including it when attempting to send any follow-up TCAP content for this transaction.
bytes Binary [Required] The TCAP-encoded bytes placed on-the-wire.

TCAP-PREARRANGED-END

The TCAP-PREARRANGED-END is sent by any application to the SigtranApp to indicate that the TCAP local transaction ID should be released, and that no further messages are expected to be received.

There are three ways in which a local transaction ID can be freed (and hence avoid leaking).

  1. Receipt of an on-the-wire TCAP END or TCAP ABORT.
  2. Sending an on-the-wire TCAP END or TCAP ABORT.
  3. Use of TCAP-PREARRANGED-END.

The attributes of the TCAP-PREARRANGED-END message are:

Field Type Description
local_tid Hex String [Required] Local transaction ID in hexadecimal format.

TCAP-TRANSFER

The TCAP-SENT is used by an application which has received a TCAP-RECV containing a BEGIN message, for the purpose of redirecting/proxy of that BEGIN message to another SCCP end-point.

A TCAP-TRANSFER must be the first and only response to the original TCAP-RECV message, it is not possible to transfer a TCAP transaction after having sent a reply.

When using TCAP-TRANSFER the controlling application must specify a new SCCP end-point address, to which the SigtranApp will construct and send a new BEGIN message where:

  • The SCCP calling party address is identical to the original received SCCP calling party.
  • The SCCP called party address is set to be the new called party address.
  • The TCAP dialogue part is identical to the original received TCAP Dialogue (if present).
  • The TCAP components are those specified by the application, which should closely (or exactly) match the originals.

The TCAP-TRANSFER request will alwas be sent back to the same SigtranApp which initiated the transaction to us with the original TCAP-RECV. That SigtranApp will perform route selection for the new outbound BEGIN as if it were a brand new TCAP BEGIN. Connection affinity will not apply.

After sending the transferred BEGIN, the SigtranApp will:

a. Close the original transaction, and b. not create a new outbound transaction, and c. not expect any subsequent interaction, and d. potentially run a TCAP linger timer to catch delivery errors.

If ack_sent is set then SigtranApp will return an TCAP-SENT message to the transferring application in the same way as occurs for TCAP-SEND.

The attributes of the TCAP-TRANSFER message are:

Field Type Description
type TRANSFER [Required] Static field used as the TCAP "Type" for logging and tracing purposes.
ack_sent 0 / 1 Do we require a TCAP-SENT response for tracing purposes?
(Default = 0)
remote_sccp SCCP Address Object [Required] The far-end SCCP destination address to which the TCAP BEGIN is transferred.
This will be the SCCP called party address.
dialogue Dialogue Object An object containing parameters related to the TCAP dialogue.
components Array of Component Objects An array of Objects representing TCAP components.
The number of components, the operation codes, and invoke IDs should match the original received components.
The internal component encoded parameter fields may possibly have been modified/re-encoded.

Note: The local SCCP address is never specified when using TCAP-TRANSFER. It will be set automatically by the SigtranApp to be identical to the original received SCCP calling party address (which in fact is not our local address at all, it is the remote SCCP address of the original sender).

TCAP-TXNCHECK-REQUEST

The TCAP-TXNCHECK-REQUEST is sent by the SigtranApp by another application whenever it is concerned that too long an interval has passed without any activity following the sending or receiving of a TCAP CONTINUE message.

The TCAP-TXNCHECK-REQUEST message does not have any details body.

TCAP-TXNCHECK-RESPONSE

The TCAP-TXNCHECK-RESPONSE is sent by the SigtranApp by another application whenever it is concerned that too long an interval has passed without any activity following the sending or receiving of a TCAP CONTINUE message.

The attributes of the TCAP-TXNCHECK-RESPONSE message are:

Field Type Description
success 0/1 [Required] Set to 1 iff the Instance is active, the Transaction is known, and the Transaction is open.
error String Indicates the reason for the non-success response.
Present and applicable only if success == 0.

Common Object Structures

SCCP Address Object

An SCCP Address Object may contain the following fields:

Field Type Description
ri 0/1 [Required] Routing Indicator.
1 = route on PC + SSN, 0 = Route on GT)
pc Integer Point Code if present.
ssn Integer Sub-System Number if present.
gt_digits Hex Digits Hex Digits for Global Title Address if present.
gt_noa Integer Global Title Nature of Address (0-127) if present.
(Default = 0)
gt_np Integer Global Title Numbering Plan (0-7) if present.
(Default = 1, E.164)
gt_tt Integer Global Title Translation Type (0-255) if present.

TCAP Dialogue Object

A TCAP Dialogue Object may contain the following fields:

Field Type Description
protocol_version 1 TCAP Protocol Version. Must be 1 if present.
result Integer Value for single-ASN1-type.dialoguePDU.dialogueResponse.result if present.
result_diagnostic_user Integer Value for single-ASN1-type.dialoguePDU.dialogueResponse.result-source-diagnostic.dialogue-service-user if present.
result_diagnostic_provider Integer Value for single-ASN1-type.dialoguePDU.dialogueResponse.result-source-diagnostic.dialogue-service-provider if present.
application_context Binary Value for single-ASN1-type.dialoguePDU.dialogueResponse.application-context-name if present.
map_open Object Attributes for the MAP-OPEN dialog section if present.
.destination_reference_digits Hex String Value for map-open.destinationReference if present.
.origination_reference_digits Hex String Value for map-open.originationReference if present.

TCAP Component Object

A Component Object may contain the following fields:

Field Type Description
invoke Object [Required for Invoke] Container for Invoke details.
.invokeID Integer [Required] The Invoke's ID.
.linkedID Integer Optional Linked ID iff this Invoke is associated with an earlier Invoke.
.operationCode Integer [Required] Code for the operation that this Invoke represents.
.parameter Binary Encoded binary (usually ASN.1 BER) Invoke parameter body.
returnResultLast / returnResultNotLast Object [Required for Return Result] Container for Return Result details.
.invokeID Integer [Required] The ID of the Invoke that the Return Result is associated with.
.result Object Container for result details.
.operationCode Integer [Required] Code for the result type that this Return Result represents.
.parameter Binary [Required] Encoded binary (usually ASN.1 BER) Return Result parameter body.
returnError Object [Required for Return Error] Container for Return Error details.
.invokeID Integer [Required] The ID of the Invoke that the Return Error is associated with.
.errorCode Integer [Required] Code for the error type that this Return Error represents.
.parameter Binary Encoded binary (usually ASN.1 BER) Return Error parameter body.
reject Object [Required for Reject] Container for Reject details.
.invokeID Object [Required] Container for invoke ID details.
.derivable Integer The ID of the Invoke that the Reject is associated with, if it can be determined.
.not-derivable Null Present if the Reject is not (or cannot be) associated with an Invoke.
.problem Object [Required] Container for problem details.
.generalProblem Integer Code for the problem type that this Reject represents, if it represents a general problem.
.invokeProblem Integer Code for the problem type that this Reject represents, if it represents a problem with an Invoke.
.returnResultProblem Integer Code for the problem type that this Reject represents, if it represents a problem with a Return Result.
.returnResultError Integer Code for the problem type that this Reject represents, if it represents a problem with a Return Error.