Sign inGet Started

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.

OrderHow it orders the gateways for each callUse it for
SequentialThe list order, top to bottomA fixed primary and backups
RandomA fresh random orderSpreading calls evenly
WeightedLower Priority first. Within one priority, a random order where each gateway's chance to go first is its share of the weightsFailover and weighted sharing at once

Set up failover

  1. Open Voice > SIP Trunks, open the trunk, and go to Inbound routing > Groups.
  2. Open the group your default route uses, or select Add group.
  3. Add your primary gateway and your backup with Add gateway to group.
  4. 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.
  5. Set each gateway's Ring time. A shorter ring time on the primary sends unanswered calls to the backup sooner.
  6. Select Review and save, then confirm.

Share calls between gateways

  1. Open the trunk's Inbound routing > Groups and open the group.
  2. 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.
  3. 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.
  4. 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 seeWhat to check
The backup never ringsThe 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 WeightedGateways at different priorities do not share calls. Give them the same Priority
Calls ring too long before reaching the backupLower the primary's Ring time
A gateway never ringsIt 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

PageWhat it covers
Set up a SIP trunkA whole trunk setup in order, from creation to a test call
Receiving callsNumber routes, rules, the default route and refused calls
Voice troubleshootingDiagnosing a call from its symptom

Continue com a documentação, guias e exemplos sobre este tópico.