Appearance
LiveKit Inbound
Route inbound PSTN calls from SignalWire to LiveKit via SWML connect.
How It Works
- A caller dials a SignalWire phone number
- SignalWire executes the assigned SWML script
- The
connectverb bridges the call to LiveKit's SIP domain - LiveKit handles the call with its AI pipeline
SWML Script
yaml
version: 1.0.0
sections:
main:
- connect:
to: sip:%{call.to}@your-unique-SIP-domain-from-Livekit.com;transport=tcpReplace your-unique-SIP-domain-from-Livekit.com with the SIP domain provided by LiveKit.
Setup Steps
1. Create the SWML Script
In your SignalWire Dashboard, create a new SWML script using the configuration above.
2. Assign Phone Number
In the SignalWire Dashboard, assign the SWML script to the phone number that will receive inbound calls.
3. Configure LiveKit SIP Trunk
In LiveKit:
- Create an inbound SIP trunk
- Add your SignalWire phone number(s) in E.164 format (e.g.,
+14155551234) - Save the trunk configuration
Optional: Add Call Recording
Prepend a record_call section to capture recordings:
yaml
version: 1.0.0
sections:
main:
- record_call:
stereo: true
format: mp3
- connect:
to: sip:%{call.to}@your-unique-SIP-domain-from-Livekit.com;transport=tcpRecordings appear in the Logs tab of your SignalWire Dashboard.
Troubleshooting
- Verify the SIP domain is correct in your LiveKit account settings
- Ensure the phone number is in E.164 format in LiveKit's trunk configuration
- Check the SignalWire Dashboard Logs tab for SWML execution details
