Logo
Search
API Docs

SIP Trunk Troubleshooting

Telephony Infrastructure & Limits

SIP Trunk Troubleshooting: Gateway Errors & Response Codes

Overview

This page is the troubleshooting companion to the SIP Trunking (BYO SIP Trunk Integration) setup page. Where that page covers how to configure a SIP trunk credential and register a number against it, this page covers what to check when inbound or outbound calls over that trunk aren't working — common gateway misconfigurations, the full gateway field reference, and how to read SIP response codes returned during call setup.


Hostname vs. IP Mismatch on Inbound Gateways

One of the most common BYO SIP trunk failures is using a hostname instead of a numeric IP address for an inbound gateway. Hostnames are only supported for outbound gateways. For inbound traffic, the gateway's ip field must be a numeric IPv4 address so the system can match incoming SIP requests against it — a hostname cannot be resolved and matched the same way at the point an inbound call arrives.

If your gateway configuration used a hostname (e.g. sip.yourprovider.com) and inbound calls are failing or being rejected, switch the ip field to your provider's numeric IPv4 address and confirm it matches what your carrier actually sends from.


The inboundEnabled Default & Outbound-Only Trunks

The inboundEnabled field on a gateway defaults to true. If you're setting up a trunk that should only be used for outbound calls, leaving this at its default can cause unexpected inbound call attempts to be routed to a gateway that isn't set up to properly validate or handle them, which can surface as authentication or routing failures.

For an outbound-only trunk, explicitly set inboundEnabled: false on the gateway:

{
  "ip": "YOUR_PROVIDER_IP",
  "inboundEnabled": false,
  "outboundEnabled": true
}

Don't assume a gateway is outbound-only just because you only configured outbound routing elsewhere — check this field explicitly on every gateway in the trunk.


Carrier IP Allowlist Requirements

Before calls will flow, your carrier needs to allowlist the platform's signaling IP addresses for your region. Missing any of these IPs will prevent proper whitelisting and typically shows up as a 401 Unauthorized on inbound calls.

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

Provide all signaling IP addresses for your region when allowlisting — a partial allowlist is a common source of intermittent inbound failures.


Gateway Configuration Field Reference

Each entry in a SIP trunk credential's gateways array supports the following fields:

FieldTypeDefaultDescription
ipstringrequiredIPv4 address or hostname. Hostnames only work for outbound gateways — inbound requires a numeric IP.
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.

SIP Response Code Troubleshooting

Before diving into a specific code, gather context from your dashboard under Observe > Logs > Calls: the call ID, timestamp, call direction, the endedReason field, and which system in the path actually returned the response (the platform, your provider, or a downstream carrier). The same code can have different causes depending on which system returned it.

CodeMeaningWhat to Check
401 UnauthorizedAuthentication is being requested — often a normal digest-auth challengeSIP username/password, authentication realm, and whether an authenticated request followed the challenge
403 ForbiddenRequest understood but refused — an authorization/policy rejection, not just a missing credentialCredentials, caller ID and destination permissions, geographic restrictions, trunk/account limits; for outbound, confirm your provider allows the signaling IPs above; for inbound, confirm the provider's source IPs match your configured gateways
407 Proxy Authentication RequiredA SIP proxy (not the destination) is requesting authenticationTrunk username/password, authentication realm, proxy configuration, and whether an authenticated request followed
408 Request TimeoutThe responding server didn't reply in timeDNS resolution, firewall rules, signaling ports, transport protocol (UDP/TCP/TLS), and endpoint availability
503 Service UnavailableServer temporarily unavailable — providers also use this for routing failures or call limits, not just outagesProvider status pages, account/trunk capacity and limits, any Retry-After header, and whether an alternate route or failover is available

Note: a 4xx response does not necessarily mean your request was invalid — providers use 4xx codes for account restrictions, routing rules, and destination state as well. Don't retry blindly on a 403 without identifying the specific restriction first.

If the issue persists, gather the call ID, timestamp with timezone, call direction, exact SIP response code and reason phrase, and a redacted signaling trace before contacting your carrier or support — never include SIP passwords or API keys in logs you share.