Prerequisites
The following are required to complete the steps in this guide:
- A didlogic account .
- A purchased phone number from didlogic.
- A SIP account in didlogic.
- A project on LiveKit Cloud .
Accepting inbound calls
Complete the following steps to accept inbound calls with didlogic and LiveKit.
Step 1: Configure inbound call routing in didlogic
To receive calls with didlogic and LiveKit, configure your didlogic number to route calls to the LiveKit SIP gateway.
For this step, use your LiveKit SIP endpoint. This is your LiveKit SIP URI without the sip: prefix. You can find your SIP URI on the Project settings page.
Sign in to your didlogic account .
Navigate to Numbers → Purchased.
Select Edit on the phone number you are integrating with LiveKit.
For Forward to, select SIP URI.
Enter the destination in the following format:
+[number]@[LiveKit SIP endpoint];transport=tcp, for example:+15105550100@vjnxecm0tjk.sip.livekit.cloud;transport=tcp.SIP endpoint formatUse the host portion of your LiveKit SIP URI, excluding the
sip:prefix.Select Add. If multiple destinations are configured, make sure the LiveKit destination is at the top of the list.
Step 2: Create an inbound trunk in LiveKit
An inbound trunk allows you to accept incoming phone calls to your didlogic phone number. To create an inbound trunk in LiveKit, use the following steps:
- Sign in to LiveKit Cloud .
- Select Telephony → SIP trunks .
- Select the + Create new trunk button.
- For Trunk direction, select Inbound.
- Complete the following fields:
- Trunk name: Enter a descriptive name for your trunk.
- Numbers: Enter your didlogic phone number in E.164 format, or enter
*(wildcard) to allow the trunk to handle calls from any assigned number. - Media encryption (SRTP): Configure based on your security requirements.
- Include headers: Optionally attach SIP headers to participant attributes.
- Select Create.
Step 3: Create a dispatch rule in LiveKit
In addition to an inbound trunk, you need a dispatch rule to determine how callers are dispatched to LiveKit rooms.
Create a dispatch rule using the following steps:
- Navigate to the Telephony → Dispatch rules page.
- Select the + Create new dispatch rule button.
- Complete the Rule name and Room name fields.
- Select Match trunks and select the inbound trunk you created in the previous step.
Selecting trunks to match a dispatch rule is optional. By default, a dispatch rule applies to all inbound calls for your LiveKit project.
For more information on Rule type, see SIP dispatch rule.
Test inbound calls
After you complete the setup steps, start a voice AI agent and call your didlogic phone number. Your agent should answer the call. If you don't have an agent, see the Voice AI quickstart to create one.
Making outbound calls
Complete the following steps to make outbound calls using LiveKit and didlogic.
Step 1: Create an outbound trunk in LiveKit
To allow LiveKit to initiate outbound calls through the didlogic network, create an outbound trunk in LiveKit using your didlogic SIP credentials:
- Sign in to LiveKit Cloud .
- Select Telephony → SIP trunks .
- Select the + Create new trunk button.
- For Trunk direction, select Outbound.
- Configure the outbound trunk with the following settings:
- Address: Enter a didlogic SIP gateway (e.g.,
sip.nl.didlogic.net). - Numbers: Enter your purchased didlogic phone number in E.164 format.
- Select Optional settings and complete the following fields:
- Username: Your 5-digit SIP login from didlogic.
- Password: Your SIP account password.
- Address: Enter a didlogic SIP gateway (e.g.,
- Select Create.
Choose the didlogic SIP gateway closest to your region for optimal performance. Use the domain instead of the IP address, as the IP can change dynamically.
Place an outbound call
Test your configuration by placing an outbound call with LiveKit using the CreateSIPParticipant API. To learn more, see Creating a SIP participant.
Troubleshooting
The following table lists common issues when integrating didlogic with LiveKit.
| Issue | Cause | Solution |
|---|---|---|
| Call fails immediately | Invalid phone number formatting or destination setup. | Ensure the number is formatted in full E.164 format (e.g., +15105550100). Verify that the didlogic forwarding SIP URI destination is set as the top priority. |
| Unauthorized on outbound calls | Incorrect SIP credentials. | Verify that you are using your 5-digit SIP login (not your account login email) and the correct SIP password in the LiveKit outbound trunk settings. |
| 603 Declined response | This might occur when calling a destination with a per-minute rate higher than the max call rate set for your account. | Contact didlogic support to request a change to your max call rate. |
For additional help, check the call logs in your LiveKit Cloud dashboard or contact didlogic support .
Next steps
The following guides provide next steps for building your LiveKit telephony app.
Voice AI quickstart
A quickstart guide to build a voice AI agent to answer incoming calls.