Add an Outbound Route¶
Outbound routes match digits dialed by a user and send the call out through one or more trunks. The first matching route wins, so order and pattern specificity matter.
Before You Start¶
- At least one outbound trunk is registered and online.
- You know the dial patterns the route should match (e.g. NANPA 11-digit, 10-digit, international).
Steps¶
- Go to Trunk Attributes → Outbound Routes.
- Click Add Outbound Route.
- Fill in the Route Settings tab:
- Route Name — e.g.
Local 7-Digit,LongDistance,International. - Route CID (optional) — overrides the caller ID for calls on this route.
- Override Extension — usually leave at
No. - Route Password — optional, prompts for a code before allowing the call.
- Time Group — optional, restricts the route to certain hours.
- Route Name — e.g.
- Open the Dial Patterns tab and add patterns. Examples:
NXXNXXXXXX— 10-digit (no leading 1)1NXXNXXXXXX— 11-digit NANPA011.— international (the.matches any remaining digits)- Prepend
+field to add a1, prefix1to strip, etc. — see Dial Pattern reference.
- Open the Trunk Sequence for Matched Routes tab and select trunks in priority order. The first online trunk is tried first; if it fails, the next is used.
- Click Submit.
- Drag your route to the correct position in the route list — routes are matched top-down. Most specific patterns should be above catch-alls.
- Click Apply Config.
Verify¶
From an extension, dial a number that matches the route. Watch the call hit the correct trunk:
asterisk -rx "pjsip show endpoints"
tail -f /var/log/asterisk/full
Common Issues¶
- Route order wrong. A broad pattern like
.placed above a specific one will swallow every call. Review order after every new route. - No matching pattern. Check the dialed digits in the log; you may need to add stripping (e.g. strip the
1from1NXXNXXXXXX) or prepending. - Trunk says congestion. The trunk is offline or the carrier rejected the call. Check Reports → UnifiedBX Info and the trunk's registration.
- Caller ID is wrong. Set Route CID to override, or fix the extension's outbound CID.