diff --git a/dmr/Control.cpp b/dmr/Control.cpp index 928aed7a..59093131 100644 --- a/dmr/Control.cpp +++ b/dmr/Control.cpp @@ -164,6 +164,12 @@ void Control::setOptions(yaml::Node& conf, const std::vector voiceChNo silenceThreshold = dmr::DEFAULT_SILENCE_THRESHOLD; } + // either MAX_DMR_VOICE_ERRORS or 0 will disable the threshold logic + if (silenceThreshold == 0) { + LogWarning(LOG_P25, "Silence threshold set to zero, defaulting to %u", dmr::MAX_DMR_VOICE_ERRORS); + silenceThreshold = dmr::MAX_DMR_VOICE_ERRORS; + } + m_slot1->setSilenceThreshold(silenceThreshold); m_slot2->setSilenceThreshold(silenceThreshold); diff --git a/nxdn/Control.cpp b/nxdn/Control.cpp index 34ea38e8..5ae6f256 100644 --- a/nxdn/Control.cpp +++ b/nxdn/Control.cpp @@ -237,6 +237,12 @@ void Control::setOptions(yaml::Node& conf, const std::string cwCallsign, const s m_voice->m_silenceThreshold = nxdn::DEFAULT_SILENCE_THRESHOLD; } + // either MAX_NXDN_VOICE_ERRORS or 0 will disable the threshold logic + if (m_voice->m_silenceThreshold == 0) { + LogWarning(LOG_P25, "Silence threshold set to zero, defaulting to %u", nxdn::MAX_NXDN_VOICE_ERRORS); + m_voice->m_silenceThreshold = nxdn::MAX_NXDN_VOICE_ERRORS; + } + bool disableCompositeFlag = nxdnProtocol["disableCompositeFlag"].as(false); uint8_t serviceClass = NXDN_SIF1_VOICE_CALL_SVC | NXDN_SIF1_DATA_CALL_SVC; if (m_control) { diff --git a/p25/Control.cpp b/p25/Control.cpp index fefff9d9..709668b5 100644 --- a/p25/Control.cpp +++ b/p25/Control.cpp @@ -268,6 +268,12 @@ void Control::setOptions(yaml::Node& conf, const std::string cwCallsign, const s m_voice->m_silenceThreshold = p25::DEFAULT_SILENCE_THRESHOLD; } + // either MAX_P25_VOICE_ERRORS or 0 will disable the threshold logic + if (m_voice->m_silenceThreshold == 0) { + LogWarning(LOG_P25, "Silence threshold set to zero, defaulting to %u", p25::MAX_P25_VOICE_ERRORS); + m_voice->m_silenceThreshold = p25::MAX_P25_VOICE_ERRORS; + } + m_disableNetworkHDU = p25Protocol["disableNetworkHDU"].as(false); bool disableCompositeFlag = p25Protocol["disableCompositeFlag"].as(false);