Outbound Routes

FreePBX - Connectivity Menu

What is the Outbound Routes Module used for?

The Outbound Routes Module is used to tell your FreePBX/Asterisk system which numbers your phones are permitted to call and which Trunk to send the calls to.

Generally, a FreePBX/Asterisk system will have a Restricted route which designates certain numbers that can never be dialed (such as 900 and 976 numbers), an Emergency route to use for routing 911 calls, and a route for ordinary calls.  A phone system might also have special routes for interoffice calls, international calls, and other special circumstances.

How is the Outbound Routes Module related to the other Modules?

The Outbound Routes module works together with the Trunks module.  The Trunks module sets up the connection between your FreePBX/Asterisk system and a remote VOIP device or system.  The Outbound Routes module then tells your system which Trunk should be used when one of your phones dials a specific number or set of numbers.

When a phone on your system attempts to dial a phone call, the number it dials is compared against the rules set in the Outbound Routes Module.  If it matches an allowed rule in the Outbound Routes Module, the call is then sent to the Trunk(s) specified in the Outbound Routes Module.  Until you set-up your Outbound Routes, you won’t be able to make any calls outside of your system, even if you have a trunk set-up.

Overview

Outbound routing is a set of rules that the PBX uses to decide which trunk to use for an outbound call. Having multiple trunks allows you to control cost by routing calls over the least costly trunk for a particular call. Outbound routes are used to specify what numbers are allowed to go out a particular route. When a call is placed, the actual number dialed by the user is compared with the dial patterns in each route (from highest to lowest priority) until a match is found. If no match if found, the call fails. If the number dialed matches a pattern in more than one route, only the rules with the highest priority in the route are used. “Outbound Route Dial Patterns” can be used to strip off leading digits before passing them to a trunk. This is most useful if you use a specific dialing code to access a particular route. For example, “9” to access an outside line.

Adding an Outbound Route

Route Name

This is used to identify the current route. It can’t contain any spaces. The name is usually descriptive for example, “local” or “international.”

Route CID

Optional route CID to be used for this route. If set, this will override all CIDs

specified except:

  • Extension/device EMERGENCY CIDs if this route is checked as an EMERGENCY route type
  • Trunk CID if trunk is set to force it’s CID
  • Forwarded call CIDs (CF, Follow Me, Ring Groups, etc)
  • Extension/user CIDs if checked

Route Password

OPTIONAL

A route can prompt users for a password before allowing calls to progress. This is useful for restricting calls to international destinations or 1-900 numbers. A numerical password or the path to an authenticate password file can be used. Leave this field blank to not prompt for a password.

Route Type

Emergency

OPTIONAL

Selecting “Emergency” will enforce the use of a device’s Emergency CID setting (if set). Select this option if the route is used for emergency dialing (ie: 911).

Intra-Company

OPTIONAL

Selecting “Intra-Company” will treat this route as an intra-company connection, preserving the internal caller ID information instead of the outbound CID of either the extension or trunk.

Music On Hold

You can choose which music category to use. For example, choose a type appropriate for a destination country which may have announcements in the appropriate language.

Time Group

If this route should only be available during certain times then select a time group created under the Time Groups module. The route will be ignored outside of times specified in that time group. If left as default, “Permanent Route,” then it will always be available.

Route Position

Where to insert this route or relocate it relative to the other routes.

Call Recording

Controls or overrides the call recording behaviour for calls coming into this DID. Allow will honour the normal downstream call recording settings. Record on Answer starts recording when the call would otherwise be recorded ignoring any settings that say otherwise. Record Immediately will start recording right away capturing ringing, announcements, MoH, etc. Never will disallow recording regardless of downstream settings.

Pin Set

OPTIONAL

Select a pin set to use. If using this field, leave the route password blank. Pin sets are used to manage lists of PINs that can be used to access restricted features. The PIN can also be added to the CDR record’s “accountcode” field. Use the Pin Set module to create pin sets. Pin requirements for outbound routes can also be overridden in the Extensions module on a per extension basis.

Call Limit

