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:
1 parent
4143f6d064
commit
aa6681da03
42 files changed
+932
-137
No files matched your search
@@ -3,7 +3,8 @@
|
||||
// The patterns match the generator's sanitizers (03 §2), so valid input always renders.
|
||||
import { z } from 'zod';
|
||||
|
||||
export const InternalNumber = z.string().regex(/^\d{3,6}$/, 'Use 3 to 6 digits');
|
||||
/** 1 to 6 digits (owner, 2026-10-21: "1" for the first user; the generator's patterns are _X!). */
|
||||
export const InternalNumber = z.string().regex(/^\d{1,6}$/, 'Use 1 to 6 digits');
|
||||
const Slug = z.string().regex(/^[a-z0-9-]{1,32}$/, 'Lowercase letters, digits and dashes');
|
||||
const Pin = z.string().regex(/^\d{4,10}$/, 'Use 4 to 10 digits');
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { DestinationSchema } from './destination.ts';
|
||||
|
||||
const range = (from: number, to: number) =>
|
||||
z
|
||||
.tuple([z.number().int().min(100), z.number().int().max(999999)])
|
||||
.tuple([z.number().int().min(0), z.number().int().max(999999)])
|
||||
.refine(([a, b]) => a <= b, 'range start must be <= end')
|
||||
.default([from, to]);
|
||||
|
||||
|
||||
Reference in new issue
Block a user