3.4.2 Timers

The outbound proxy MUST maintain an expiry timer.

The outbound proxy SHOULD<4> define a time-out value for keeping the connection alive. If the outbound proxy accepts the keepalive message SIP request, the timer SHOULD<5> be set to the time-out value plus a grace period of at least a SIP transaction (transaction) timeout, and the outbound proxy MUST send the SIP response with an Ms-Keep-Alive header field that contains the time-out value in ms-keep-alive-timeout. The expiry timer MUST be reset to the time-out value plus a grace period whenever any traffic is received on the connection.

Protocol clients MUST maintain a refresh timer.

When the protocol client retrieves the time-out value from the ms-keep-alive-timeout parameter in the Ms-Keep-Alive header field, it SHOULD<6> set the refresh timer to two-thirds of the timeout value. The protocol client refresh timer is reset to the time-out value if the protocol client sends any data on the connection.