RFC 5626 describes a feature that lets a SIP client initiate a persistent SIP connection to a SIP proxy server on the other side of a firewall/NAT

Using Keep-Alives and Detecting Flow Failure, the connection is kept open and the proxy is able to route incoming SIP messages over the connection created by the client.

The SIP RA has been enhanced to support this RFC (reg-id, instance-id. and CRLF keep-alive). This page describes how to use and configure this behaviour.

Procedures at the client (outgoing connections)

At the client, this feature performs these procedures:

  • On receipt of REGISTER response, check for Flow-Timer header and Require: outbound header.

  • If Flow-Timer is set, send PINGs every 0.8-1.0*Flow-Timer seconds.

  • If Flow-Timer is not set, send PINGs at the client’s discretion.

  • If Require: outbound is set, expect to receive a PONG within 10s of each PING. If this PONG is not received, close the connection.

  • If Require: outbound is not set, do not expect to receive a PONG within 10s of each PING; and do not close connections if the PONG is not received.

Procedure at the server (incoming connections)

At the server, this feature performs these procedures:

Note

The SBB processing the REGISTER request is responsible for setting the Flow-Timer and `Require: outbound `headers in the REGISTER response.

For example:

FlowTimerHeader flowTimer =
        ((OCHeaderFactory)getSipHeaderFactory()).createFlowTimerHeader(20);
response.addHeader(flowTimer);
response.addHeader(getSipHeaderFactory().createRequireHeader("outbound"));
response.addHeader(getSipHeaderFactory().createSupportedHeader("outbound"));
response.addHeader(getSipHeaderFactory().createSupportedHeader("path"));
  • In the RA, if a Flow-Timer header is set, start a timer for Flow-Timer + 1s network delay allowance; and close the connection if a PING is not received before the timer expires.

  • If the Flow-Timer header is not set, don’t start a timer to receive PING; and don’t close the connection.

  • Receive PING from the client.

  • Send PONG back to the client.

  • If Flow-Timer is set, start a new timer for Flow-Timer + network delay allowance on receipt of each PING from the client; and close the connection if another PING is not received before the timer expires.

SIP properties

The following SIP properties (sip.properties) must be set to alter the default persistent outbound connection behaviour.

Property What it specifies Values
default

REGISTRATION_FLOW_TIMER

The wait time between client expected PING attempts. If there is no response (PING) within the specified time (in seconds), then the connection will be closed. A value of 0 means that no connections will be closed.

time in seconds
10

System Properties

The following JVM system properties must be set to alter the behaviour between RFC 5626 and draft-ietf-sip-outbound-03.

Property What it specifies Values
default

opencloud.sip.rfc5626Variant

Switch connection behaviour between RFC 5626 and draft-ietf-sip-outbound-03.

draft03
rfc5626

Previous page Next page