04.6 Trunks

Trunks

Trunks and Trunk Groups allow you to control how calls are sent to the outside world when dialing.

Trunks and Trunk Groups provide for:

  • DID rewrites
  • Caller ID rewrites
  • Least Cost Routing
  • Trunk Failover

DID rewrites and Caller ID rewrites are covered in the context help for each of these pages.

Trunk Groups

Trunk Groups essentially allow you to select which Trunk should be used each time a number is dialed.

A Trunk Group would normally be setup to send 3 Digit internal extensions to the 'internal' trunk whilst 8 and 10 digit numbers would be sent via the default external trunk.

You can also create special patterns that route calls to other trunks. For instance if you have a mobile gateway you would want to route all mobile/cell calls out via your mobile gateway.

Channel Limits

Some telephony providers put a limit on the number of calls that can go across each trunk, referred to as a channel limit.  With trunks that have a channel limit you may need to purchase multiple trunks. Trunk Groups are able to check each Trunk Channel limit and will skip trunks that have reached their limit and try the next available trunk in the Trunk Group (providing the pattern matches).

Trunk Failover

Trunk failover allows you to configure an alternate provider to send calls to in the event that your main provider's service or your connection to their services fails.

Trunk Failover is managed via Trunk Groups. A Trunk Group allows you to cluster one or more Trunks into a single logical group.

Within a Trunk Group you associate each Pattern (and by implication, their associated Trunk) with either the 'Primary' mode or the 'Failover' mode. Patterns associated with the 'Primary' mode are used under normal operating circumstances (when the system is in Primary mode) whilst the Patterns associated with the 'Failover' mode are normally ignored.

If the Trunk Group is placed into Failover mode then the Patterns assocated with the Failover mode for the Trunk Group will be used until the system is placed back into 'Primary' mode.

What mode is my Trunk Group in?

You can quickly determine you Trunk Group's mode by opening the Trunk Group 'Details' tab and checking the 'Mode' setting. It be either 'Primary' mode if the system is healthly or 'Failover' if the system has a failed trunk.

How does a system failover?

There a several methods by which a system may failover to the 'Failover' mode.

  • Manual intervention by clicking the 'Failover' button on the Trunk Group 'Details' tab.
  • Automated failover when a Trunk associated with a 'Primary' mode Pattern fails and the Pattern option 'Failover Group when turnk fails' is selected.
  • When an administrator sets the System Key 'ForceTrunkFailover' to '1'. This is used to allow the remote failover of a system.

Trunks which are marked as 'Disabled' will not cause a failover regardless of their status.

Trunks which belong to the 'Internal' realm will not cause a failover.

How does a system Failback?

When a trunks returns to normal operation the system needs to be placed back into 'Primary' mode to resume normal operations.

A system can be placed back into Primary mode by:

  • User clicking the 'Primary' button on the Trunk Group 'Details' tab. 
  • Automatic failback when the failed Trunk resumes normal operation and the Trunk option 'Auto Fail reset delay Seconds' has elapsed since the Trunk resumed normal operation.
  • Administrator sets the System  Key 'ForceTrunkFailover' to '0'.

Automated timings and limitations

Automated failover is normally only able to detect a full outage of a Trunk. Brown outs, when the trunk is still up but calls quality is poor or only some calls can be made, cannot be detected by the Automated system. In these cases you will need to force a manual failover by clicking the 'Failover' button on the Details tab for 'every' Trunk Group that you want to fail over.

The standard Trunk settings is that a Trunk has to be down for at least 60 seconds before a Failover occurs. Failback only occurs when the Trunk as resumed normal operation for at least 300 seconds. Both of these settings are configurable via the Trunk Details tab.