SIP outbound trunk

How to create and configure a outbound trunk to make outgoing calls.

To provision an outbound trunk with the SIP Service, use the CreateSIPOutboundTrunk API. It returns an SIPOutboundTrunkInfo object that describes the created SIP trunk. These parameters can also be queried at any time using the ListSIPOutboundTrunk API.

SIP outbound trunk with username and password authentication

The following creates a SIP outbound trunk with username and password authentication. It will make outbound calls from number +15105550100.

  1. Create a file named outbound-trunk.json using your phone number, trunk domain name, and username and password:

    {
    "trunk": {
    "name": "My outbound trunk",
    "address": "<my-trunk>.pstn.twilio.com",
    "numbers": ["+15105550100"],
    "auth_username": "<username>",
    "auth_password": "<password>"
    }
    }
  2. Create the outbound trunk using the CLI:

    lk sip outbound create outbound-trunk.json

    The output of the command returns the trunk ID. Copy it for the next step:

    SIPTrunkID: <your-trunk-id>

IP address range for LiveKit Cloud SIP

LiveKit Cloud nodes do not have a static IP address range, thus there's no way currently to use IP range for outbound authentication.

Thus, prefer setting user/password authentication on SIP trunk Provider.

If it's unavailable, or IP range is required in addition to user/password, set range(s) that include all IPs: e.g. 0.0.0.0/0 or 0.0.0.0/1+128.0.0.0/1.