Trunk failover
Setting up trunk failover
If you have multiple SIP trunks for outbound calls, you can configure automatic failover so that if one trunk fails, the PBX will retry the call through the next available trunk. Setup involves two steps: enabling failover on each trunk, then adding multiple entries for the same dial plan pattern.
Step 1: Enable failover on each trunk
Go to Tenant → Trunks → SIP Trunks and open a trunk. Set the Failover behavior to one of the following options:
- On 408 error code — fail over only on a request timeout response
- On 5xx and 408 error codes — fail over on server errors and timeouts
- On all error codes — fail over on any error response
- Always, except for busy response — fail over on all failures except when the far end returns a busy signal
Also set the Request timeout value. This defines how many seconds the PBX will wait for the trunk to respond before triggering failover.
Repeat this for every trunk that should participate in failover.
Step 2: Configure the dial plan
Go to Tenant → Trunks → Dial Plans and add multiple entries for the same pattern, each pointing to a different trunk. Use the Pref (preference) field to control the order in which trunks are tried — lower values are tried first.
| Pref | Trunk | Pattern | Replacement |
|---|---|---|---|
| 10 | Trunk 1 | 123* | 123456 |
| 11 | Trunk 2 | 123* | 123456 |
When a call matches the pattern, the PBX will route it through Trunk 1. If that call fails and failover is triggered, the PBX will automatically retry through Trunk 2.