Skip to content

SIP reINVITE issue with IMS #438

@shirosh

Description

@shirosh

I'm from a Telco company. We have successfully integrated with LiveKit SIP via our NGN SIP trunk. But recently we have migrated from NGN to IMS ATS, since NGN is deprecated leagcy system. But It doesn't work properly. We have noticed IMS standard call flow send 2 SIP INVITEs.

The most probable reason for the immediate re-INVITE is one of two IMS-mandated features:

  1. Session Timers (RFC 4028): IMS requires session timers as a keep-alive mechanism to prevent "hung" sessions if a device disconnects without sending a BYE.

How it works: The initial INVITE from the IMS will contain headers like Session-Expires: 1800 and Min-SE: 90. Your LiveKit server is expected to acknowledge support for this in its 200 OK response. The IMS node acting as the "refresher" will then send a re-INVITE (or UPDATE) before the timer expires to keep the session alive. If your call setup is fast, this refresh might happen very quickly.

  1. QoS Preconditions Framework (RFC 3312): IMS mandates this to guarantee Quality of Service. It ensures network resources are reserved before the call is answered.

How it works: The initial INVITE will contain headers like Require: precondition and an SDP body with a=curr:qos none and a=des:qos mandatory. This is the IMS saying, "I want to set up this call, but don't connect the media or alert the user until you can guarantee the network quality." Your system is expected to perform resource reservation and then confirm it. This confirmation is often done via a re-INVITE to update the SDP and signal that the media path is ready.

NGN likely operated in a "best-effort" manner without enforcing either of these, so the simple INVITE -> 200 OK -> ACK was sufficient. IMS operates under a "guaranteed service" model, which requires these additional steps.

Could you please support us to enable these features. Because our all Livekit Agents going to be wasted because of this SIP connection issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions