From 26ca4ac578e5201a4679c79a6465ff02fe7487df Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Wed, 16 Feb 2022 00:04:35 -0500 Subject: [PATCH] more fixes for making VOC work for network calls; --- p25/Control.cpp | 4 ++-- p25/TrunkPacket.cpp | 4 ++-- p25/VoicePacket.cpp | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/p25/Control.cpp b/p25/Control.cpp index 2732ced4..855c4932 100644 --- a/p25/Control.cpp +++ b/p25/Control.cpp @@ -785,7 +785,7 @@ void Control::processNetwork() if (!m_dedicatedControl) ret = m_voice->processNetwork(data, length, control, lsd, duid); else { - if (m_voiceOnControl && !m_trunk->isChBusy(m_siteData.channelNo())) { + if (m_voiceOnControl) { ret = m_voice->processNetwork(data, length, control, lsd, duid); } } @@ -800,7 +800,7 @@ void Control::processNetwork() if (!m_dedicatedControl) ret = m_data->processNetwork(data, length, control, lsd, duid); else { - if (m_voiceOnControl && !m_trunk->isChBusy(m_siteData.channelNo())) { + if (m_voiceOnControl) { ret = m_voice->processNetwork(data, length, control, lsd, duid); } } diff --git a/p25/TrunkPacket.cpp b/p25/TrunkPacket.cpp index 169d07be..4ce51a1c 100644 --- a/p25/TrunkPacket.cpp +++ b/p25/TrunkPacket.cpp @@ -1979,7 +1979,7 @@ bool TrunkPacket::writeRF_TSDU_Grant(bool grp, bool skip, bool net) } if (m_verbose) { - LogMessage(LOG_RF, P25_TSDU_STR ", TSBK_IOSP_GRP_VCH (Group Voice Channel Grant), emerg = %u, encrypt = %u, prio = %u, chNo = %u, srcId = %u, dstId = %u", + LogMessage((net) ? LOG_NET : LOG_RF, P25_TSDU_STR ", TSBK_IOSP_GRP_VCH (Group Voice Channel Grant), emerg = %u, encrypt = %u, prio = %u, chNo = %u, srcId = %u, dstId = %u", m_rfTSBK.getEmergency(), m_rfTSBK.getEncrypted(), m_rfTSBK.getPriority(), m_rfTSBK.getGrpVchNo(), m_rfTSBK.getSrcId(), m_rfTSBK.getDstId()); } @@ -1993,7 +1993,7 @@ bool TrunkPacket::writeRF_TSDU_Grant(bool grp, bool skip, bool net) } if (m_verbose) { - LogMessage(LOG_RF, P25_TSDU_STR ", TSBK_IOSP_UU_VCH (Unit-to-Unit Voice Channel Grant), emerg = %u, encrypt = %u, prio = %u, chNo = %u, srcId = %u, dstId = %u", + LogMessage((net) ? LOG_NET : LOG_RF, P25_TSDU_STR ", TSBK_IOSP_UU_VCH (Unit-to-Unit Voice Channel Grant), emerg = %u, encrypt = %u, prio = %u, chNo = %u, srcId = %u, dstId = %u", m_rfTSBK.getEmergency(), m_rfTSBK.getEncrypted(), m_rfTSBK.getPriority(), m_rfTSBK.getGrpVchNo(), m_rfTSBK.getSrcId(), m_rfTSBK.getDstId()); } diff --git a/p25/VoicePacket.cpp b/p25/VoicePacket.cpp index bdc323fe..6f806622 100644 --- a/p25/VoicePacket.cpp +++ b/p25/VoicePacket.cpp @@ -1186,8 +1186,12 @@ void VoicePacket::writeNet_LDU1(const lc::LC& control, const data::LowSpeedData& m_p25->m_trunk->writeRF_TSDU_Mot_Patch(dstId, 0U, 0U); m_lastPatchGroup = dstId; } + } - if (!m_p25->m_trunk->writeRF_TSDU_Grant(group, false, true)) { + // single-channel trunking or voice on control support? + if (m_p25->m_control && m_p25->m_voiceOnControl) { + m_p25->m_ccRunning = false; // otherwise the grant will be bundled with other packets + if (!m_p25->m_trunk->writeRF_TSDU_Grant(group, true, true)) { if (m_network != NULL) m_network->resetP25(); @@ -1202,19 +1206,15 @@ void VoicePacket::writeNet_LDU1(const lc::LC& control, const data::LowSpeedData& m_p25->m_netState = RS_NET_IDLE; m_p25->m_netLastDstId = 0U; + if (m_p25->m_rfState == RS_RF_REJECTED) { m_p25->m_rfState = RS_RF_LISTENING; } + return; } } - // single-channel trunking or voice on control support? - if (m_p25->m_control && m_p25->m_voiceOnControl) { - m_p25->m_ccRunning = false; // otherwise the grant will be bundled with other packets - m_p25->m_trunk->writeRF_TSDU_Grant(m_rfLC.getGroup(), true, true); - } - m_hadVoice = true; m_p25->m_netState = RS_NET_AUDIO; m_p25->m_netLastDstId = dstId;