Fail over and share incoming calls across your gateways
A SIP trunk's routing decides what happens to each incoming call: hunt a group of your gateways, reject the call, or forward it to a verified number. A hunt group is a list of gateways that Bird tries one after another until one answers. The group's order, priorities, weights and ring times decide which gateway rings first and what happens when it does not answer. This page shows how to set them up for failover and for load sharing.
Before you start
- A SIP trunk with inbound calling on and at least one gateway. Set up a SIP trunk covers both. When you add the first gateway to a trunk whose routing was never saved, the dashboard creates a group called All gateways with that gateway and points the default route at it.
- The gateways you want to combine, added in the trunk's Inbound routing > Gateways tab.
How a group hunts
Each incoming call starts a hunt. Bird orders the group's gateways for that call, rings the first, and moves to the next one when it fails:
- A gateway rings for its Ring time, from 1 to 120 seconds (30 by default). If nobody answers in that time, Bird moves on.
- A gateway that sends no reply at all is skipped after a short interval, so a gateway that is down does not hold the caller for its whole ring time.
- A gateway that refuses the call with a SIP failure code moves the hunt to the next gateway, unless that code is listed in the group's Stop the hunt on.
- The hunt ends when a gateway answers or when every gateway in the group has been tried.
Bird orders each call on its own and keeps no rotation between calls, so there is no round-robin. An even spread comes from random or weighted ordering over many calls.
| Order | How it orders the gateways for each call | Use it for |
|---|---|---|
| Sequential | The list order, top to bottom | A fixed primary and backups |
| Random | A fresh random order | Spreading calls evenly |
| Weighted | Lower Priority first. Within one priority, a random order where each gateway's chance to go first is its share of the weights | Failover and weighted sharing at once |
Set up failover
- Open Voice > SIP Trunks, open the trunk, and go to Inbound routing > Groups.
- Open the group your default route uses, or select Add group.
- Add your primary gateway and your backup with Add gateway to group.
- Set Order to Sequential and keep the primary at the top, using Move up and Move down. Alternatively, set Order to Weighted and give the primary Priority 1 and the backup Priority 2.
- Set each gateway's Ring time. A shorter ring time on the primary sends unanswered calls to the backup sooner.
- Select Review and save, then confirm.
Share calls between gateways
- Open the trunk's Inbound routing > Groups and open the group.
- Set Order to Weighted, give the gateways the same Priority, and set each one's Weight from 1 to 100. Weights of 70 and 30 send about 70% and 30% of calls to each gateway. For an even spread, use equal weights or set Order to Random.
- To keep a backup as well, give the sharing gateways Priority 1 and the backup Priority 2. The backup rings only when every priority 1 gateway has failed.
- Select Review and save, then confirm.
Stop the hunt on a busy signal
Bird tries the next gateway on every failure unless you change it. When a failure means another gateway will not help, list its code in the group's Stop the hunt on. For example, add 486 (Busy Here) so a person who is already on a call is not rung again through a second gateway. Any code from 400 to 699 can be entered.
Route different calls to different groups
A trunk can have several groups. The Default route sends calls that no rule matched to one group, and the rules in the Rules tab can send other calls to other groups. Deliver calls to a SIP trunk explains rules and the default route.
Troubleshooting
| What you see | What to check |
|---|---|
| The backup never rings | The backup is in the group the default route (or the matching rule) uses. With Weighted, its Priority number is higher than the primary's. A code in Stop the hunt on ends the hunt before the backup |
| One gateway takes every call with Weighted | Gateways at different priorities do not share calls. Give them the same Priority |
| Calls ring too long before reaching the backup | Lower the primary's Ring time |
| A gateway never rings | It sits in no group that a rule or the default route uses. When you save, the dashboard warns Calls never reach some gateways |
Next steps
| Page | What it covers |
|---|---|
| Set up a SIP trunk | A whole trunk setup in order, from creation to a test call |
| Receiving calls | Number routes, rules, the default route and refused calls |
| Voice troubleshooting | Diagnosing a call from its symptom |
संबंधित संसाधन
इस विषय के लिए दस्तावेज़, गाइड और उदाहरणों के साथ आगे बढ़ें।