numbers: any free internal number of 1 to 6 digits; ranges only suggest

Owner wanted the first user on 1. Numbering ranges now choose the Next free suggestion
(Settings → Numbering), the setup wizard takes a number per person, and a one-digit number
can't also be a menu key of a digital receptionist with direct dialing. Dialplan patterns that
take an internal number match one digit (_X!); golden case short-numbers proves it in Asterisk.
This commit is contained in:
iamdoubz committed 2026-10-21 13:17:25 -05:00
1 parent 4143f6d064
commit aa6681da03
42 files changed
+932 -137

No files matched your search

+8
View File
@@ -141,6 +141,14 @@ async function check(name) {
if (!shownQ.startsWith(`${q} has`) || listed !== members)
problems.push(`queue ${q}: expected ${members} members, got: ${shownQ.trim()}`);
}
// A case can list [number, context] pairs Asterisk must match (short-numbers: one-digit
// numbers, which a pattern like _X. needs two digits for).
const snap = JSON.parse(readFileSync(join(GOLDEN, name, 'snapshot.json'), 'utf8'));
for (const [exten, ctx] of snap.asteriskMatches ?? []) {
const d = cli(`dialplan show ${exten}@${ctx}`).out;
if (!/-= \d+ extensions? \(/.test(d) || /There is no existence/.test(d))
problems.push(`${exten} doesn't match in ${ctx}`);
}
// Asterisk colors its log: strip the escape codes before looking for ERROR[.
// eslint-disable-next-line no-control-regex -- matching ANSI escapes is the point
const log = docker('logs', NAME).out.replace(/\x1b\[[0-9;]*m/g, '');