Livekitex.SIPService (livekitex v0.1.34)

High-level SIP wrapper over LiveKit's SIP Twirp API.

Provides helpers to manage trunks, dispatch rules, and participants using JSON Twirp endpoints over HTTP(S) with Tesla/Finch, and token grants.

Summary

Types

t()

@type t() :: %Livekitex.SIPService{
  api_key: String.t(),
  api_secret: String.t(),
  base_url: String.t(),
  client: Tesla.Client.t() | nil
}

Functions

create(api_key, api_secret, opts \\ [])

Create a new SIPService configured for a LiveKit server.

Options:

  • :host - e.g. "test-abc.livekit.cloud"
  • :port - integer port; default 443 for https
  • :scheme - "https" or "http"; default "https"
  • :base_url - override full base URL, e.g. "https://host:443"

create_dispatch_rule(svc, rule \\ %{})

create_inbound_trunk(svc, trunk \\ %{})

create_outbound_trunk(svc, trunk \\ %{})

create_participant(svc, req)

delete_dispatch_rule(svc, rule_id)

delete_trunk(svc, trunk_id)

get_inbound_trunk(svc, trunk_id)

get_outbound_trunk(svc, trunk_id)

list_dispatch_rules(svc, opts \\ %{})

list_inbound_trunks(svc, opts \\ %{})

list_outbound_trunks(svc, opts \\ %{})

transfer_participant(svc, req)

update_dispatch_rule(svc, rule_id, action)

update_inbound_trunk(svc, trunk_id, action)

update_outbound_trunk(svc, trunk_id, action)