Build & test a rule
The two halves of every Teams normalization rule. Pattern is a JavaScript-compatible regex (.NET regex on Teams side, but the basic syntax overlaps for this use case). Translation uses $1, $2… backreferences to capture groups in the pattern.
ACMA rule library
Pre-built rules covering every class of number in the ACMA Numbering Plan. Click any card to load its pattern + translation into the builder above. These follow the canonical Teams Direct Routing convention: normalize to E.164 (+CC...) on the way out so the carrier accepts the call.
0011 + country code dial still translates.
Internal extension builder
Every organisation has a slightly different internal dial plan — 4-digit extensions, 5-digit extensions, site-prefix + extension, ranges reserved for hot desks, etc. Describe yours in the form below and the tool generates the matching pattern + translation. Click Load into tester to drop the generated rule into the builder above and test it against your own numbers.
^…$ and the extension digits become capture group $1 (or $2 if there's a site prefix in front, in which case the prefix is $1 — useful when you want to route based on site). Leading digit lists like "2 3 4" become a character class [234]. An empty first-digit list defaults to "any 1–9" (so leading zero is excluded — extensions never start with 0).
Bulk number tester
Paste a list of dialed numbers; the tester runs each through the active rule set (the loaded recipes below — initially all ACMA defaults) and reports the first matching rule + the translated E.164 output. Use this to validate user dial patterns before a Direct Routing cutover.
Regex breakdown
Paste any normalization pattern; get a token-by-token plain-English explanation. Useful for inheriting somebody else's dial plan and reverse-engineering what it intended to match.
AU numbering reference
The Australian Communications and Media Authority (ACMA) maintains the Telecommunications Numbering Plan 2015. The table below summarises the classes that matter for a Teams Direct Routing dial plan.
Number classes (E.164 country code +61)
| Class | National format | E.164 format | Length | Notes |
|---|---|---|---|---|
| Emergency | 000 / 112 / 106 | — (untranslated) | 3 | 112 from mobile, 106 TTY. Never normalize to +61 — pass through verbatim. |
| Mobile | 04xx / 05xx xxx xxx | +61 4xx / 5xx xxx xxx | 10 → 11 | ACMA allocates both 04 (primary PMTS) and 05 (newer PMTS) for mobile. Strip leading 0, prepend +61. The 05 range was added more recently and remains less common in the wild — include it for forward-compatibility. |
| Geographic NSW/ACT | 02 xxxx xxxx | +61 2 xxxx xxxx | 10 → 11 | Local dial usually 8 digits inside Sydney/Canberra. |
| Geographic VIC/TAS | 03 xxxx xxxx | +61 3 xxxx xxxx | 10 → 11 | Local 8 digits inside Melbourne/Hobart. |
| Geographic QLD | 07 xxxx xxxx | +61 7 xxxx xxxx | 10 → 11 | Local 8 digits inside Brisbane. |
| Geographic WA/SA/NT | 08 xxxx xxxx | +61 8 xxxx xxxx | 10 → 11 | Local 8 digits inside Perth/Adelaide/Darwin. |
| 13 service | 13 xx xx | +61 13xx xx | 6 → 9 | Local-call rate. 6 digits total. |
| 1300 service | 1300 xxx xxx | +61 1300 xxx xxx | 10 → 13 | Local-call rate. |
| 1800 toll-free | 1800 xxx xxx | +61 1800 xxx xxx | 10 → 13 | Caller pays nothing. |
| 1900 premium | 1900/1901 xxx xxx | +61 1900 xxx xxx | 10 → 13 | Premium rate — many enterprises block these at the SBC. |
| Satellite | 0145 xxxxxx | +61 145 xxxxxx | 10 → 12 | Inmarsat / Globalstar. Less common. |
| International (out) | 0011 + CC + number | + CC + number | variable | Australia's IDD prefix is 0011. Strip it, prepend +. |
Regex syntax cheat sheet
| Token | Meaning | Example |
|---|---|---|
| ^ | Start of string | ^04 matches "04…" |
| $ | End of string | \d{4}$ matches "…1234" |
| \d | Any digit (0-9) | \d{8} = exactly 8 digits |
| {n} | Exactly n times | \d{6} |
| {n,m} | Between n and m times | \d{6,8} |
| ? | Optional (0 or 1) | 0?4 matches "04" or "4" |
| | | Alternation (OR) | (13|1300|1800) |
| [abc] | Character class | [2378]\d{7} |
| [a-z] | Class range | [2-9]\d{7} |
| (...) | Capture group → $1, $2… | ^0?(4\d{8})$ + +61$1 |
| (?:...) | Non-capturing group | (?:0011|\+) |
References
- ACMA Numbering Plan — official Australian numbering authority
- MS Learn — What are dial plans? — Teams normalization rule reference
- MS Learn — Translate phone numbers — examples by country
- E.164 (Wikipedia) — the international PSTN number format Teams normalizes to