Skip to main content

Create and configure a Vobiz SIP trunk

Step-by-step instructions for creating inbound and outbound SIP trunks using Vobiz.

On this page

Prerequisites

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

Create and configure an inbound SIP trunk

Complete the following steps to create and configure your SIP trunk:

  1. Sign in to the Vobiz Console .

  2. Select SIP Trunk → Inbound Trunks → Origination URIs → + Add.

  3. 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 the sip: prefix, for example: vjnxecm0tjk.sip.livekit.cloud:5060.
    • Transport: UDP.
    Secure trunking

    If you're setting up secure trunking, use port 5061 and transport TLS instead. You also need to configure the media.encryption setting on your LiveKit SIP trunk.

  4. Select Create URI.

  5. Select Inbound Trunks → Trunks → Create Trunk.

  6. 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.
  7. Select Create Trunk.

Phone numbers in India

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:

  1. From the Vobiz Console , select SIP Trunk → Inbound Trunks → Trunks, and select the trunk you created in the previous step.
  2. Under Linked Numbers, select Link Numbers.
  3. 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:

  1. Sign in to the Vobiz Console .

  2. Select SIP Trunk → Outbound Trunks → Trunks → Create Trunk.

  3. In the Trunk Name field, enter a name for your trunk.

  4. 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.

  5. Under Credentials List, select the credential you created in the previous step. Leave IP Access Control List empty.

  6. Select Create Trunk.

  7. Copy the SIP Domain of the trunk, for example: 39a32383.sip.vobiz.ai, and use this as the address of your outbound LiveKit SIP trunk. Each Vobiz outbound trunk has its own SIP Domain, so use the full address, not sip.vobiz.ai.

Secure trunking

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.

Phone numbers in India

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.
IssueCause
404 response to an inbound callNo 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 LiveKitThe 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 secondsYou 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 encryptionVobiz 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 callThe address on your LiveKit outbound trunk isn't the SIP Domain of your Vobiz outbound trunk.
407 followed by 401 response to an outbound callVobiz 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 callThe 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 callWrong 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 authenticationYour 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.