SIP Session Timer Feature

SIP does not have a keepalive mechanism for established sessions and it does not have the capability of determining whether a session is still active. User agents (UAs) may be able to determine whether a session has timed out by using session specific mechanisms, but proxies cannot always determine when sessions are still active.

The Oracle® Enterprise Session Border Controller provides a SIP session timer feature that, when enabled, forwards the re-INVITE or UPDATE requests from a User Agent Client (UAC) to a User Agent Server (UAS) in order to determine whether or not a session is still active. This refresh feature works for both UAs and proxies. The following paragraphs provide additional information about the session timers on the Oracle® Enterprise Session Border Controller.

How the Session Timer Feature Works

During an active SIP call session, when a UA fails to send a BYE message at the end of the session, or when the BYE message gets lost due to network problems, the proxy cannot determine when the session has ended. Therefore, the proxy may hold onto resources associated with the call session for indefinite periods of time causing the session to never time out.

The SIP session timer feature adds the capability to periodically refresh SIP sessions by sending repeated INVITE (re-INVITE) or UPDATE Session Refresh Requests. These requests are sent during active call legs to allow UAs or proxies to determine the status of a SIP session. The Session Refresh Requests along with the session timers determine if the active sessions stay active and completed sessions are terminated.

When you enable the session timer feature on the Oracle® Enterprise Session Border Controller, it periodically sends out a Session Refresh Request (re-INVITE or UPDATE). The Response that is returned to the Oracle® Enterprise Session Border Controller contains a success status code (2xx) that contains a session timer interval. The Oracle® Enterprise Session Border Controller then refreshes the session timer each time it receives the 2xx Response containing that session timer interval.

The initial INVITE message sent from the UAC to the UAS contains two fields that make up the session timer interval in the SIP Session Header:

  • Session-Expires (SE) - Specifies the maximum amount of time, in seconds, that can occur between session refresh requests in a dialog before the session is considered timed out.
  • Minimum-SE (Min-SE) - Specifies the minimum allowed value, in seconds, for the session expiration.

The following displays the session timer interval values inserted in the SIP session INVITE message per RFC 4028:

INVITE sip:9109621001@192.168.200.99 SIP/2.0
Via: SIP/2.0/UDP 192.168.200.49:5060;branch=z9hG4bK0g6t23200gd0res4l580.1
Max-Forwards: 69
From: <sip:rick@192.168.1.48>;tag=SDr08od01-188c3fbc-b01a-4d68-b741-09e5dc98a064
To: sip:149@192.168.1.49
Contact: <sip:rick@192.168.200.49:5060;transport=udp>
Call-ID: SDr08od01-9c12b48e3b0f7fad39ff3a2e0ced5ed3-v3000i1
CSeq: 3941 INVITE
Allow: INVITE, ACK, BYE, CANCEL, UPDATE, PRACK
Supported:  timer 
Session-Expires: 1800
Min-SE: 90
Content-Type: application/sdp
Content-Length: 236

v=0
o=- 3462189550 3462189550 IN IP4 192.168.200.49
s=pjmedia
c=IN IP4 192.168.200.49
t=0 0
m=audio 20000 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

If the Oracle® Enterprise Session Border Controller receives an INVITE from the UAC with a Session-Expires header, it starts a new session timer, or refreshes an existing session timer and then forwards the INVITE to the UAS. The subsequent 2xx Responses and re-INVITES also include the session timer intervals. If the Oracle® Enterprise Session Border Controller does not receive a session refresh within the time specified in the session timer interval, the session timer expires, and the Oracle® Enterprise Session Border Controller terminates the session between the UAC and the UAS.

The following occurs when you enable the session timer feature on the Oracle® Enterprise Session Border Controller:

  1. The UAC sends an INVITE to the Oracle® Enterprise Session Border Controller with the SE and min-SE values (session timer interval). The Oracle® Enterprise Session Border Controller starts a session timer.
  2. The Oracle® Enterprise Session Border Controller forwards the INVITE to the User Agent Server (UAS) with the same values.
  3. The UAS sends the 200 OK Response to the Oracle® Enterprise Session Border Controller with the session interval values.
  4. The Oracle® Enterprise Session Border Controller forwards the Response to the UAC.
  5. The UAC sends an ACK (Acknowledge) to theOracle® Enterprise Session Border Controller, and the Oracle® Enterprise Session Border Controller forwards the ACK to the UAS.
  6. The UAC sends out a re-INVITE (Session Refresh Request) to the Oracle® Enterprise Session Border Controller with the session interval values. The Oracle® Enterprise Session Border Controller refreshes the session timer.
  7. The Oracle® Enterprise Session Border Controller forwards the re-INVITE to the UAS.
  8. The UAS sends the 200 OK response to the Oracle® Enterprise Session Border Controller with the session interval values.
  9. The Oracle® Enterprise Session Border Controller sends the 200 OK response to the UAC.
  10. If the Oracle® Enterprise Session Border Controller does not receive a Response within the session interval (150 seconds in the following illustration), the timer expires, and the Oracle® Enterprise Session Border Controller terminates the session between the UAC and the UAS. The following illustration shows an example of a dialog between the UAC, the Oracle® Enterprise Session Border Controller, and the UAS during an active session.
    The OCSBC using the session timer to terminate a session.

    When the Oracle® Enterprise Session Border Controller terminates a session it sends a BYE to both the ingress and egress call legs. If accounting is configured, the Oracle® Enterprise Session Border Controller also sends a RADIUS stop record with Acct-Terminate-Cause = Session-Timeout. You can enable or disable the use of the session timers using the ACLI interface at session-router, sip-config, options.

SIP Session Timer Configuration

You can configure the session timer feature on the Oracle® Enterprise Session Border Controller to periodically refresh SIP sessions and determine whether or not a session is still active. If the Oracle® Enterprise Session Border Controller determines that a session is no longer active, it terminates the session based on the session timer interval settings.

To configure the session timer feature on the Oracle® Enterprise Session Border Controller:

  1. In Superuser mode, type configure terminal and press Enter.
    ORACLE# configure terminal
  2. Type session-router and press Enter to access the session router-related configurations.
    ORACLE(configure)# session-router
  3. Type sip-config and press Enter to access the SIP config-related configurations. The system prompt changes to let you know that you can begin configuring individual parameters for this object.
    ORACLE(session-router)# sip-config
    ORACLE(sip-config)#
  4. Enter options followed by the following value:
    • +session-timer-support

      ORACLE(sip-config)# options +session-timer-support

      This value enables the system to start the session timer for session refreshes coming from the UAC. The system determines whether or not a session is active based on session refreshes or responses. It terminates the session when no session refreshes occur within the session timer interval. To disable the session timer feature, enter options followed by -session-timer-support.

      Oracle® Enterprise Session Border Controller(sip-config)# options -session-timer-support

      Note:

      To disable session timers, you must add a minus sign (-) before the session-timers-support value.