Table of Contents

Class CreateSIPParticipantRequest

Namespace
LiveKit.Proto
Assembly
LiveKit.AspNetCore.ServerSdk.Abstractions.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
IMessage
Inherited Members

Constructors

CreateSIPParticipantRequest()

public CreateSIPParticipantRequest()

CreateSIPParticipantRequest(CreateSIPParticipantRequest)

public CreateSIPParticipantRequest(CreateSIPParticipantRequest other)

Parameters

other CreateSIPParticipantRequest

Fields

DestinationFieldNumber

Field number for the "destination" field.

public const int DestinationFieldNumber = 22

Field Value

int

DisplayNameFieldNumber

Field number for the "display_name" field.

public const int DisplayNameFieldNumber = 21

Field Value

int

DtmfFieldNumber

Field number for the "dtmf" field.

public const int DtmfFieldNumber = 5

Field Value

int

HeadersFieldNumber

Field number for the "headers" field.

public const int HeadersFieldNumber = 16

Field Value

int

HidePhoneNumberFieldNumber

Field number for the "hide_phone_number" field.

public const int HidePhoneNumberFieldNumber = 10

Field Value

int

IncludeHeadersFieldNumber

Field number for the "include_headers" field.

public const int IncludeHeadersFieldNumber = 17

Field Value

int

KrispEnabledFieldNumber

Field number for the "krisp_enabled" field.

public const int KrispEnabledFieldNumber = 14

Field Value

int

MaxCallDurationFieldNumber

Field number for the "max_call_duration" field.

public const int MaxCallDurationFieldNumber = 12

Field Value

int

MediaEncryptionFieldNumber

Field number for the "media_encryption" field.

public const int MediaEncryptionFieldNumber = 18

Field Value

int

MediaFieldNumber

Field number for the "media" field.

public const int MediaFieldNumber = 23

Field Value

int

ParticipantAttributesFieldNumber

Field number for the "participant_attributes" field.

public const int ParticipantAttributesFieldNumber = 9

Field Value

int

ParticipantIdentityFieldNumber

Field number for the "participant_identity" field.

public const int ParticipantIdentityFieldNumber = 4

Field Value

int

ParticipantMetadataFieldNumber

Field number for the "participant_metadata" field.

public const int ParticipantMetadataFieldNumber = 8

Field Value

int

ParticipantNameFieldNumber

Field number for the "participant_name" field.

public const int ParticipantNameFieldNumber = 7

Field Value

int

PlayDialtoneFieldNumber

Field number for the "play_dialtone" field.

public const int PlayDialtoneFieldNumber = 13

Field Value

int

PlayRingtoneFieldNumber

Field number for the "play_ringtone" field.

public const int PlayRingtoneFieldNumber = 6

Field Value

int

RingingTimeoutFieldNumber

Field number for the "ringing_timeout" field.

public const int RingingTimeoutFieldNumber = 11

Field Value

int

RoomNameFieldNumber

Field number for the "room_name" field.

public const int RoomNameFieldNumber = 3

Field Value

int

SipCallToFieldNumber

Field number for the "sip_call_to" field.

public const int SipCallToFieldNumber = 2

Field Value

int

SipFromHeaderFieldNumber

Field number for the "sip_from_header" field.

public const int SipFromHeaderFieldNumber = 26

Field Value

int

SipNumberFieldNumber

Field number for the "sip_number" field.

public const int SipNumberFieldNumber = 15

Field Value

int

SipRequestUriFieldNumber

Field number for the "sip_request_uri" field.

public const int SipRequestUriFieldNumber = 24

Field Value

int

SipToHeaderFieldNumber

Field number for the "sip_to_header" field.

public const int SipToHeaderFieldNumber = 25

Field Value

int

SipTrunkIdFieldNumber

Field number for the "sip_trunk_id" field.

public const int SipTrunkIdFieldNumber = 1

Field Value

int

TrunkFieldNumber

Field number for the "trunk" field.

public const int TrunkFieldNumber = 20

Field Value

int

WaitUntilAnsweredFieldNumber

Field number for the "wait_until_answered" field.

public const int WaitUntilAnsweredFieldNumber = 19

Field Value

int

Properties

Descriptor

public static MessageDescriptor Descriptor { get; }

Property Value

MessageDescriptor

Destination

NEXT ID: 27

public Destination Destination { get; set; }

Property Value

Destination

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

Parser

public static MessageParser<CreateSIPParticipantRequest> Parser { get; }

Property Value

MessageParser<CreateSIPParticipantRequest>

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

public bool PlayDialtone { get; set; }

Property Value

bool

PlayRingtone

Optionally play dialtone in the room as an audible indicator for existing participants. The play_ringtone option is deprectated but has the same effect.

[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

To: "Name" <uri>

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

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

CalculateSize()

Calculates the size of this message in Protocol Buffer wire format, in bytes.

public int CalculateSize()

Returns

int

The number of bytes required to write this message to a coded output stream.

ClearDisplayName()

Clears the value of the "display_name" field

public void ClearDisplayName()

Clone()

Creates a deep clone of this object.

public CreateSIPParticipantRequest Clone()

Returns

CreateSIPParticipantRequest

A deep clone of this object.

Equals(CreateSIPParticipantRequest)

public bool Equals(CreateSIPParticipantRequest other)

Parameters

other CreateSIPParticipantRequest

Returns

bool

Equals(object)

public override bool Equals(object other)

Parameters

other object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

MergeFrom(CodedInputStream)

Merges the data from the specified coded input stream with the current message.

public void MergeFrom(CodedInputStream input)

Parameters

input CodedInputStream

Remarks

See the user guide for precise merge semantics.

MergeFrom(CreateSIPParticipantRequest)

Merges the given message into this one.

public void MergeFrom(CreateSIPParticipantRequest other)

Parameters

other CreateSIPParticipantRequest

Remarks

See the user guide for precise merge semantics.

ToString()

public override string ToString()

Returns

string

WriteTo(CodedOutputStream)

Writes the data to the given coded output stream.

public void WriteTo(CodedOutputStream output)

Parameters

output CodedOutputStream

Coded output stream to write the data to. Must not be null.