You are here: CSP Developer’s Guide: Internet Protocol > 5 Session-Initiation Protocol (SIP) Software > SIP Support for TCP

SIP Support for TCP

Overview

This feature allows SIP signaling to be reliably transported using the Transmission Control Protocol (TCP). TCP is a transport layer, connection-oriented, end-to-end protocol. It provides reliable, sequenced, and unduplicated bytes to a remote or local user.

This feature adds to the CSP’s current support of SIP signaling transport using User Datagram Protocol (UDP) transport layer.

This section explains how the CSP supports SIP using TCP, and the different scenarios involved.

Pertinent Specification

With this feature, the CSP is compliant with the transport aspects of SIP RFC 3261.

Description

Outbound SIP Calls - SIP User Agent Client Registered with the CSP

Whenever a SIP User Agent Client registers with the CSP, the Registration message specifies the desired transport type for accessing that User Agent Client. This registered transport type takes precedence over all other mechanisms to set up the outbound transport type.

The initial Invite message that leaves the CSP travels over the transport type specified in the Registration’s Contact header specification. Subsequent transactions within this SIP session are allowed to switch the transport type as required.

Important! If the transport type is TCP and the SIP session fails to get established, the CSP will not retry the Invite message using the UDP transport.

Outbound SIP Calls - Default Outbound Proxy Specified

You enable the SIP mode with a VoIP Protocol Configure message that specifies the Use Default SIP Proxy Host TLV (0x0264).

When the SIP User Agent Client is not registered with the CSP, the Invite message is sent to the SIP proxy specified in the Use Default SIP Proxy Host TLV. In this case, the CSP must select a transport type to use to send the Invite message. The default outbound transport type is UDP. You can change the default transport by sending a VoIP Protocol Configure message containing the SIP Transport Type TLV (0x027D). This message sets the initial transport type for all messages originating from the CSP to the outbound SIP proxy.

If you want the host application controlling the CSP to change the transport type for individual calls, include the SIP B Leg Transport Type TLV in the Route Control message (in the NPDI ICB 0x0033).

This TLV overrides the current setting of the outbound transport type for this call. Subsequent calls that do not contain this TLV uses the current setting of the outbound transport type

Important! The following explains what happens when connected CSPs have different default transport types.
Platform 1 is configured to send UDP. Platform 2 is configured to send TCP.
Platform 1 sends an Invite message to Platform 2 using UDP. If Platform 2 has to send a Re-invite message back to the Platform 1, the message uses UDP since that was the original transport type used by Platform 1 in the Invite message.

Inbound SIP Calls

The originator of the message selects the transport type of the inbound call. Whenever an Invite message arrives, the CSP sends a Request for Service with Data (0x002D) message to the host application. This message contains the SIP A Leg Transport Type TLV (0x2916) (in the NPDI ICB 0x0033) which specifies the transport type used in the Invite message.

If this TLV specifies that the TCP transport type is used, two additional TLVs appear in the Request for Service Data (0x002D) message (in the NPDI ICB 0x0033):

• SIP Remote IP Address (0x294E)

• SIP Remote IP Port (0x294F)

These TLVs are used in inbound SIP sessions as described in Inbound SIP Sessions Over a Persistent TCP Socket below.

Persistent Sockets

You can enable persistent sockets for Inbound and Outbound SIP sessions. Persistent sockets prevent the SIP Idle Timeout from expiring and closing the socket.

SIP Idle Timeout

If you do not use persistent sockets, each TCP socket expires when the SIP Idle Timeout is reached. The default is 32 seconds. The host application can change the default by using the VoIP Protocol Configure (0x00EE) message and sending a SIP Idle Socket Timeout TLV (0x0281) with a new value. The minimum time is five (5) seconds.

Outbound SIP Sessions Over a Persistent TCP Socket

You can enable this mode two ways:

• If you want all TCP sockets for all outbound SIP sessions to be over a persistent TCP socket, enable this mode with the SIP Persistent Sockets TLV (0x027E) within a VoIP Protocol Configuration (0x00EE) message.

• If you want to have a mix of persistent and non-persistent TCP sockets, include the SIP Do Not Close Socket TLV (0x294D) in the Route Control (0x00E8) message used to initiate the Invite message. Do not issue the SIP Persistent Sockets TLV.

The CSP does not report the remote IP and port address to the host application because the host application already supplied this information when placing the outbound call.

Important! Nothing prevents the peer endpoint from closing this socket, unless the endpoint is an CSP.

Inbound SIP Sessions Over a Persistent TCP Socket

After the host application receives a Request for Service with Data (0x002D) message with the following TLVs (in the NPDI ICB 0x0033) the host application determines if it will make the TCP socket persistent:

• SIP Remote IP Address (0x294E)

• SIP Remote IP Port (0x294F)

If the host application determines that the TCP socket should be persistent, the host application issues a PPL Event Request (0x0044) message with an Event ID of 0x29, which keeps the socket from closing.

Reusing TCP Sockets

You can enable the reuse of TCP sockets. This feature:

• must be enabled when persistent sockets are enabled.

• can be used when persistent sockets are disabled.

To enable this feature, send the VoIP Protocol Configure (0x00EE) message containing the SIP Existing Socket Reuse TLV (0x0280).

When you enable this feature and a SIP message needs to be transported from the CSP, the CSP checks to determine if a TCP socket to the destination is currently open. If one is open, then that socket is used to transport the message.

Configuring

Refer to the following to configure TCP sockets:

API Messages in the API Reference

• VoIP Protocol Configure (0x00EE)

• PPL Event Request (0x0044)

• Request for Service with Data (0x002D)

• Route Control (0x00E8)

PPL Event Requests

• Do Not Close Socket - Event ID 0x29

(Refer to Call Control Event Requests in PPL Information: PPL Information: SIP UA 0x00A7

TLVs

Refer to the API Reference.

• SIP Transport Type (0x027D)

• SIP A Leg Transport Type (0x2916)

• SIP B Leg Transport Type (0x2917)

• SIP Do Not Close Socket (0x29D4)

• SIP Remote IP Address (0x294E)

• SIP Remote IP Port (0x294F)

• SIP Persistent Sockets (0x027E)

• SIP Existing Socket Reuse (0x0280)

• SIP Idle Socket Timeout (0x0281)

Session-Initiation Protocol. A signaling protocol used for establishing sessions in an IP network. A session could be a simple, two-way telephone call, or it could be a collaborative multi-media conference session.
UPD. User Datagram Protocol. Unreliable networking layer that sits at the same level of networking stack as TCP. Part of the TCP/IP protocol suit, UDP is used for transferring IP datagrams between host computers, where each datagram is routed through the Internet based on the destination IP address.
In SIP, an application program that sends SIP requests (See also Session Initiation Protocol). Clients may or may not interact directly with a person. Users agents and proxies contain clients (and servers).
Voice over Internet Protocol. The delivery of voice information in digital form in discrete packets rather than in the traditional circuit-committed protocols of the public-switched telephone network (PSTN).
A computer, attached to the Excel platform through an RS-232 or Ethernet link, from which you run the telecommunications application that controls the Excel platform.
Tag-Length-Value block. A standardized block that allows data to inserted in a standard way into API messages.
Network Protocol Data Intelligence. Also called “Interworking,” it is a software product that operates within Excel’s Call Control (Layer 4) and Services (Layer 5) call processing layers. NPDI is meant to enhance Excel’s call processing product offering by allowing call processing layers (specifically Layers 4 and 5) to perform advanced analysis, generation, and conversion of Network Signaling (NS) Layer 3 information.
See Information Control Block.
Internet Protocol. Part of the TCP/IP family of protocols used to route messages and tracks the addresses of nodes.
The point in the Excel platform where a DS0 connects to a network. Also known as a "socket."
A 32-bit address, used in IP routing, which includes a Network address identifier assigned by a central authority and a Host ID (an end station identifier assigned by a LAN administrator).
See Programmable Protocol Language.
A condition that, when met, drives a state machine from one state to another. A condition that drives a Component out of its current state by invoking an associated primitive.
Setting up, monitoring, and tearing down calls.