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:
Audric committed 2026-07-03 18:17:16 +02:00
1 parent 7e625dd514
commit 5da075f150
12 files changed
+1187 -64

No files matched your search

+3
View File
@@ -18,6 +18,9 @@ docker compose -f docker-compose.test.yml up -d --build --wait
echo "=== Running integration tests ==="
python3 test_trunk.py
echo "=== Running local-alias integration tests ==="
python3 test_alias.py -v
echo "=== Running MQTT-deltas integration tests ==="
python3 test_mqtt_deltas.py