SIP Session Timers
Reference for SIP session timer configuration (RFC 4028) including refresh intervals, refresher role, Min-SE negotiation, and expiry behavior.
SIP session timers (RFC 4028) keep active calls alive by periodically refreshing the SIP session. Without session timers, a network failure that prevents BYE delivery can leave phantom sessions consuming resources on the SIP server indefinitely.
How Session Timers Work
- The caller includes
Session-ExpiresandMin-SEheaders in the INVITE - The callee accepts the session interval (or proposes a higher one via 422 response)
- Both sides agree on which endpoint sends refresh re-INVITEs (the "refresher")
- The refresher sends a re-INVITE at half the session interval to reset the timer
- If a refresh is missed, the non-refreshing side waits for the full interval before terminating
Example SIP Headers
Session-Expires: 1800;refresher=uac
Min-SE: 90This requests a 1800-second (30-minute) session interval with the caller (UAC) responsible for refreshes. The minimum acceptable interval is 90 seconds.
Configuration Options
| Setting | Values | Default | Description |
|---|---|---|---|
| Session Timer Mode | Disabled, Supported, Required | Disabled | Whether session timers are negotiated |
| Session Expires | 90-7200 seconds | — | Target session refresh interval (must be set when enabled) |
| Refresher Preference | UAC, UAS, None | UAC | Which endpoint should send refresh re-INVITEs |
| Soft Expiry | On/Off | Off | Log warning on expiry instead of terminating |
Session Timer Mode
| Mode | Behavior |
|---|---|
| Disabled | No Session-Expires header sent. Session timers are not negotiated. |
| Supported | Session-Expires header included. If the remote does not support timers, the call proceeds without them. |
| Required | Session-Expires header included with Require: timer. If the remote does not support session timers, the call fails with 420 Bad Extension. |
Refresher Role
The refresher is the endpoint responsible for sending periodic re-INVITE requests to keep the session alive.
| Preference | Behavior |
|---|---|
| UAC | The caller sends refresh re-INVITEs. Recommended default — the initiating side drives the refresh. |
| UAS | The callee sends refresh re-INVITEs. Use when the SIP server expects to control session refresh. |
| None | No preference expressed. The remote side decides. |
The final refresher role is determined during SDP negotiation. If both sides express a preference, the answerer's preference takes priority per RFC 4028.
Min-SE Negotiation (422 Response)
If the requested Session-Expires interval is shorter than the remote endpoint's minimum acceptable interval, the remote responds with 422 Session Interval Too Small and includes its own Min-SE value.
SIP/2.0 422 Session Interval Too Small
Min-SE: 1800CallMeter automatically handles 422 responses by:
- Reading the
Min-SEvalue from the 422 response - Updating the
Session-Expiresto match or exceed the remote's minimum - Retrying the INVITE with the adjusted interval
This negotiation is transparent — no user intervention is needed.
Refresh Timing
The refresher sends a re-INVITE at half the session interval (the "midpoint"). For a 1800-second interval, refreshes occur every 900 seconds.
If the refresh re-INVITE fails (timeout, network error), the refresher retries with standard SIP retransmission. If all retries fail, the session is considered dead.
Expiry Behavior
When the session interval expires without a refresh:
| Soft Expiry | Behavior |
|---|---|
| Off | The endpoint terminates the call immediately (sends BYE) |
| On | The endpoint logs a warning but does not terminate. Use this for testing session timer behavior without affecting call completion. |
Metrics
Session timer activity is tracked in the call timing metrics:
| Metric | Description |
|---|---|
session_timer_refreshes | Number of successful refresh re-INVITEs sent or received during the call |
When to Use Session Timers
- SIP trunk testing — Verify that your SIP trunk provider's session timer handling is correct
- PBX capacity testing — Confirm that refresh re-INVITEs do not impact call quality under load
- Compliance testing — RFC 4028 compliance is required by many enterprise SIP deployments
- Long-duration call testing — Ensure calls lasting hours are not unexpectedly terminated
Session timers and hold
Session timer refreshes continue during call hold. The refresh re-INVITE preserves the current hold state (sendonly/inactive) so the call remains on hold through the refresh cycle.
Related Pages
- Scenario Actions — Configure mid-call actions including hold/resume
- SIP Response Codes — Understanding 422 and related responses
- VoIP Terminology — SIP protocol definitions
SRTP Methods
Reference for the SRTP method bitmask controlling SDES and DTLS-SRTP key exchange, SDP profile mapping, and cipher suite specifications.
RTP Compliance & Device Interop
RTP packet sizing, codec clock rate handling, RTCP feedback timing, and known device-specific behaviors for hardware interoperability testing.