Frequently Asked Question

Outgoing Routes – UK and International
Last Updated 3 hours ago

1. What you need to know

  • E.164 format – All numbers that leave the PBX should be in international format (+44xxxxxxxxxx).
  • In practice this means strip the leading "0" and prepend "+44".
  • Example: 01234 567890+441234567890.
  • Dial‑pattern – The pattern that matches the dialed digits before any translation.
  • Use a separate outbound route for each logical group (geographic, mobile, premium, international, etc.) so you can apply different restrictions or cost‑centres.
  • Restriction goal – Allow the usual UK prefixes (01, 02, 03, 071‑079, 080‑089) but block premium‑rate numbers that are embedded in the 07 and 08 ranges, and also block any premium‑rate 03 numbers that may be allocated.

2. Step‑by‑step configuration in FreePBX

Step Action Details
1 Create a "Geographic" outbound route for normal landline calls.
  • Route Name: UK_Geographic
  • Dial Pattern: 01, 02, 03, 0[1-9] (covers 01, 02, 03 and any 0‑ followed by a digit 1‑9).
  • Destination: Choose the trunk that carries PSTN/VoIP calls to the Public Switched Network.
  • Apply E.164 conversion: s/^0+//; s/^/+44/ (FreePBX "Dialed Number" field → "E.164" tick box).
2 Create a "Mobile" outbound route for standard mobile numbers.
  • Route Name: UK_Mobile
  • Dial Pattern: 07[1-9]\d{8} (matches 071‑079 and 08‑ prefixes that are not premium).
  • Destination: Same trunk as above.
  • E.164 conversion: s/^0//; s/^/+44/.
3 Create a "Premium‑Rate Block" route that simply rejects unwanted numbers.
  • Route Name: Block_Premium
  • Dial Pattern: 0[78]\d{9} (covers any 07 or 08 number that could be premium‑rate).
  • Destination: default (or a "fast‑busy" trunk that plays a congestion tone).
  • No E.164 conversion – the call never leaves the PBX.
4 Create an "International" outbound route for all 00‑prefixed calls.
  • Route Name: International_00
  • Dial Pattern: 00NXXXXXX (where N is any digit 0‑9; you can use 00[0-9]XXXXXX to be explicit).
  • Destination: Your SIP trunk to the chosen international carrier.
  • E.164 conversion: s/^00//; s/^/+/ (or s/^00//; s/^/+44/ if you want to force UK‑based international routing).
5 Add a "Catch‑All" route for any other dialed digits (e.g., 070, 0800, 09).
  • Route Name: Default_International
  • Dial Pattern: 0[78]\d{9} (or a broader pattern like 0[0-9]XXXXXX).
  • Destination: International trunk (or reject if you want to be strict).
  • E.164 conversion: same as above.
Tip: In FreePBX you can set the "Apply E.164" option on a per‑route basis. Tick it for the routes that need to be normalised, and leave it unticked for the "Block_Premium" route.

3. Example of the dial‑pattern syntax used in FreePBX

Prefix Example dialed digits Pattern (FreePBX) What it matches
Geographic 011234567890 0[1-9]\d{9} 01, 02, 03, 08, 09 (any 10‑digit number starting with 0)
Mobile 07123456789 07[1-9]\d{8} 071‑079 (standard mobile)
Premium block 07012345678 070\d{8} 070 (often premium‑rate)
Premium block 08001234567 080\d{8} 080 (freephone) – allow if you want; otherwise add 080\d{8} to the block pattern if you wish to restrict it.
International 00 00441234567890 00[0-9]XXXXXX Any 00‑prefixed number (e.g., 001 for US, 0044 for UK international)

4. What to check next if the configuration isn't working

  1. Verify the dial‑pattern order – FreePBX evaluates routes top‑to‑bottom. Make sure the "Block_Premium" route appears above any generic "International" route that might otherwise catch the same digits.
  2. Confirm trunk selection – Each outbound route must point to the correct trunk (e.g., SIP‑Trunk‑UK, SIP‑Trunk‑Int). A mis‑selected trunk will cause the call to be dropped or routed incorrectly.
  3. Check E.164 conversion – Use the "Apply E.164" checkbox only where you want the leading "0" stripped and "+44" added. If you leave it off for a route that should be normalised, the call may be sent as a domestic dial string and rejected by the carrier.
  4. Look at the Call Log – In the FreePBX UI, open Admin → Call Logs and watch the "Dialed Number" column. It will show the exact pattern that matched, helping you spot mis‑matches.
  5. Test with a simple number – Dial a known 01 number (e.g., 01234 567890) and verify it leaves the PBX, appears in the log, and is correctly transformed to +441234567890. Repeat for a blocked premium‑rate number (e.g., 07012345678) and confirm the call is rejected.

5. Quick reference cheat‑sheet 

# Geographic route
Dial Pattern: 0[1-9]\d{9}
Destination:  (your PSTN/VoIP trunk)
E.164: Yes   →  s/^0+//; s/^/+44/

# Mobile route
Dial Pattern: 07[1-9]\d{8}
Destination:  (same trunk)
E.164: Yes   →  s/^0//; s/^/+44/

# Premium‑rate block
Dial Pattern: 0[78]\d{9}
Destination:  (fast‑busy or reject)
E.164: No

# International 00 route
Dial Pattern: 00[0-9]XXXXXX
Destination:  (international SIP trunk)
E.164: Yes   →  s/^00//; s/^/+/
  

By following these steps you will have a clean, maintainable outbound routing plan that:

  • Allows standard UK geographic (01, 02, 03) and mobile (07) numbers.
  • Blocks any premium‑rate numbers hidden inside the 07 and 08 ranges.
  • Provides a simple catch‑all for international dialing via 00.
  • Normalises all numbers to E.164 format (+44… for UK, +… for other countries).

This website relies on temporary cookies to function, but no personal data is ever stored in the cookies.
OK
Powered by GEN UK CLEAN GREEN ENERGY

Loading ...