Skip to content

[Feature Request] Allow customizing 'From' header domain (fromHost) in SIP Outbound Trunk #578

@daniilshamraev

Description

@daniilshamraev

Is your feature request related to a problem? Please describe.

Currently, when creating a SIP Outbound Trunk via CreateSIPOutboundTrunk (or CreateSIPParticipant), there is no option to explicitly set the domain part of the SIP From header (the fromHost).

The SIP service seems to automatically construct the From header using the authenticated username and the service's configured sip.local_ip or global domain.

The Problem:

Some strict SIP providers require the From header domain to match the registration domain exactly (or a specific verified domain), rejecting calls where the From domain is an IP address or the internal hostname of the LiveKit SIP service.

Describe the solution you'd like

I would like to request a new field in the SIPOutboundTrunkInfo (and potentially CreateSIPParticipantRequest) protobuf definition, such as from_domain or from_host.

If set, the SIP service should use this value to construct the domain part of the From header in outgoing INVITE requests, overriding the default behavior (which currently seems to fall back to the local IP or global config).

Example desired behavior:

// Proposed field
trunk := &livekit.SIPOutboundTrunkInfo{
    // ... existing fields
    FromDomain: "sip.myprovider.com", 
}

Resulting header: From: <sip:username@sip.myprovider.com>

Describe alternatives you've considered

  1. Global Config: Changing the global domain in config.yaml. This is not ideal because a single SIP service instance might need to connect to multiple providers with different domain requirements.
  2. Custom Headers: Trying to pass From in the custom headers map. This usually doesn't work as the SIP stack overwrites standard headers like From to ensure protocol compliance.

Additional context

  • SDK/Version: LiveKit SIP Service
  • Use Case: Connecting to a legacy SIP provider that enforces strict domain validation on the From header.

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