8 Managing Client Initiated Connections

This chapter describes how to manage client-initiated connections in Oracle Communications Converged Application Server.

The Session Initiation Protocol (SIP) outbound specification, as defined in RFC-5656, https://tools.ietf.org/html/rfc5656, specifies techniques for keeping connections that a User Application (UA) establishes alive, especially in environments where the UA is behind a Network Address Translation (NAT) device or a firewall. A SIP Servlet application may take different roles with respect to those defined in RFC 5626 for keeping the connections alive. For example, a SIP Servlet application may act as an authoritative proxy, an edge proxy, a registrar, or a UA. Refer to RFC 5626 for more details about the exact procedure for managing client-initiated connections.

Converged Application SIP Servlet containers support sending keep alive messages from a user agent as well as responding to keep alive messages defined in RFC 5626. They also support a FlowBinder interface for managing the connections as described in the following sections.

In RFC 5626, a flow is a transport-layer association between two hosts that is represented by the network address and port number of both ends and by the transport protocol. For Transport Control Protocol (TCP), a flow is equivalent to a TCP connection. For User Datagram Protocol (UDP), a flow is a bidirectional stream of datagrams between a single pair of Internet Protocol (IP) addresses and ports of both peers.

From a SIP Servlet application's perspective, the flow is a transport layer association between the SIP Servlet container and another SIP endpoint on a specific transport.

Table 8-1 describes the Flow interface's methods.

Table 8-1 Flow Interface Methods

Method Description

getToken()

Retrieves the flow token representing a flow.

getLocalURI()

Retrieves the SipURI representation of the local end of transport association.

getRemoteURI()

Retrieves the SipURI representation of the remote end of transport association.

release()

Indicates to the container that the application will not use the Flow object any more.

isActive()

Indicates whether the flow is active or not. Flow becomes inactive when it is closed.

Applications may get an instance of a Flow that represents this transport layer association by using the SipSession.getFlow(), Proxy.getFlow(), or ProxyBranch.getFlow() methods.