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 <noreply@anthropic.com>
pull/133/head
majmongoose 2 months ago
parent 15deda0e4a
commit 1971fa9343

@ -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. */

@ -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.

Loading…
Cancel
Save

Powered by TurnKey Linux.