Limits the number of calls that can be made using this route over a specified time period. Outbound call limits are defined in the Outbound Call Limit module or at the extension level.

Notification

Icon

Please note the Notification option will not be available until after you submit and save the route.

 

The purpose of the Notification option is to be able to setup the ability to notify a group of phones when a user uses this outbound route. Any existing page group can be linked to this route. When a call is placed, a page will go out to the page group notifying them of what number was dialed and what user dialed the number. Any user of the page group can then dial “*1” to barge into the call to listen and speak. Notifications would also be for emergency routes, such as 911.

Dial Patterns

A dial pattern is a unique set of digits that will select this route and send the call to the designated trunks. If a dialled pattern matches this route, no subsequent routes will be tried. If time groups are enabled, subsequent routes will be checked for matches outside of the designated time(s).

PATTERN
DESCRIPTION
X Any whole number from 0-9
Z Any whole number from 1-9
N Any whole number from 2-9
[###]

Any whole number in the brackets, example [123] is 1 OR 2 OR 3.

Note that multiple numbers can be separated by commas and ranges of numbers can be specified with a dash ([1.3.6-8]) would match the numbers 1,3,6,7 and 8.

. (dot) It matches one or more characters and (acts as a wildcard)

 

Prepend

Digits to prepend to a successful match. If the dialled number matches the patterns specified by the subsequent columns, then this will be prepended before sending to the trunks.

Prefix

Prefix to remove on a successful match. The dialled number is compared to this and the subsequent columns for a match. Upon a match, this prefix is removed from the dialled number before sending it to the trunks.

Match Pattern

The dialled number will be compared against the prefix + this match pattern. Upon a match, the match pattern portion of the dialed number will be sent to the trunks.

CallerID

If caller ID is supplied, the dialled number will only match the prefix + match pattern if the caller ID being transmitted matches this. When extensions make outbound calls, the caller ID will be their extension number and NOT their outbound CID. The above special matching sequences can used for caller ID matching similar to other number matches.

Dial Patterns Wizards

These are pre-constructed dial patterns. Selecting the name of one of the pre-made patterns will populate the Dial Pattern Fields.

Emergency

Dedicate a route just for this purpose. Calls for emergency services should never be mangled by another dial pattern.

International

Calls outside of the country, if permitted.

Toll-Free

Calls to toll-free numbers, such as 1-888 or 1-800.

Long Distance

Calls outside of the local calling area, if permitted.

Local

Calls to local numbers.

Special

Calls such as operator (0) and directory assistance (411).

Lookup Local Prefixes

This looks up your local number on www.localcallingguide.com (available for North America only). It sets up so you can dial 7, 10 or 11 digits (5551234, 9205551234, 19205551234) to access this route.

Icon

The information on this wizard comes from a variety of sources and is not guaranteed to be 100% complete or correct. For authoritative information, please consult the appropriate company or trunk provider.

Upload from CSV

Upload patterns from a CSV file replacing existing entries. If there are no headers, then the file must have 4 columns of patterns in the same order as in the GUI. You can also supply headers for prepend, prefix, and match pattern. Also, caller ID in the first row. If there are less than 4 recognized headers, the remaining columns will be blank.

Trunk Sequence for Matched Routes

The trunk sequence controls the order of trunks that will be used when the above dial patterns are matched. For dial patterns that match long distance numbers, for example, you would want to pick the lowest cost route for long distance, followed by more expensive routes.

Optional Destination on Congestion

Where to send the caller if the trunks report congested.

Save

Make sure to press the “Submit Changes” button when done. You can also create a duplicate route by clicking the “Duplicate Route” button.

Icon
  • You will want to make sure you define routes for all types of calls. Not defining a route can leave your users frustrated when they need to make an important call.
  • Outbound dial rules work in conjunction with trunk dial rules. Trunk dial rules are ONLY used for adding numbers to, or subtracting numbers from the number being sent to the trunk. Trunk dial rules are never used to allow or restrict numbers that may be dialed. See the Trunk module user guide for additional information.