Class LiveKitSipService
Service for managing SIP trunks, dispatch rules, and participants.
Provides methods for SIP integration, including managing trunks, dispatch rules, and making SIP calls. See LiveKit SIP Service Documentation for more information.
public sealed class LiveKitSipService : TwirpClient, ILiveKitSipService
- Inheritance
-
LiveKitSipService
- Implements
- Inherited Members
Constructors
LiveKitSipService(HttpClient, ILogger<LiveKitSipService>, ILiveKitTokenService)
Initializes a new instance of the LiveKitSipService class.
public LiveKitSipService(HttpClient httpClient, ILogger<LiveKitSipService> logger, ILiveKitTokenService _tokenService)
Parameters
httpClientHttpClientloggerILogger<LiveKitSipService>_tokenServiceILiveKitTokenService
Methods
CreateSIPDispatchRuleAsync(CreateSIPDispatchRuleRequest, CancellationToken)
Creates a new SIP dispatch rule.
public Task<SIPDispatchRuleInfo> CreateSIPDispatchRuleAsync(CreateSIPDispatchRuleRequest request, CancellationToken cancellationToken = default)
Parameters
requestCreateSIPDispatchRuleRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
CreateSIPInboundTrunkAsync(CreateSIPInboundTrunkRequest, CancellationToken)
Creates a new SIP inbound trunk.
public Task<SIPInboundTrunkInfo> CreateSIPInboundTrunkAsync(CreateSIPInboundTrunkRequest request, CancellationToken cancellationToken = default)
Parameters
requestCreateSIPInboundTrunkRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
CreateSIPOutboundTrunkAsync(CreateSIPOutboundTrunkRequest, CancellationToken)
Creates a new SIP outbound trunk.
public Task<SIPOutboundTrunkInfo> CreateSIPOutboundTrunkAsync(CreateSIPOutboundTrunkRequest request, CancellationToken cancellationToken = default)
Parameters
requestCreateSIPOutboundTrunkRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
CreateSIPParticipantAsync(CreateSIPParticipantRequest, CancellationToken)
Creates a SIP participant to make an outbound call.
public Task<SIPParticipantInfo> CreateSIPParticipantAsync(CreateSIPParticipantRequest request, CancellationToken cancellationToken = default)
Parameters
requestCreateSIPParticipantRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
DeleteSIPDispatchRuleAsync(DeleteSIPDispatchRuleRequest, CancellationToken)
Deletes a SIP dispatch rule by ID.
public Task<SIPDispatchRuleInfo> DeleteSIPDispatchRuleAsync(DeleteSIPDispatchRuleRequest request, CancellationToken cancellationToken = default)
Parameters
requestDeleteSIPDispatchRuleRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
DeleteSIPTrunkAsync(DeleteSIPTrunkRequest, CancellationToken)
Deletes a SIP trunk by ID.
public Task<SIPTrunkInfo> DeleteSIPTrunkAsync(DeleteSIPTrunkRequest request, CancellationToken cancellationToken = default)
Parameters
requestDeleteSIPTrunkRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
GetSIPInboundTrunkAsync(GetSIPInboundTrunkRequest, CancellationToken)
Gets a SIP inbound trunk by ID.
public Task<GetSIPInboundTrunkResponse> GetSIPInboundTrunkAsync(GetSIPInboundTrunkRequest request, CancellationToken cancellationToken = default)
Parameters
requestGetSIPInboundTrunkRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
GetSIPOutboundTrunkAsync(GetSIPOutboundTrunkRequest, CancellationToken)
Gets a SIP outbound trunk by ID.
public Task<GetSIPOutboundTrunkResponse> GetSIPOutboundTrunkAsync(GetSIPOutboundTrunkRequest request, CancellationToken cancellationToken = default)
Parameters
requestGetSIPOutboundTrunkRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
ListSIPDispatchRuleAsync(ListSIPDispatchRuleRequest, CancellationToken)
Lists SIP dispatch rules.
public Task<ListSIPDispatchRuleResponse> ListSIPDispatchRuleAsync(ListSIPDispatchRuleRequest request, CancellationToken cancellationToken = default)
Parameters
requestListSIPDispatchRuleRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
ListSIPInboundTrunkAsync(ListSIPInboundTrunkRequest, CancellationToken)
Lists SIP inbound trunks.
public Task<ListSIPInboundTrunkResponse> ListSIPInboundTrunkAsync(ListSIPInboundTrunkRequest request, CancellationToken cancellationToken = default)
Parameters
requestListSIPInboundTrunkRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
ListSIPOutboundTrunkAsync(ListSIPOutboundTrunkRequest, CancellationToken)
Lists SIP outbound trunks.
public Task<ListSIPOutboundTrunkResponse> ListSIPOutboundTrunkAsync(ListSIPOutboundTrunkRequest request, CancellationToken cancellationToken = default)
Parameters
requestListSIPOutboundTrunkRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
ListSIPTrunkAsync(ListSIPTrunkRequest, CancellationToken)
Lists SIP trunks (deprecated, use ListSIPInboundTrunk or ListSIPOutboundTrunk).
[Obsolete("Use ListSIPInboundTrunk or ListSIPOutboundTrunk instead")]
public Task<ListSIPTrunkResponse> ListSIPTrunkAsync(ListSIPTrunkRequest request, CancellationToken cancellationToken = default)
Parameters
requestListSIPTrunkRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
TransferSIPParticipantAsync(TransferSIPParticipantRequest, CancellationToken)
Transfers an active SIP participant to another number.
public Task TransferSIPParticipantAsync(TransferSIPParticipantRequest request, CancellationToken cancellationToken = default)
Parameters
requestTransferSIPParticipantRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
UpdateSIPDispatchRuleAsync(UpdateSIPDispatchRuleRequest, CancellationToken)
Updates an existing SIP dispatch rule.
public Task<SIPDispatchRuleInfo> UpdateSIPDispatchRuleAsync(UpdateSIPDispatchRuleRequest request, CancellationToken cancellationToken = default)
Parameters
requestUpdateSIPDispatchRuleRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
UpdateSIPInboundTrunkAsync(UpdateSIPInboundTrunkRequest, CancellationToken)
Updates an existing SIP inbound trunk.
public Task<SIPInboundTrunkInfo> UpdateSIPInboundTrunkAsync(UpdateSIPInboundTrunkRequest request, CancellationToken cancellationToken = default)
Parameters
requestUpdateSIPInboundTrunkRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.
UpdateSIPOutboundTrunkAsync(UpdateSIPOutboundTrunkRequest, CancellationToken)
Updates an existing SIP outbound trunk.
public Task<SIPOutboundTrunkInfo> UpdateSIPOutboundTrunkAsync(UpdateSIPOutboundTrunkRequest request, CancellationToken cancellationToken = default)
Parameters
requestUpdateSIPOutboundTrunkRequestcancellationTokenCancellationToken
Returns
Exceptions
- LiveKitApiException
Thrown when the server returns a non-success HTTP status code.