This guide will help you set up outbound SIP calls using LiveKit and SignalWire. Follow these steps to configure your SIP domain, SWML script, and LiveKit settings efficiently.
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 "+1XXXXXXXXXX" with a phone number from your SignalWire account.
Example SIP domain: test-space-live-kit.dapp.signalwire.com.
Now, let’s configure LiveKit for outbound SIP calling. Follow along with LiveKit’s documentation for outbound SIP trunk setup.
Use the following JSON configuration for creating an outbound SIP trunk, ensuring you update the given fields:
Update placeholders in the above JSON with the following:
Submit this request and save the generated Trunk ID.
If you forget to save the Trunk ID, use LiveKit’s CLI tool to retrieve the trunk configurations.
To initiate outbound calls through your configured trunk, you’ll need to create a SIP participant in LiveKit. This process establishes the connection and manages the call flow. For detailed instructions on creating SIP participants and handling outbound calls, refer to LiveKit’s comprehensive guide to Creating a SIP Participant.
If you’re working with LiveKit AI agents for outbound calls, please see the LiveKit AI Agent Telephony Guide.
You’re now ready to make your first outbound SIP call using LiveKit and SignalWire. If you encounter any issues, verify the configurations for both SignalWire and LiveKit.
Record calls by creating a SWML script with recording logic and slightly modifying your outbound 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.