Fix bidirectional trunk routing and monitoring client notifications
Two bugs prevented real-world trunk conversations from working: 1. onTrunkTalkerUpdated only notified clients selected on a TG, not clients monitoring it. SvxLink repeaters monitoring a foreign TG never received MsgTalkerStart and could not auto-switch. Fixed by adding TgMonitorFilter to trunk talker broadcasts, matching the existing behavior of onTalkerUpdated for local talkers. 2. Trunk TG routing was one-way: when a client visited a foreign TG, isSharedTG forwarded to the owner, but the owner had no return path. Added per-link peer interest tracking — when a peer sends MsgTrunkTalkerStart for a TG, the receiving side records interest and forwards local activity on that TG back. Interest refreshes on audio, expires after 10 minutes idle, clears on disconnect. New integration test verifies the full round-trip: client-A talks on a foreign TG, monitoring client-B receives the notification, client-B replies, and client-A receives audio back through the trunk.
This commit is contained in:
1 parent
8cf96f9ba5
commit
accb4b3686
7 files changed
+200
-17
No files matched your search
+4
-4
@@ -11,9 +11,9 @@ to regenerate configs/ and docker-compose.test.yml. The test harness
|
||||
|
||||
REFLECTORS = {
|
||||
# name prefixes (list) host-port-base
|
||||
"a": {"prefix": ["120", "2", "3"], "trunk_port_base": 15000},
|
||||
"b": {"prefix": ["40", "5"], "trunk_port_base": 25000},
|
||||
"c": {"prefix": ["6"], "trunk_port_base": 35000},
|
||||
"a": {"prefix": ["122"], "trunk_port_base": 15000},
|
||||
"b": {"prefix": ["121"], "trunk_port_base": 25000},
|
||||
"c": {"prefix": ["1"], "trunk_port_base": 35000},
|
||||
}
|
||||
|
||||
# Fake trunk peers used by the test harness.
|
||||
@@ -33,7 +33,7 @@ TEST_PEER_RX = {
|
||||
# 8000: no prefix match (not owned by any reflector)
|
||||
# 1201: starts with prefix "120" (overlaps with reflector-a's ownership)
|
||||
# 9999: starts with test peer prefix "9"
|
||||
CLUSTER_TGS = [8000, 1201, 9999]
|
||||
CLUSTER_TGS = [222, 999]
|
||||
|
||||
# Satellite test config (parent is the first reflector in REFLECTORS)
|
||||
SATELLITE = {
|
||||
|
||||
Reference in new issue
Block a user