feat(alias): add LOCAL_ALIASES to re-home short local TGs under an owned prefix
Re-home a short local talk group (e.g. 8) under the reflector's own owned prefix as a globally-unique number (e.g. 2620008) via a single [GLOBAL] LOCAL_ALIASES entry, so it routes across the trunk mesh like any owned TG while local users keep dialing the short number. - Config: LOCAL_ALIASES=localTG:aliasTG[/dir] (dir in|out, omitted = two-way); aliasTG must be owned by a LOCAL_PREFIX. Rejects unowned alias, an owned short side, duplicate short keys, and numeric overflow. - Boundary rewrite: prefix routing / owner-relay / peer-interest run on the long owned number; local delivery and talker arbitration run on the short number, bridged in the four inbound trunk handlers. - Rewrite-on-select folds a client that dials the long number onto the short number (select + monitor), so the two are one conversation locally and on the mesh. - Twin: external-talker notify uses the short number to match the audio mirror; disconnect cleanup folds to short so an aliased TG cannot wedge. - /status exposes local_aliases; satellite nodes warn that the setting is ignored (a local alias belongs on the mesh parent that owns the prefix). - Docs (PEER_PROTOCOL, CONCEPTS, conf template) and integration tests (tests/test_alias.py): two-way / in / out, rewrite-on-select, status, validation, disconnect-wedge, and duplicate-key coverage.
This commit is contained in:
1 parent
7e625dd514
commit
5da075f150
12 files changed
+1187
-64
No files matched your search
@@ -185,6 +185,47 @@ A listener on each is monitoring TG `25` (owned by **B**).
|
||||
|
||||
---
|
||||
|
||||
## 9. Local aliases: giving a short TG a global number
|
||||
|
||||
Section 2 established the rule: a number is only reachable mesh-wide if its
|
||||
prefix is owned by a reflector. That leaves a common problem — a club or
|
||||
region wants a short, easy-to-remember local TG (e.g. `8`) that its own users
|
||||
already dial, but also wants it reachable from anywhere in the mesh by a
|
||||
proper globally-unique number under the reflector's own prefix (e.g.
|
||||
`2620008` under `LOCAL_PREFIX=262`). Renumbering the local TG isn't
|
||||
attractive, and neither is asking every peer to special-case it.
|
||||
|
||||
`LOCAL_ALIASES` re-homes the short TG under the long, owned number: the
|
||||
reflector treats `8` and `2620008` as the same conversation, uses the long
|
||||
number for everything that crosses the mesh (routing, owner-relay), and the
|
||||
short number for everything local clients see (selection, talker
|
||||
arbitration). Local users keep dialing `8`; anyone elsewhere in the mesh
|
||||
reaches the same traffic by dialing `2620008`.
|
||||
|
||||
This sits alongside two other tools that shape TG reachability, and it's easy
|
||||
to reach for the wrong one:
|
||||
|
||||
- **`CLUSTER_TGS`** (section 5) is for TGs that **every** participating
|
||||
reflector already agrees to broadcast everywhere, regardless of ownership —
|
||||
a nationwide or mesh-wide talk group both sides opted into.
|
||||
- **`TG_MAP`** (per `[TRUNK_x]` section) is a **per-link** curated remap: it
|
||||
translates one TG number to another on a single trunk, so it must be
|
||||
repeated identically on every link that needs it, and it is invisible to
|
||||
hops beyond that one link.
|
||||
- **Local alias** re-homes a curated subset of your own local TGs under a
|
||||
number you already own, once, in `[GLOBAL]`. Because the long number is a
|
||||
real, longest-prefix-matched, owned number, it routes across every hop in
|
||||
the mesh exactly like any other owned TG — no per-link repetition, and no
|
||||
cooperation required from peers or intermediate gateways.
|
||||
|
||||
The underlying rule doesn't change: anything meant to be reachable
|
||||
internationally must have one unique number that falls under a country (MCC)
|
||||
prefix. A local alias doesn't create an exception to that — it's a way to let
|
||||
a short, locally-convenient number satisfy it without forcing local users to
|
||||
dial the long form.
|
||||
|
||||
---
|
||||
|
||||
## Where to go next
|
||||
|
||||
- [`PEER_PROTOCOL.md`](PEER_PROTOCOL.md) — the exact messages, handshake, and
|
||||
|
||||
Reference in new issue
Block a user