Table of Contents

Class CreateSIPParticipantRequest

Namespace
Livekit.Server.Sdk.Dotnet
Assembly
LivekitApi.dll

A SIP Participant is a singular SIP session connected to a LiveKit room via a SIP Trunk into a SIP DispatchRule

public sealed class CreateSIPParticipantRequest : IMessage<CreateSIPParticipantRequest>, IEquatable<CreateSIPParticipantRequest>, IDeepCloneable<CreateSIPParticipantRequest>, IBufferMessage, IMessage
Inheritance
CreateSIPParticipantRequest
Implements
IBufferMessage
Inherited Members

Constructors

CreateSIPParticipantRequest()

public CreateSIPParticipantRequest()

CreateSIPParticipantRequest(CreateSIPParticipantRequest)

public CreateSIPParticipantRequest(CreateSIPParticipantRequest other)

Parameters

other CreateSIPParticipantRequest

Properties

Destination

NEXT ID: 29

public Destination Destination { get; set; }

Property Value

Destination

Dialtone

Optionally play dialtone in the room as an audible indicator for existing participants.

public SIPDialtone Dialtone { get; set; }

Property Value

SIPDialtone

DisplayName

Optional display name for the 'From' SIP header.

Cases:

  1. Unspecified: Use legacy behavior - display name will be set to be the caller's number.
  2. Empty string: Do not send a display name, which will result in a CNAM lookup downstream.
  3. Non-empty: Use the specified value as the display name.
public string DisplayName { get; set; }

Property Value

string

Dtmf

Optionally send following DTMF digits (extension codes) when making a call. Character 'w' can be used to add a 0.5 sec delay.

public string Dtmf { get; set; }

Property Value

string

HasDisplayName

Gets whether the "display_name" field is set

public bool HasDisplayName { get; }

Property Value

bool

Headers

These headers are sent as-is and may help identify this call as coming from LiveKit for the other SIP endpoint.

public MapField<string, string> Headers { get; }

Property Value

MapField<string, string>

HidePhoneNumber

By default the From value (Phone number) is used for participant name/identity (if not set) and added to attributes. If true, a random value for identity will be used and numbers will be omitted from attributes.

public bool HidePhoneNumber { get; set; }

Property Value

bool

IncludeHeaders

Map SIP headers from 200 OK to sip.h.* participant attributes automatically.

When the names of required headers is known, using headers_to_attributes is strongly recommended.

When mapping 200 OK headers to follow-up request headers with attributes_to_headers map, lowercase header names should be used, for example: sip.h.x-custom-header.

public SIPHeaderOptions IncludeHeaders { get; set; }

Property Value

SIPHeaderOptions

KrispEnabled

Enable voice isolation for the callee.

public bool KrispEnabled { get; set; }

Property Value

bool

MaxCallDuration

Max call duration.

public Duration MaxCallDuration { get; set; }

Property Value

Duration

Media

public SIPMediaConfig Media { get; set; }

Property Value

SIPMediaConfig

MediaEncryption

[Obsolete]
public SIPMediaEncryption MediaEncryption { get; set; }

Property Value

SIPMediaEncryption

ParticipantAttributes

Optional user-defined attributes. Will be attached to a created Participant in the room.

public MapField<string, string> ParticipantAttributes { get; }

Property Value

MapField<string, string>

ParticipantIdentity

Optional identity of the participant in LiveKit room

public string ParticipantIdentity { get; set; }

Property Value

string

ParticipantMetadata

Optional user-defined metadata. Will be attached to a created Participant in the room.

public string ParticipantMetadata { get; set; }

Property Value

string

ParticipantName

Optional name of the participant in LiveKit room

public string ParticipantName { get; set; }

Property Value

string

PlayDialtone

[Obsolete]
public bool PlayDialtone { get; set; }

Property Value

bool

PlayRingtone

Deprecated: use dialtone. Setting play_dialtone (or play_ringtone) is equivalent to SIP_DIALTONE_ETSI when dialtone is unset.

[Obsolete]
public bool PlayRingtone { get; set; }

Property Value

bool

RingingTimeout

Max time for the callee to answer the call.

public Duration RingingTimeout { get; set; }

Property Value

Duration

RoomName

What LiveKit room should this participant be connected too

public string RoomName { get; set; }

Property Value

string

SipCallTo

What number should be dialed via SIP

public string SipCallTo { get; set; }

Property Value

string

SipFromHeader

From: "Name" <uri>

public SIPNamedDest SipFromHeader { get; set; }

Property Value

SIPNamedDest

SipNumber

Optional SIP From number to use. If empty, trunk number is used.

public string SipNumber { get; set; }

Property Value

string

SipRequestUri

INVITE <uri>

public SIPRequestDest SipRequestUri { get; set; }

Property Value

SIPRequestDest

SipToHeader

Currently not usable with CreateSIPParticipant: sip_call_to is required, and the two cannot be combined. Use to_user_override to change the To header user.

public SIPNamedDest SipToHeader { get; set; }

Property Value

SIPNamedDest

SipTrunkId

What SIP Trunk should be used to dial the user

public string SipTrunkId { get; set; }

Property Value

string

ToUserOverride

Replaces the user part of the To header, leaving its host, port and transport as they would otherwise be. The request URI is not affected, so the call is still placed to sip_call_to. Empty means no override.

Use this when the callee expects a To header that differs from the number being dialed. Setting "To" in the headers map is not a valid alternative: it adds a second To header rather than replacing the existing one, which makes the INVITE malformed.

public string ToUserOverride { get; set; }

Property Value

string

Trunk

public SIPOutboundConfig Trunk { get; set; }

Property Value

SIPOutboundConfig

WaitUntilAnswered

Wait for the answer for the call before returning.

public bool WaitUntilAnswered { get; set; }

Property Value

bool

Methods

ClearDisplayName()

Clears the value of the "display_name" field

public void ClearDisplayName()