Logo
Search
API Docs

SIP Trunking

Telephony Infrastructure & Limits

BYO SIP Trunk Integration: Setup and Configuration

Overview

Sulus supports Bring Your Own (BYO) SIP trunk integration, allowing you to connect any SIP carrier to Sulus for both inbound and outbound calls. Here's a comprehensive overview of how it works and how to set it up.


What is BYO SIP Trunking?

SIP trunking replaces traditional phone lines with a virtual connection over the internet, connecting your internal PBX or VoIP system to a SIP provider, which then routes calls to the Public Switched Telephone Network (PSTN). With Sulus's Custom "BYO" SIP Trunk option, you can integrate any SIP provider by supplying the SIP gateway address and authentication details.


Network Requirements

Before setting up, allowlist Sulus's static IP addresses at your SIP provider based on your region:

RegionSIP HostSignaling IP AddressesRTP Media
USsip.sulus.ai44.229.228.186/32, 44.238.177.138/32Dynamic IPs; UDP ports 4000060000
EUsip.eu.sulus.ai63.182.83.170/32Static IP 63.182.83.170; UDP ports 4000060000

Important: If your organization is hosted in the EU, use https://api.eu.sulus.ai for all API calls and pair it with sip.eu.sulus.ai.


Setup Process

Step 1 — Create a SIP Trunk Credential

Use the Sulus API to register your SIP provider as a byo-sip-trunk credential:

curl -X POST "https://api.sulus.ai/credential" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_SULUS_API_KEY" \
  -d '{
    "provider": "byo-sip-trunk",
    "name": "My SIP Trunk",
    "gateways": [{
      "ip": "sip.yourprovider.com",
      "inboundEnabled": false,
      "outboundEnabled": true
    }],
    "outboundLeadingPlusEnabled": true,
    "outboundAuthenticationPlan": {
      "authUsername": "YOUR_SIP_USERNAME",
      "authPassword": "YOUR_SIP_PASSWORD"
    }
  }'

Save the returned Credential ID for the next step.

Step 2 — Associate a Phone Number (DID)

Link your external phone number to the SIP trunk credential:

curl -X POST "https://api.sulus.ai/phone-number" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_SULUS_API_KEY" \
  -d '{
    "provider": "byo-phone-number",
    "name": "My BYO Number",
    "number": "15551234567",
    "numberE164CheckEnabled": false,
    "credentialId": "YOUR_CREDENTIAL_ID"
  }'

Step 3 — Make Outbound Calls

Once the number is registered, initiate outbound calls via the API:

curl -X POST "https://api.sulus.ai/call/phone" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_SULUS_API_KEY" \
  -d '{
    "assistantId": "YOUR_ASSISTANT_ID",
    "customer": {
      "number": "15557654321",
      "numberE164CheckEnabled": false
    },
    "phoneNumberId": "YOUR_PHONE_NUMBER_ID"
  }'

Step 4 — Configure Inbound Calls

For inbound routing, configure your SIP provider to forward calls to the Sulus SIP URI:

  • US: {phoneNumber}@<credential_id>.sip.sulus.ai
  • EU: {phoneNumber}@<credential_id>.sip.eu.sulus.ai

Ensure you provide all signaling IP addresses when creating the SIP trunk. Missing IPs will prevent proper whitelisting and may result in 401 Unauthorized errors for inbound calls.


Gateway Configuration Reference

Each entry in the gateways array supports the following options:

OptionTypeDefaultDescription
ipstringrequiredIPv4 address or hostname. Hostnames only work for outbound gateways.
portnumber5060SIP signaling port.
netmasknumber32Subnet mask for inbound IP matching (valid range: 24–32).
inboundEnabledbooleantrueWhether this gateway accepts inbound calls.
outboundEnabledbooleantrueWhether outbound calls route through this gateway.
outboundProtocolstring"udp"Signaling protocol: udp, tcp, tls, or tls/srtp.
optionsPingEnabledbooleanfalseSend SIP OPTIONS pings to check gateway reachability.

Key Considerations

  • Inbound gateways require numeric IPv4 addresses — hostnames are not supported for inbound traffic. The SBC needs a numeric IP to match incoming SIP requests.
  • IP-based authentication is generally not recommended for shared SIP providers, as it can cause routing issues across multiple customers.
  • SIP REFER (call transfer) is supported. Use a transferCall tool with a sip destination type, e.g., sip:[email protected].

Supported Providers

Sulus natively documents integrations with several providers, but any SIP carrier can be used via the BYO trunk:

  • Plivo — unique SIP domain, IP-based auth
  • Telnyx — SIP gateway domain with IP-based auth
  • Zadarma — username/password credentials
  • Custom BYO — any provider with a SIP gateway address

In summary, Sulus's BYO SIP trunk feature gives you full flexibility to bring your own carrier, configure inbound and outbound routing, and integrate with any SIP-compatible telephony provider using standard credentials and gateway configuration.