FA-96658 / Phone number formatting / Member archive
PBX dial plan normalizer: ten-digit numbers are dialed without the 1 · case 03
National numbers are dialed as outside + ten digits.
Case contract
Input [dialed, site] with site ext_len, outside prefix and intl prefix. "+" (after stripping) means international: outside + intl + digits. Otherwise on digits: exactly ext_len digits is internal; digits that start with the outside prefix and have 7 or 11 digits after it are already external; 7 digits get the outside prefix; 10 digits get outside + "1"; anything else is invalid.
Why this case matters
Desk phones and softphones share one dial plan; a wrong prefix rule either rings an internal extension or places an unintended external call.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| ten-digit national number | ["external", "92025550136"] | ["external", "912025550136"] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