Skip to content

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

  1. Go to Trunk Attributes → Outbound Routes.
  2. Click Add Outbound Route.
  3. 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.
  4. Open the Dial Patterns tab and add patterns. Examples:
    • NXXNXXXXXX — 10-digit (no leading 1)
    • 1NXXNXXXXXX — 11-digit NANPA
    • 011. — international (the . matches any remaining digits)
    • Prepend + field to add a 1, prefix 1 to strip, etc. — see Dial Pattern reference.
  5. 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.
  6. Click Submit.
  7. Drag your route to the correct position in the route list — routes are matched top-down. Most specific patterns should be above catch-alls.
  8. 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 1 from 1NXXNXXXXXX) 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.