Skip to content

Commit 2e71cab

Browse files
sahilsuman933claude
andcommitted
fix: clarify hostname vs IP requirements for SIP trunk gateways
Hostnames are supported for outbound-only SIP gateways but NOT for inbound-enabled gateways. The previous docs incorrectly implied hostnames never work. Updated the troubleshooting guide and gateway config reference to accurately describe when hostnames are accepted. VAP-12899 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e3cff1b commit 2e71cab

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

fern/advanced/sip/troubleshoot-sip-trunk-credential-errors.mdx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,18 @@ This is the most common cause of this error.
3636

3737
### What happens
3838

39-
Vapi's API accepts both hostnames (for example, `sip.example.com`) and IPv4 addresses (for example, `203.0.113.10`) in the `gateways[].ip` field. However, the underlying SBC only accepts IPv4 addresses. When you provide a hostname, the SBC rejects the gateway configuration.
39+
Vapi's API accepts both hostnames (for example, `sip.example.com`) and IPv4 addresses (for example, `203.0.113.10`) in the `gateways[].ip` field. However, **hostnames only work for outbound-only gateways**. For inbound-enabled gateways, the SBC requires a numeric IPv4 address to match the origin of incoming SIP requests. When you provide a hostname for an inbound-enabled gateway, the SBC rejects the gateway configuration.
4040

4141
### How to check
4242

43-
Look at the value you passed in `gateways[].ip`. If it contains letters (for example, `sip.example.com`), it is a hostname. The SBC needs a numeric IPv4 address instead.
43+
Look at the value you passed in `gateways[].ip` and the `inboundEnabled` setting:
44+
45+
- If `inboundEnabled` is `true` (the default) and `gateways[].ip` contains a hostname (for example, `sip.example.com`), this is the problem. Inbound gateways require a numeric IPv4 address.
46+
- If `inboundEnabled` is `false` (outbound-only), hostnames are accepted and this is not the cause of your error.
4447

4548
### How to fix
4649

47-
Resolve the hostname to its IPv4 address, then use that IP directly.
50+
If your gateway has inbound enabled, resolve the hostname to its IPv4 address, then use that IP directly.
4851

4952
<Steps>
5053
<Step title="Look up the IP address">
@@ -76,7 +79,7 @@ Replace the hostname with the numeric IPv4 address in your gateway configuration
7679
"ip": "203.0.113.10",
7780
"port": 5060,
7881
"outboundEnabled": true,
79-
"inboundEnabled": false
82+
"inboundEnabled": true
8083
}
8184
]
8285
}
@@ -86,8 +89,9 @@ Replace the hostname with the numeric IPv4 address in your gateway configuration
8689
</Steps>
8790

8891
<Note>
89-
Always use the IPv4 address, not the hostname. If your provider's IP changes,
90-
you need to update the gateway configuration.
92+
Hostnames are supported for outbound-only gateways (`inboundEnabled: false`).
93+
For inbound-enabled gateways, always use a numeric IPv4 address. If your
94+
provider's IP changes, you need to update the gateway configuration.
9195
</Note>
9296

9397
## Inbound enabled on an outbound-only trunk
@@ -157,7 +161,7 @@ The table below lists all available options for each entry in the `gateways` arr
157161

158162
| Option | Type | Default | Description |
159163
| -------------------- | ------- | --------- | ------------------------------------------------------------------------------ |
160-
| `ip` | string | (required)| IPv4 address of your SIP gateway. Must be a numeric IP address, not a hostname.|
164+
| `ip` | string | (required)| Server address of your SIP gateway. Use a numeric IPv4 address for inbound-enabled gateways. Hostnames are accepted for outbound-only gateways (`inboundEnabled: false`).|
161165
| `port` | number | `5060` | SIP signaling port. |
162166
| `netmask` | number | `32` | Subnet mask for inbound IP matching. Valid range: 24 to 32. |
163167
| `inboundEnabled` | boolean | `true` | Whether this gateway accepts inbound calls. Set to `false` for outbound-only trunks. |

0 commit comments

Comments
 (0)