pub struct SIPClient { /* private fields */ }Implementations§
Source§impl SIPClient
impl SIPClient
Sourcepub fn with_api_key(host: &str, api_key: &str, api_secret: &str) -> Self
pub fn with_api_key(host: &str, api_key: &str, api_secret: &str) -> Self
Authenticates with an API key and secret, signing a short-lived token per request.
Sourcepub fn with_token(host: &str, token: &str) -> Self
pub fn with_token(host: &str, token: &str) -> Self
Authenticates with a pre-signed token, sent verbatim on every request.
Sourcepub fn new(host: &str) -> ServiceResult<Self>
pub fn new(host: &str) -> ServiceResult<Self>
Reads the API key and secret from the LIVEKIT_API_KEY and
LIVEKIT_API_SECRET environment variables.
Sourcepub fn with_failover(self, enabled: bool) -> Self
pub fn with_failover(self, enabled: bool) -> Self
Enables or disables region failover (enabled by default). Failover only engages for LiveKit Cloud hosts.
Sourcepub fn with_request_timeout(self, timeout: Duration) -> Self
pub fn with_request_timeout(self, timeout: Duration) -> Self
Overrides the default per-request timeout (10s) for calls on this client.
create_sip_participant can still override it per call via
CreateSIPParticipantOptions::timeout.
pub async fn create_sip_inbound_trunk( &self, name: String, numbers: Vec<String>, options: CreateSIPInboundTrunkOptions, ) -> ServiceResult<SipInboundTrunkInfo>
pub async fn create_sip_outbound_trunk( &self, name: String, address: String, numbers: Vec<String>, options: CreateSIPOutboundTrunkOptions, ) -> ServiceResult<SipOutboundTrunkInfo>
Sourcepub async fn update_sip_inbound_trunk(
&self,
trunk_id: String,
update: SipInboundTrunkUpdate,
) -> ServiceResult<SipInboundTrunkInfo>
pub async fn update_sip_inbound_trunk( &self, trunk_id: String, update: SipInboundTrunkUpdate, ) -> ServiceResult<SipInboundTrunkInfo>
Updates specific fields of an existing SIP inbound trunk. Only the fields
set on update are changed; everything else is left as-is. Mirrors the
Python SDK’s update_inbound_trunk_fields / server-sdk-go’s
SipInboundTrunkUpdate action.
Sourcepub async fn update_sip_inbound_trunk_replace(
&self,
trunk_id: String,
trunk: SipInboundTrunkInfo,
) -> ServiceResult<SipInboundTrunkInfo>
pub async fn update_sip_inbound_trunk_replace( &self, trunk_id: String, trunk: SipInboundTrunkInfo, ) -> ServiceResult<SipInboundTrunkInfo>
Updates an existing SIP inbound trunk by replacing it entirely with
trunk. Mirrors the Python SDK’s update_inbound_trunk / server-sdk-go’s
SipInboundTrunkInfo (Replace) action.
Sourcepub async fn update_sip_outbound_trunk(
&self,
trunk_id: String,
update: SipOutboundTrunkUpdate,
) -> ServiceResult<SipOutboundTrunkInfo>
pub async fn update_sip_outbound_trunk( &self, trunk_id: String, update: SipOutboundTrunkUpdate, ) -> ServiceResult<SipOutboundTrunkInfo>
Updates specific fields of an existing SIP outbound trunk. Only the fields
set on update are changed; everything else is left as-is.
Sourcepub async fn update_sip_outbound_trunk_replace(
&self,
trunk_id: String,
trunk: SipOutboundTrunkInfo,
) -> ServiceResult<SipOutboundTrunkInfo>
pub async fn update_sip_outbound_trunk_replace( &self, trunk_id: String, trunk: SipOutboundTrunkInfo, ) -> ServiceResult<SipOutboundTrunkInfo>
Updates an existing SIP outbound trunk by replacing it entirely with
trunk.
pub async fn list_sip_trunk( &self, filter: ListSIPTrunkFilter, ) -> ServiceResult<Vec<SipTrunkInfo>>
pub async fn list_sip_inbound_trunk( &self, filter: ListSIPInboundTrunkFilter, ) -> ServiceResult<Vec<SipInboundTrunkInfo>>
pub async fn list_sip_outbound_trunk( &self, filter: ListSIPOutboundTrunkFilter, ) -> ServiceResult<Vec<SipOutboundTrunkInfo>>
pub async fn delete_sip_trunk( &self, sip_trunk_id: &str, ) -> ServiceResult<SipTrunkInfo>
pub async fn create_sip_dispatch_rule( &self, rule: Rule, options: CreateSIPDispatchRuleOptions, ) -> ServiceResult<SipDispatchRuleInfo>
Sourcepub async fn update_sip_dispatch_rule(
&self,
dispatch_rule_id: String,
update: SipDispatchRuleUpdate,
) -> ServiceResult<SipDispatchRuleInfo>
pub async fn update_sip_dispatch_rule( &self, dispatch_rule_id: String, update: SipDispatchRuleUpdate, ) -> ServiceResult<SipDispatchRuleInfo>
Updates specific fields of an existing SIP dispatch rule. Only the fields
set on update are changed; everything else is left as-is.
Sourcepub async fn update_sip_dispatch_rule_replace(
&self,
dispatch_rule_id: String,
rule: SipDispatchRuleInfo,
) -> ServiceResult<SipDispatchRuleInfo>
pub async fn update_sip_dispatch_rule_replace( &self, dispatch_rule_id: String, rule: SipDispatchRuleInfo, ) -> ServiceResult<SipDispatchRuleInfo>
Updates an existing SIP dispatch rule by replacing it entirely with
rule.
pub async fn list_sip_dispatch_rule( &self, filter: ListSIPDispatchRuleFilter, ) -> ServiceResult<Vec<SipDispatchRuleInfo>>
pub async fn delete_sip_dispatch_rule( &self, sip_dispatch_rule_id: &str, ) -> ServiceResult<SipDispatchRuleInfo>
pub async fn create_sip_participant( &self, sip_trunk_id: String, call_to: String, room_name: String, options: CreateSIPParticipantOptions, outbound_trunk_config: Option<SipOutboundConfig>, ) -> ServiceResult<SipParticipantInfo>
Sourcepub async fn transfer_sip_participant(
&self,
room_name: String,
participant_identity: String,
transfer_to: String,
options: TransferSIPParticipantOptions,
) -> ServiceResult<()>
pub async fn transfer_sip_participant( &self, room_name: String, participant_identity: String, transfer_to: String, options: TransferSIPParticipantOptions, ) -> ServiceResult<()>
Transfers a SIP participant to another number via a SIP REFER. This always dials the transfer destination and blocks until it answers or fails, so the request must outlast the ring window.