LiveKit Cloud
LiveKit Cloud supplies the media (SIP bridge + WebRTC) in v1. A self-hosted SFU is a later milestone.
1. Project + keys
- Sign up at cloud.livekit.io.
- Create a project.
- From Settings → Keys, copy these values into
.env:LIVEKIT_URL—wss://<project>-<region>.livekit.cloudLIVEKIT_API_KEYLIVEKIT_API_SECRET
2. SIP outbound trunk
First create the Twilio trunk and credentials in the Twilio guide. Then, in LiveKit Cloud:
- Open Telephony → SIP trunks → Create new trunk.
- Select Outbound and use the Twilio termination domain
(
<name>.pstn.twilio.com) as the address. - Add the Twilio number in E.164 format and enter the same username/password configured on the Twilio trunk.
- Create the trunk and copy its ID into
.envasLIVEKIT_SIP_OUTBOUND_TRUNK_ID.
Hail passes this ID to LiveKit for every outbound call. It does not read a Twilio trunk-domain environment variable. See LiveKit's outbound trunk reference for the current UI and JSON forms.
LIVEKIT_SIP_INBOUND_TRUNK_ID is reserved for a future inbound-calling
release and can remain empty today.
3. Voicebot worker
With the local Compose overlay, run:
docker compose -f docker-compose.yml -f docker-compose.local.yml up -d voicebotAt startup, the worker registers with LiveKit as a dispatchable agent. The Hail API dispatches it into a room for each call.
For the full flow, refer to Architecture.
VM deployment
Self-host Hail on one Ubuntu VM behind HTTPS. GitHub Actions deploys every commit on main. The database is managed (Neon, Supabase, RDS, or your choice). The VM runs only the stateless services.
Twilio
You need a Twilio account, a phone number, and a SIP trunk that bridges to LiveKit Cloud.