
LiveKit Setup Guide for DIDlogic
Introduction
This guide outlines the steps to configure your LiveKit for making and receiving phone calls using the DIDlogic trunk provider.
Purchase a number on the DIDlogic platform
Before placing or receiving a call, you need to have an active phone number on your DIDlogic account. If you already have one, you can skip this section.
To purchase a number:
- Log in to your DIDlogic account
- Click to BUY in the top menu
- Select the country and region where you wish to purchase a number
- Choose a specific number or numbers and click the Add to Cart button
- You will be redirected to the Cart where you can confirm your choice and check out the DID(s).
Once you have purchased the DID, it will be reflected in the PURCHASED tab.
Note
Some numbers may require proof of local address and other documents before they can be activated. To activate these numbers, upload the requested documents and wait for approval from the DIDlogic Provisioning team.
Configure the DIDlogic Digest SIP account
Create a SIP account on the DIDlogic platform
To create a new SIP trunk on the DIDlogic platform
- Navigate to the SIP tab in the top menu
- Click the Create SIP account button
- Specify the SIP account name, set the SIP account password, and select one of the DIDs on your account as the Caller ID
- You can optionally restrict access by specifying authorized IPs, maximum call length, channels, and maximum call cost. If these parameters are not configured, the global account limits will apply
- Click Create.
After the SIP account is successfully created, it will appear on the list of SIP trunks on your account.
Please be advised that your 5-digit SIP account username is generated automatically and displayed in the SIP user name column.
Configure outbound calls in LiveKit
For outbound calls, you need to create an outbound trunk in LiveKit using the DIDlogic SIP account credentials:
- Sign in to LiveKit Cloud.
- Select Telephony → Configuration
- Click the + Create New button located at the top-right corner of the page, and select Trunk.
- Configure the trunk details with the following settings:
Trunk direction: Select Outbound.
Address: Enter a DIDlogic regional gateway that is closest to your location. The list of regional gateways can be found under SIP Accounts in the SIP tab on the user portal.
Numbers: Enter the number purchased from DIDlogic.
Select Optional settings and complete the following fields:
Username: Your 5-digit SIP user name from DIDlogic.
Password: The SIP account password you set in DIDlogic.
Select Create.
- Click Create, and your new trunk will appear in the Outbound trunks section.
To create a LiveKit outbound trunk using the LiveKit CLI or code, visit https://docs.livekit.io/sip/trunk-outbound/
You’ve connected LiveKit with DIDlogic and now can place outbound calls. Check the LiveKit recipes for voice AI and LiveKit Agent use cases.
Typical problems with outbound calls
- 603 Declined response might be received when calling the destination with the per-minute rate higher than the Max call rate set for your account. You can find your effective Max call rate on the Trunks page. Please contact [email protected] to request a change to your Max call rate.
- The destination phone number is in an incorrect format. Please make sure the number is dialed in the international E.164 format. Strip prefixes like 0, 00, or 011 before the dialed number if needed.
Number Format
When making outbound calls through the DIDlogic trunk, all destination phone numbers must be in the E.164 international format. E.164 numbers can be up to fifteen digits long and are typically structured as: [+][country code][subscriber number with area code]. For example, a US number in E.164 format would be +18312011936. The DIDlogic platform will reject calls to numbers that do not include a country code or use national access codes.
Below are typical examples of phone numbers incorrectly formatted according to the E.164 international standard:
Receive calls with DIDlogic and LiveKit
Create LiveKit inbound trunk
To create an inbound trunk:
- Sign in to your LiveKit project
- Select Telephony → Configuration
- Click the + Create New button located at the top-right corner of the page, and select Trunk.
- On the trunk details page, select the Inbound Trunk Direction option and enter the following:
Trunk name – a custom name for the trunk (choose any name you prefer).
Numbers – a required field. You can set the parameter to any string (for example, *) to use the outbound trunk for calls from any number. This is useful if you want to use the same outbound trunk for all calls or if you want to use a different phone number for each call.
Media encryption (SRTP) – controls whether media is encrypted using the Secure Real-time Transport Protocol (SRTP).
Include headers – option to attach SIP headers to participant attributes.
- Click Create, and your new trunk will appear in the Inbound trunks section.
Create a Dispatch Rule in LiveKit using LiveKit CLI
Dispatch rules define how inbound calls are routed to LiveKit rooms. You can learn more about Dispatch rules on the LiveKit website.
To create a Dispatch rule, navigate to Telephony → Configuration, click +Create new, and select Dispatch rule.
By default, the rule applies to all inbound calls within your LiveKit project. You can also associate it with specific trunks in the Match trunks section.
To create a dispatch rule using the LiveKit CLI or code, visit https://docs.livekit.io/sip/dispatch-rule/
Configure Inbound Calls on DIDlogic
To route calls to your LiveKit AI platform, log in to your DIDlogic account and navigate to the PURCHASED tab in the top menu.
- Click Edit under the Destination section.
- Select the SIP URI and enter a valid SIP URI in the following format: +[did]@FQDN:port;transport=connection, where:
- FQDN is SIP URI of your LiveKit AI platform. You can find your SIP URI by navigating to the ‘Settings’ section and then selecting the ‘Project’ page, where it is displayed under the “SIP URI” field. We’ll use only the part after the colon to configure inbound call routing on DIDlogic.
-
- Port is the SIP port used by the LiveKit.
- A connection can be udp, tcp, or tls, with udp as the default transport.
- Click Add to set the destination for the DID.
All calls to your DIDlogic DID are now routed to your LiveKit AI project. To handle incoming calls, deploy a LiveKit agent. For guidance, refer to the LiveKit voice AI and agent recipe examples.
Media encryption is available for your DIDlogic numbers. To activate encryption on your DIDlogic numbers, please contact [email protected] and provide the list of numbers to be configured.
Free trial is available for IT infrastructure managers and developers.