diff --git a/README.md b/README.md index d0a9f06..4928d27 100644 --- a/README.md +++ b/README.md @@ -223,6 +223,28 @@ When a client on Reflector 1 joins TG 25, Reflector 1 forwards the conversation over its trunk to Reflector 2 (which owns the "2" prefix). Clients on both reflectors hear the same audio on TG 25 with no extra configuration. +**Local numbering is the operator's choice — but routing follows the number.** A +reflector does not force its nodes onto the prefix scheme; nodes may select *any* +TG number. Routing is then decided **solely by longest-prefix-match on the number +itself, regardless of its length**: + +- A number whose leading digits match a prefix **that some reflector in the + mesh actually owns** is routed to that owner — short or long, and even if the + match was unintended. If a reflector owns Italy's prefix `222`, then `22210` + routes to it; if another owns Germany's `262`, then `26201` routes there. +- A number that matches **no** prefix has no owner: it works locally among that + reflector's own nodes (exactly like stock SvxReflector) but is **never sent + over a trunk** — it is invisible to the mesh and unreachable by international + traffic. + +So to keep a talk group **local**, pick a number that matches no mesh prefix +(in a typical MCC scheme, countries occupy `200`–`799`, so short numbers like +`1`–`199` usually stay local — but only because nothing owns that prefix). To be +**reachable** internationally, use a TG under the agreed prefix scheme (your +country's MCC — see [`docs/MCC_COUNTRY_CODES.md`](docs/MCC_COUNTRY_CODES.md)). +Conversely, beware that a "local" number that happens to match a configured +prefix *will* be sent to that owner. + --- ## Build diff --git a/docs/CONCEPTS.md b/docs/CONCEPTS.md index 5017510..be16876 100644 --- a/docs/CONCEPTS.md +++ b/docs/CONCEPTS.md @@ -41,7 +41,7 @@ for declaring such delegated routes.) ## 2. What happens when a client keys up -A client (an SvxLink node) selects a TG and presses PTT. Two cases: +A client (an SvxLink node) selects a TG and presses PTT. Three cases: - **The TG is owned locally.** The reflector behaves exactly like stock SvxReflector: it relays the audio to every other local client on that TG. If @@ -50,10 +50,34 @@ A client (an SvxLink node) selects a TG and presses PTT. Two cases: - **The TG is owned by a peer.** The reflector forwards the audio over the trunk to the owning peer (selected by longest-prefix-match). The owner then relays it — see below. +- **The TG matches no prefix in the mesh.** It has no owner, so it is **never + sent over any trunk** (`isSharedTG` finds no link to forward on). It still + relays locally among that reflector's own clients, exactly like stock + SvxReflector — it is simply a **local-only** talk group. The client never knows or cares which reflector owns the TG. That is the whole point: nodes stay unmodified. +### Local numbering is opt-in — but the number decides routing + +A reflector does **not** impose the prefix convention on its nodes; a node may +pick any TG number. What matters is that routing is decided **solely by +longest-prefix-match on the number, regardless of its length**: + +- Conforming numbers are routable — wherever their prefix points, provided that + prefix is owned by a reflector in the mesh. This is length-independent: if + Italy's `222` is owned, `22210` routes to its owner just as surely as `222` + itself does; likewise `26201` routes to the owner of Germany's `262`. +- A number that matches no mesh prefix has no owner and stays **local-only** + (e.g. a short `1`–`199` TG in a typical MCC scheme, where countries live in + `200`–`799` — it stays local only because nothing owns that prefix). + +So: **obey the convention to be reachable; use a non-matching number to stay +local.** This lets a reflector keep private local TGs alongside its routable, +mesh-facing ones — with one caveat: a number you *intended* as local but that +happens to match a configured prefix **will** be sent to that owner. The number +is the routing key; there is no separate "make this local" switch. + --- ## 3. Owner-relay: why the owner is the hub diff --git a/docs/TOPOLOGY_EXAMPLES.md b/docs/TOPOLOGY_EXAMPLES.md index c9c43b2..88ef25a 100644 --- a/docs/TOPOLOGY_EXAMPLES.md +++ b/docs/TOPOLOGY_EXAMPLES.md @@ -487,6 +487,14 @@ recommendation; new cluster-TG assignments should follow the `100–199` / - Longest-prefix-match decides the owner of any given TG, but only against the prefixes a reflector has been explicitly configured to trunk to — prefixes are not gossiped. +- Routing follows the **number, not its length**: a TG goes to the owner of + its longest matching prefix *that exists in the mesh* (e.g. `22210`→`222`, + `26201`→`262`, when those country prefixes are owned), while a TG that + matches **no** configured prefix has no owner and stays **local-only** — + it works among the originating reflector's own nodes but is never trunked. + Local TG numbering is thus the operator's choice; only numbers under the + agreed prefix scheme are reachable across the mesh (and a "local" number + that happens to match a prefix *will* be routed to that owner). - Trunk relay is single-hop. Satellite mirror is independent of that rule. - Owner fanout is gated by **peer interest** with a 10-minute idle window. Interest is registered the first time a peer transmits on a TG. diff --git a/docs/TOPOLOGY_EXAMPLES.pdf b/docs/TOPOLOGY_EXAMPLES.pdf index 0322def..d0411f7 100644 Binary files a/docs/TOPOLOGY_EXAMPLES.pdf and b/docs/TOPOLOGY_EXAMPLES.pdf differ diff --git a/docs/topology_pdf/topology.html b/docs/topology_pdf/topology.html index c333429..e3ce80b 100644 --- a/docs/topology_pdf/topology.html +++ b/docs/topology_pdf/topology.html @@ -656,6 +656,14 @@ the 100–199 / 800–999 rule.

Properties that hold across all variants