Prerequisites
The following are required to complete the steps in this guide:
- A Vobiz account with an active balance.
- A purchased phone number (DID) from Vobiz.
- A LiveKit Cloud project .
Create and configure an inbound SIP trunk
Complete the following steps to create and configure your SIP trunk:
Sign in to the Vobiz Console .
Select SIP Trunk → Inbound Trunks → Origination URIs → + Add.
Complete the following fields:
- Name: A descriptive name for the URI.
- URI: Your LiveKit SIP endpoint with port
5060. This is your LiveKit SIP URI without thesip:prefix, for example:vjnxecm0tjk.sip.livekit.cloud:5060. - Transport:
UDP.
Secure trunkingIf you're setting up secure trunking, use port
5061and transportTLSinstead. You also need to configure themedia.encryptionsetting on your LiveKit SIP trunk.Select Create URI.
Select Inbound Trunks → Trunks → Create Trunk.
Complete the following fields:
- Trunk Name: A descriptive name for the trunk.
- Primary URI: The origination URI you created in the previous steps.
- Secure Trunking (SRTP): Turn on to use secure trunking.
Select Create Trunk.
Calls to and from Indian phone numbers must stay in India to comply with local telephony regulations. To keep these calls in India, set up region pinning for telephony.
Assign a number to the inbound SIP trunk
Assign a phone number to the trunk by completing the following steps:
- From the Vobiz Console , select SIP Trunk → Inbound Trunks → Trunks, and select the trunk you created in the previous step.
- Under Linked Numbers, select Link Numbers.
- Select your phone number and confirm with Link selected number. If the number is attached to a voice app, detach it first.
Create and configure an outbound SIP trunk
Create a Vobiz outbound trunk for outgoing calls, using the following steps:
Sign in to the Vobiz Console .
Select SIP Trunk → Outbound Trunks → Trunks → Create Trunk.
In the Trunk Name field, enter a name for your trunk.
Under Authentication & Linking, select Create New Credential and complete the following fields:
- Username: Use only letters, numbers, underscores, and hyphens.
- Password: Create a password that complies with the restrictions shown.
You need these values to configure the credentials for your outbound LiveKit SIP trunk. Vobiz doesn't display the password again after you create the credentials.
Under Credentials List, select the credential you created in the previous step. Leave IP Access Control List empty.
Select Create Trunk.
Copy the SIP Domain of the trunk, for example:
39a32383.sip.vobiz.ai, and use this as theaddressof your outbound LiveKit SIP trunk. Each Vobiz outbound trunk has its own SIP Domain, so use the full address, notsip.vobiz.ai.
If you're setting up secure trunking, you don't need to change anything in the Vobiz Console. On your LiveKit outbound trunk, set the transport field to SIP_TRANSPORT_TLS and configure media.encryption.
Calls to and from Indian phone numbers must stay in India to comply with local telephony regulations. To keep these calls in India, set up region pinning for telephony.
LiveKit setup
Finish connecting your inbound and outbound SIP trunks to LiveKit using the main setup documentation.
SIP trunk setup
Configure your Vobiz trunks in LiveKit.
Troubleshooting
If calls fail to connect, check the following common issues.
- Vobiz supports the G.711 codecs, PCMA and PCMU.
- The URI of your Vobiz origination URI should be a hostname and port only, without a
sip:prefix. - The address specified in your outbound LiveKit SIP trunk should be a hostname only, without a
sip:prefix, port, or;transport=parameter.
| Issue | Cause |
|---|---|
| 404 response to an inbound call | No inbound trunk or dispatch rule matched the call. Check that the phone number is listed on the LiveKit inbound trunk in E.164 format, and that the dispatch rule matches the trunk. |
| Inbound call doesn't reach LiveKit | The phone number isn't linked to the Vobiz inbound trunk, or the origination URI isn't your LiveKit SIP endpoint. Check the Linked Numbers on the trunk and the URI and Transport on the origination URI. The Vobiz call log shows the hangup cause for each call. |
| Inbound call fails after about 10 seconds | You set up secure trunking, but the origination URI uses transport TLS with port 5060. Use port 5061 in the URI. |
| Inbound call rejected when your LiveKit trunk requires media encryption | Vobiz sent the call without media encryption, so a LiveKit inbound trunk with SIP_MEDIA_ENCRYPT_REQUIRE rejects it. Check that the origination URI uses transport TLS, and that Secure Trunking (SRTP) is on for the Vobiz inbound trunk. Over UDP or TCP, Vobiz sends inbound media without encryption. |
| 404 response to an outbound call | The address on your LiveKit outbound trunk isn't the SIP Domain of your Vobiz outbound trunk. |
| 407 followed by 401 response to an outbound call | Vobiz didn't accept the credentials. Check that the username and password on the LiveKit outbound trunk match the Vobiz credential. A single 407 response is the normal authentication challenge. |
| 403 response to an outbound call | The caller ID isn't a phone number on your Vobiz account, or the destination is in another country and international dialing isn't enabled on your Vobiz account. |
| 484 response to an outbound call | Wrong number format. Make sure you dial the full international number (E.164 format): for example, +19085550100 (US), +447700900123 (UK). Strip prefixes like 0, 00, or 011 before the dialed number. |
| Outbound call rejected after authentication | Your Vobiz account balance is too low, or the trunk is turned off. Check the trunk Status and your balance in the Vobiz Console. |
For additional troubleshooting help, see the SIP troubleshooting topic.
Next steps
The following guides provide next steps for building your telephony app.
Voice AI quickstart
A quickstart guide to build a voice AI agent to answer incoming calls.