From 1971fa9343b461fb79df269589a643c50f9bc57a Mon Sep 17 00:00:00 2001 From: majmongoose Date: Mon, 12 Oct 2026 11:09:37 -0400 Subject: [PATCH] route gateway telephone interconnect traffic to the voice channel peers of the site the unit is registered to; Co-Authored-By: Claude Opus 5.5 --- src/fne/network/callhandler/TagP25Data.cpp | 10 +++++++++- src/fne/network/callhandler/TagP25Data.h | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/fne/network/callhandler/TagP25Data.cpp b/src/fne/network/callhandler/TagP25Data.cpp index 136c3d1e..36613d49 100644 --- a/src/fne/network/callhandler/TagP25Data.cpp +++ b/src/fne/network/callhandler/TagP25Data.cpp @@ -1534,7 +1534,15 @@ bool TagP25Data::isTelIntPeerPermitted(uint32_t srcPeerId, uint32_t dstPeerId, F return false; uint32_t regPeerId = m_network->findPeerUnitReg(dstId); - return regPeerId == 0U || regPeerId == dstPeerId; + if (regPeerId == 0U) + return true; + + // voice channel peers belong to the site of their control channel + uint32_t sitePeerId = dstPeerId; + if (dstConn != nullptr && dstConn->ccPeerId() > 0U) + sitePeerId = dstConn->ccPeerId(); + + return sitePeerId == regPeerId; } /* Helper to determine if the peer is permitted for traffic. */ diff --git a/src/fne/network/callhandler/TagP25Data.h b/src/fne/network/callhandler/TagP25Data.h index 3ccbdce1..51bcc8c0 100644 --- a/src/fne/network/callhandler/TagP25Data.h +++ b/src/fne/network/callhandler/TagP25Data.h @@ -358,7 +358,8 @@ namespace network /** * @brief Helper to determine if telephone interconnect traffic may be repeated to a peer. Traffic from a * site is only repeated to gateway peers, and traffic from a gateway is only repeated to the peer the - * subscriber unit is registered to (or every site, if the registration is unknown). + * subscriber unit is registered to and its voice channel peers (or every site, if the registration is + * unknown). * @param srcPeerId Originating Peer ID. * @param dstPeerId Destination Peer ID. * @param dstConn Instance of the FNEPeerConnection for the destination peer.