FAILURE MAP
← Case archive

FA-96655 / Phone number formatting / Member archive

PBX dial plan normalizer: a two-digit outside code breaks prefixed numbers · case 05

At a site whose outside code is 81, "81555..." is rejected.

Member previewVariant 5 · 3 implementations · 10 checks per implementation

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 fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
already prefixed with two-digit outside code["invalid", "815550158"]["external", "815550158"]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 ↗