Skip to main content

Prerequisites

The following are required to complete the steps in this guide:

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.

  1. Sign in to your didlogic account .

  2. Navigate to NumbersPurchased.

  3. Select Edit on the phone number you are integrating with LiveKit.

  4. For Forward to, select SIP URI.

  5. Enter the destination in the following format: +[number]@[LiveKit SIP endpoint];transport=tcp, for example: +15105550100@vjnxecm0tjk.sip.livekit.cloud;transport=tcp.

    SIP endpoint format

    Use the host portion of your LiveKit SIP URI, excluding the sip: prefix.

  6. 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:

  1. Sign in to LiveKit Cloud .
  2. Select TelephonySIP trunks .
  3. Select the + Create new trunk button.
  4. For Trunk direction, select Inbound.
  5. 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.
  6. 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:

  1. Navigate to the TelephonyDispatch rules  page.
  2. Select the + Create new dispatch rule button.
  3. Complete the Rule name and Room name fields.
  4. Select Match trunks and select the inbound trunk you created in the previous step.
Additional options

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:

  1. Sign in to LiveKit Cloud .
  2. Select TelephonySIP trunks .
  3. Select the + Create new trunk button.
  4. For Trunk direction, select Outbound.
  5. 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.
  6. Select Create.
Choose the nearest gateway

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.

IssueCauseSolution
Call fails immediatelyInvalid 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 callsIncorrect 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 responseThis 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.