The LiveKit SIP outbound transport handles outbound calls initiated by VoxBridge. VoxCore creates a LiveKit room, dials out via a SIP trunk, and runs the pipeline when the callee answers.

Connection flow

Endpoint

POST /livekit/dialout
Requires X-VoxCore-Secret header for authentication.

Request body

{
  "bot_id": "bot-uuid",
  "to_number": "+919876543210",
  "from_number": "+911234567890",
  "connected_event": {"campaign_id": "abc"}
}
FieldTypeRequiredDescription
bot_idstringYesBot configuration to use
to_numberstringYesNumber to dial
from_numberstringNoCaller ID. If omitted, VoxBridge selects a trunk.
connected_eventobjectNoArbitrary metadata forwarded to VoxBridge during config fetch

Response

{
  "status": "accepted",
  "call_id": "uuid-string",
  "room_name": "dialout-uuid-string"
}

Audio format

Same as LiveKit SIP inbound: 16kHz mono LINEAR16 via LiveKit SDK.

Dial-out behavior

VoxCore calls lkapi.sip.create_sip_participant() with a 45-second ringing timeout and wait_until_answered=True. The pipeline’s opening message only plays after the callee picks up.

SIP failure codes

SIP codeMeaningdisconnected_by
408Request timeoutno_answer
480Temporarily unavailableno_answer
486Busy hererejected
603Declinerejected
OtherUnexpected errorerror

Trunk selection

VoxCore resolves the outbound SIP trunk by calling VoxBridge:
GET {voxbridge_url}/sip/outbound-trunk?from_number={from_number}
Returns {"trunk_id": "...", "number": "..."}. If from_number is omitted, VoxBridge selects an available trunk.

Prerequisites

  • LiveKit server with outbound SIP trunks configured
  • Outbound trunk registered in VoxBridge
  • Environment variables: LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET