Route inbound calls to LiveKit
Send inbound PSTN calls to LiveKit with SWML connect
Send inbound PSTN calls to LiveKit with SWML connect
In this guide, we will deploy a
SWML
script that routes inbound calls from SignalWire to the LiveKit platform.
The script uses the SWML connect method
to dial a LiveKit SIP address.
Before getting started, you’ll need the following:
To create a SWML script, navigate to the Resources tab in your SignalWire Dashboard, click + Add New, and select SWML Script.
Be sure to replace your-unique-SIP-domain-from-Livekit.com with the SIP domain from your LiveKit settings
(for example, 241ozqza.sip.livekit.cloud).
Find this domain under LiveKit Settings labeled as SIP URI.
When your SignalWire phone number receives an inbound call, it needs to know how to handle it. In this step, we will assign the intended SignalWire phone number to the new SWML script Resource as an Address.
This ensures that incoming calls to the designated SignalWire phone number follow the routing path defined in the SWML script.
Next, we will configure a SIP trunk in LiveKit to handle calls routed from SignalWire. Follow the official LiveKit SIP trunk inbound guide for further information.
After completing this setup, you can use LiveKit’s dispatch rules to determine how incoming calls should be handled. Consult LiveKit’s Dispatch Rules Guide for guidance on managing call routing.
You’re all set to start handling inbound calls with LiveKit and SignalWire. If you need further assistance, consult the LiveKit documentation or reach out to SignalWire support.
To record inbound calls, add the record_call method to your existing inbound SWML script:
These recordings can be accessed in the Dashboard in Storage > Recordings, or using the Recordings List API endpoint.
Access call logs in the Logs tab of your SignalWire Dashboard.