Cancels every timer and drops tracked state (server shutdown).
Handles one LiveKit webhook event. A new SIP participant in a room under the call prefix is an inbound call: it is routed to an agent by the dialed number and admitted, or hung up. Anything else is ignored. Never throws.
Removes one participant (the caller of a refused or completed call). Best-effort.
Removes every phone (SIP) participant from the room. Best-effort.
Startup work that talks to LiveKit: checks the carrier settings, verifies the outbound trunk, and (when
autoProvision is set) creates the inbound trunk and dispatch rule. Never throws: a LiveKit that is down at boot must
not stop the server, and every problem is logged where an operator will read it.
Places an OUTBOUND call from an agent identity to a number, after the shared outbound gate (agent permission, destination policy, rate limit, capacity) has authorized it. The agent joins a new room, then the room dials the number.
The room the call is in.
Hangs up a new inbound phone call that cannot be admitted at all (no run-as user). A repeat event for the same room is ignored.
Sets or unsets the custom inbound call handler.
Admits and places phone calls over LiveKit SIP. One instance per server.