CallMeter Docs

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

  1. The caller includes Session-Expires and Min-SE headers in the INVITE
  2. The callee accepts the session interval (or proposes a higher one via 422 response)
  3. Both sides agree on which endpoint sends refresh re-INVITEs (the "refresher")
  4. The refresher sends a re-INVITE at half the session interval to reset the timer
  5. 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: 90

This requests a 1800-second (30-minute) session interval with the caller (UAC) responsible for refreshes. The minimum acceptable interval is 90 seconds.

Configuration Options

SettingValuesDefaultDescription
Session Timer ModeDisabled, Supported, RequiredDisabledWhether session timers are negotiated
Session Expires90-7200 secondsTarget session refresh interval (must be set when enabled)
Refresher PreferenceUAC, UAS, NoneUACWhich endpoint should send refresh re-INVITEs
Soft ExpiryOn/OffOffLog warning on expiry instead of terminating

Session Timer Mode

ModeBehavior
DisabledNo Session-Expires header sent. Session timers are not negotiated.
SupportedSession-Expires header included. If the remote does not support timers, the call proceeds without them.
RequiredSession-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.

PreferenceBehavior
UACThe caller sends refresh re-INVITEs. Recommended default — the initiating side drives the refresh.
UASThe callee sends refresh re-INVITEs. Use when the SIP server expects to control session refresh.
NoneNo 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: 1800

CallMeter automatically handles 422 responses by:

  1. Reading the Min-SE value from the 422 response
  2. Updating the Session-Expires to match or exceed the remote's minimum
  3. 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 ExpiryBehavior
OffThe endpoint terminates the call immediately (sends BYE)
OnThe 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:

MetricDescription
session_timer_refreshesNumber 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.

On this page