You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
Copy file name to clipboardExpand all lines: fern/advanced/sip/troubleshoot-sip-trunk-credential-errors.mdx
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,15 +36,18 @@ This is the most common cause of this error.
36
36
37
37
### What happens
38
38
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.
40
40
41
41
### How to check
42
42
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.
44
47
45
48
### How to fix
46
49
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.
48
51
49
52
<Steps>
50
53
<Steptitle="Look up the IP address">
@@ -76,7 +79,7 @@ Replace the hostname with the numeric IPv4 address in your gateway configuration
76
79
"ip": "203.0.113.10",
77
80
"port": 5060,
78
81
"outboundEnabled": true,
79
-
"inboundEnabled": false
82
+
"inboundEnabled": true
80
83
}
81
84
]
82
85
}
@@ -86,8 +89,9 @@ Replace the hostname with the numeric IPv4 address in your gateway configuration
86
89
</Steps>
87
90
88
91
<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.
91
95
</Note>
92
96
93
97
## 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
|`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`).|
161
165
|`port`| number |`5060`| SIP signaling port. |
162
166
|`netmask`| number |`32`| Subnet mask for inbound IP matching. Valid range: 24 to 32. |
163
167
|`inboundEnabled`| boolean |`true`| Whether this gateway accepts inbound calls. Set to `false` for outbound-only trunks. |
0 commit comments