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 the07and08ranges, and also block any premium‑rate03numbers that may be allocated.
2. Step‑by‑step configuration in FreePBX
| Step | Action | Details |
|---|---|---|
| 1 | Create a "Geographic" outbound route for normal landline calls. |
|
| 2 | Create a "Mobile" outbound route for standard mobile numbers. |
|
| 3 | Create a "Premium‑Rate Block" route that simply rejects unwanted numbers. |
|
| 4 | Create an "International" outbound route for all 00‑prefixed calls. |
|
| 5 | Add a "Catch‑All" route for any other dialed digits (e.g., 070, 0800, 09). |
|
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
- 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.
- 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.
- 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.
- 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.
- 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
07and08ranges. - Provides a simple catch‑all for international dialing via
00. - Normalises all numbers to E.164 format (
+44…for UK,+…for other countries).
