add option to disable the source ID validation before issuing a grant;

3.0-maint
Bryan Biedenkapp 3 years ago
parent db2212f7c1
commit 81c16f6758

@ -100,6 +100,8 @@ protocols:
enable: false enable: false
# DMR slot number to transmit TSCC data on. # DMR slot number to transmit TSCC data on.
slot: 1 slot: 1
# Flag indicating whether or not the source ID validation before granting disabled.
disableGrantSourceIdCheck: false
# Flag indicating whether or not received RF embedded LC data only should be transmitted. # Flag indicating whether or not received RF embedded LC data only should be transmitted.
embeddedLCOnly: false embeddedLCOnly: false
@ -161,6 +163,8 @@ protocols:
disableTSDUMBF: false disableTSDUMBF: false
# Flag to enable optional TIME_DATE_ANNC TSBK during a CC broadcast. # Flag to enable optional TIME_DATE_ANNC TSBK during a CC broadcast.
enableTimeDateAnn: false enableTimeDateAnn: false
# Flag indicating whether or not the source ID validation before granting disabled.
disableGrantSourceIdCheck: false
# Flag indicating whether or not VOC (voice on control) support is enabled. # Flag indicating whether or not VOC (voice on control) support is enabled.
voiceOnControl: false voiceOnControl: false
@ -228,6 +232,8 @@ protocols:
interval: 300 interval: 300
# Amount of time to transmit non-dedicated CC broadcasts. (seconds) # Amount of time to transmit non-dedicated CC broadcasts. (seconds)
duration: 1 duration: 1
# Flag indicating whether or not the source ID validation before granting disabled.
disableGrantSourceIdCheck: false
# Flag indicating whether or not VOC (voice on control) support is enabled. # Flag indicating whether or not VOC (voice on control) support is enabled.
voiceOnControl: false voiceOnControl: false

@ -155,16 +155,20 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::vector<ui
Slot::setSiteData(voiceChNo, voiceChData, netId, siteId, channelId, channelNo, dedicatedTSCC); Slot::setSiteData(voiceChNo, voiceChData, netId, siteId, channelId, channelNo, dedicatedTSCC);
Slot::setAlohaConfig(nRandWait, backOff); Slot::setAlohaConfig(nRandWait, backOff);
bool disableGrantSourceIdCheck = control["disableGrantSourceIdCheck"].as<bool>(false);
if (enableTSCC) { if (enableTSCC) {
m_tsccSlotNo = (uint8_t)control["slot"].as<uint32_t>(0U); m_tsccSlotNo = (uint8_t)control["slot"].as<uint32_t>(0U);
switch (m_tsccSlotNo) { switch (m_tsccSlotNo) {
case 1U: case 1U:
m_slot1->setTSCC(enableTSCC, dedicatedTSCC); m_slot1->setTSCC(enableTSCC, dedicatedTSCC);
m_slot1->setSupervisor(m_supervisor); m_slot1->setSupervisor(m_supervisor);
m_slot1->setDisableSourceIDGrantCheck(disableGrantSourceIdCheck);
break; break;
case 2U: case 2U:
m_slot2->setTSCC(enableTSCC, dedicatedTSCC); m_slot2->setTSCC(enableTSCC, dedicatedTSCC);
m_slot2->setSupervisor(m_supervisor); m_slot2->setSupervisor(m_supervisor);
m_slot2->setDisableSourceIDGrantCheck(disableGrantSourceIdCheck);
break; break;
default: default:
LogError(LOG_DMR, "DMR, invalid slot, TSCC disabled, slotNo = %u", m_tsccSlotNo); LogError(LOG_DMR, "DMR, invalid slot, TSCC disabled, slotNo = %u", m_tsccSlotNo);
@ -174,6 +178,7 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::vector<ui
m_enableTSCC = enableTSCC; m_enableTSCC = enableTSCC;
uint32_t silenceThreshold = dmrProtocol["silenceThreshold"].as<uint32_t>(dmr::DEFAULT_SILENCE_THRESHOLD); uint32_t silenceThreshold = dmrProtocol["silenceThreshold"].as<uint32_t>(dmr::DEFAULT_SILENCE_THRESHOLD);
if (silenceThreshold > MAX_DMR_VOICE_ERRORS) { if (silenceThreshold > MAX_DMR_VOICE_ERRORS) {
LogWarning(LOG_DMR, "Silence threshold > %u, defaulting to %u", dmr::MAX_DMR_VOICE_ERRORS, dmr::DEFAULT_SILENCE_THRESHOLD); LogWarning(LOG_DMR, "Silence threshold > %u, defaulting to %u", dmr::MAX_DMR_VOICE_ERRORS, dmr::DEFAULT_SILENCE_THRESHOLD);
@ -194,6 +199,9 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::vector<ui
LogInfo(" TSCC Slot: %u", m_tsccSlotNo); LogInfo(" TSCC Slot: %u", m_tsccSlotNo);
LogInfo(" TSCC Aloha Random Access Wait: %u", nRandWait); LogInfo(" TSCC Aloha Random Access Wait: %u", nRandWait);
LogInfo(" TSCC Aloha Backoff: %u", backOff); LogInfo(" TSCC Aloha Backoff: %u", backOff);
if (disableGrantSourceIdCheck) {
LogInfo(" TSCC Disable Grant Source ID Check: yes");
}
} }
LogInfo(" Silence Threshold: %u (%.1f%%)", silenceThreshold, float(silenceThreshold) / 1.41F); LogInfo(" Silence Threshold: %u (%.1f%%)", silenceThreshold, float(silenceThreshold) / 1.41F);

@ -159,6 +159,7 @@ Slot::Slot(uint32_t slotNo, uint32_t timeout, uint32_t tgHang, uint32_t queueSiz
m_tsccPayloadDstId(0U), m_tsccPayloadDstId(0U),
m_tsccPayloadGroup(false), m_tsccPayloadGroup(false),
m_tsccPayloadVoice(true), m_tsccPayloadVoice(true),
m_disableGrantSrcIdCheck(false),
m_lastLateEntry(0U), m_lastLateEntry(0U),
m_supervisor(false), m_supervisor(false),
m_verbose(verbose), m_verbose(verbose),

@ -109,6 +109,8 @@ namespace dmr
void setTSCCActivated(uint32_t dstId, uint32_t srcId, bool group, bool voice); void setTSCCActivated(uint32_t dstId, uint32_t srcId, bool group, bool voice);
/// <summary>Sets a flag indicating whether the slot has supervisory functions and can send permit TG to voice channels.</summary> /// <summary>Sets a flag indicating whether the slot has supervisory functions and can send permit TG to voice channels.</summary>
void setSupervisor(bool supervisor) { m_supervisor = supervisor; } void setSupervisor(bool supervisor) { m_supervisor = supervisor; }
/// <summary>Sets a flag indicating whether the slot has will perform source ID checks before issuing a grant.</summary>
void setDisableSourceIDGrantCheck(bool disableSourceIdGrant) { m_disableGrantSrcIdCheck = disableSourceIdGrant; }
/// <summary>Helper to set the voice error silence threshold.</summary> /// <summary>Helper to set the voice error silence threshold.</summary>
void setSilenceThreshold(uint32_t threshold); void setSilenceThreshold(uint32_t threshold);
@ -196,6 +198,8 @@ namespace dmr
bool m_tsccPayloadGroup; bool m_tsccPayloadGroup;
bool m_tsccPayloadVoice; bool m_tsccPayloadVoice;
bool m_disableGrantSrcIdCheck;
uint32_t m_lastLateEntry; uint32_t m_lastLateEntry;
bool m_supervisor; bool m_supervisor;

@ -867,22 +867,23 @@ bool ControlSignaling::writeRF_CSBK_Grant(uint32_t srcId, uint32_t dstId, uint8_
} }
} }
else { else {
// do collision check between grants to see if a SU is attempting a "grant retry" or if this is a if (!m_tscc->m_disableGrantSrcIdCheck) {
// different source from the original grant // do collision check between grants to see if a SU is attempting a "grant retry" or if this is a
uint32_t grantedSrcId = m_tscc->m_affiliations->getGrantedSrcId(dstId); // different source from the original grant
if (srcId != grantedSrcId) { uint32_t grantedSrcId = m_tscc->m_affiliations->getGrantedSrcId(dstId);
if (!net) { if (srcId != grantedSrcId) {
LogWarning(LOG_RF, "DMR Slot %u, DT_CSBK, CSBKO_RAND (Random Access), SVC_KIND_VOICE_CALL (Voice Call) denied, traffic in progress, dstId = %u", m_tscc->m_slotNo, dstId); if (!net) {
writeRF_CSBK_ACK_RSP(srcId, TS_DENY_RSN_TGT_BUSY, (grp) ? 1U : 0U); LogWarning(LOG_RF, "DMR Slot %u, DT_CSBK, CSBKO_RAND (Random Access), SVC_KIND_VOICE_CALL (Voice Call) denied, traffic in progress, dstId = %u", m_tscc->m_slotNo, dstId);
writeRF_CSBK_ACK_RSP(srcId, TS_DENY_RSN_TGT_BUSY, (grp) ? 1U : 0U);
::ActivityLog("DMR", true, "Slot %u group grant request %u to TG %u denied", m_tscc->m_slotNo, srcId, dstId); ::ActivityLog("DMR", true, "Slot %u group grant request %u to TG %u denied", m_tscc->m_slotNo, srcId, dstId);
m_slot->m_rfState = RS_RF_REJECTED; m_slot->m_rfState = RS_RF_REJECTED;
} }
return false; return false;
}
} }
chNo = m_tscc->m_affiliations->getGrantedCh(dstId); chNo = m_tscc->m_affiliations->getGrantedCh(dstId);
slot = m_tscc->m_affiliations->getGrantedSlot(dstId); slot = m_tscc->m_affiliations->getGrantedSlot(dstId);

@ -309,11 +309,16 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw
} }
} }
m_trunk->m_disableGrantSrcIdCheck = control["disableGrantSourceIdCheck"].as<bool>(false);
if (printOptions) { if (printOptions) {
LogInfo(" Silence Threshold: %u (%.1f%%)", m_voice->m_silenceThreshold, float(m_voice->m_silenceThreshold) / 12.33F); LogInfo(" Silence Threshold: %u (%.1f%%)", m_voice->m_silenceThreshold, float(m_voice->m_silenceThreshold) / 12.33F);
if (m_control) { if (m_control) {
LogInfo(" Voice on Control: %s", m_voiceOnControl ? "yes" : "no"); LogInfo(" Voice on Control: %s", m_voiceOnControl ? "yes" : "no");
if (m_trunk->m_disableGrantSrcIdCheck) {
LogInfo(" Disable Grant Source ID Check: yes");
}
} }
LogInfo(" Verify Affiliation: %s", m_trunk->m_verifyAff ? "yes" : "no"); LogInfo(" Verify Affiliation: %s", m_trunk->m_verifyAff ? "yes" : "no");

@ -318,6 +318,7 @@ Trunk::Trunk(Control* nxdn, network::BaseNetwork* network, bool debug, bool verb
m_rcchIterateCnt(2U), m_rcchIterateCnt(2U),
m_verifyAff(false), m_verifyAff(false),
m_verifyReg(false), m_verifyReg(false),
m_disableGrantSrcIdCheck(false),
m_lastRejectId(0U), m_lastRejectId(0U),
m_verbose(verbose), m_verbose(verbose),
m_debug(debug) m_debug(debug)
@ -536,19 +537,21 @@ bool Trunk::writeRF_Message_Grant(uint32_t srcId, uint32_t dstId, uint8_t servic
} }
} }
else { else {
// do collision check between grants to see if a SU is attempting a "grant retry" or if this is a if (!m_disableGrantSrcIdCheck) {
// different source from the original grant // do collision check between grants to see if a SU is attempting a "grant retry" or if this is a
uint32_t grantedSrcId = m_nxdn->m_affiliations.getGrantedSrcId(dstId); // different source from the original grant
if (srcId != grantedSrcId) { uint32_t grantedSrcId = m_nxdn->m_affiliations.getGrantedSrcId(dstId);
if (!net) { if (srcId != grantedSrcId) {
LogWarning(LOG_RF, "NXDN, " NXDN_RTCH_MSG_TYPE_VCALL_REQ " denied, traffic in progress, dstId = %u", dstId); if (!net) {
writeRF_Message_Deny(0U, srcId, NXDN_CAUSE_VD_QUE_GRP_BUSY, RTCH_MESSAGE_TYPE_VCALL); LogWarning(LOG_RF, "NXDN, " NXDN_RTCH_MSG_TYPE_VCALL_REQ " denied, traffic in progress, dstId = %u", dstId);
writeRF_Message_Deny(0U, srcId, NXDN_CAUSE_VD_QUE_GRP_BUSY, RTCH_MESSAGE_TYPE_VCALL);
::ActivityLog("NXDN", true, "group grant request from %u to TG %u denied", srcId, dstId); ::ActivityLog("NXDN", true, "group grant request from %u to TG %u denied", srcId, dstId);
m_nxdn->m_rfState = RS_RF_REJECTED; m_nxdn->m_rfState = RS_RF_REJECTED;
} }
return false; return false;
}
} }
chNo = m_nxdn->m_affiliations.getGrantedCh(dstId); chNo = m_nxdn->m_affiliations.getGrantedCh(dstId);

@ -82,6 +82,8 @@ namespace nxdn
bool m_verifyAff; bool m_verifyAff;
bool m_verifyReg; bool m_verifyReg;
bool m_disableGrantSrcIdCheck;
uint16_t m_lastRejectId; uint16_t m_lastRejectId;
bool m_verbose; bool m_verbose;

@ -345,12 +345,17 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw
uint32_t ccBcstInterval = p25Protocol["control"]["interval"].as<uint32_t>(300U); uint32_t ccBcstInterval = p25Protocol["control"]["interval"].as<uint32_t>(300U);
m_trunk->m_adjSiteUpdateInterval += ccBcstInterval; m_trunk->m_adjSiteUpdateInterval += ccBcstInterval;
m_trunk->m_disableGrantSrcIdCheck = p25Protocol["control"]["disableGrantSourceIdCheck"].as<bool>(false);
if (printOptions) { if (printOptions) {
LogInfo(" Silence Threshold: %u (%.1f%%)", m_voice->m_silenceThreshold, float(m_voice->m_silenceThreshold) / 12.33F); LogInfo(" Silence Threshold: %u (%.1f%%)", m_voice->m_silenceThreshold, float(m_voice->m_silenceThreshold) / 12.33F);
if (m_control) { if (m_control) {
LogInfo(" Voice on Control: %s", m_voiceOnControl ? "yes" : "no"); LogInfo(" Voice on Control: %s", m_voiceOnControl ? "yes" : "no");
LogInfo(" Ack Requests: %s", m_ackTSBKRequests ? "yes" : "no"); LogInfo(" Ack Requests: %s", m_ackTSBKRequests ? "yes" : "no");
if (m_trunk->m_disableGrantSrcIdCheck) {
LogInfo(" Disable Grant Source ID Check: yes");
}
} }
LogInfo(" Disable Network HDUs: %s", m_disableNetworkHDU ? "yes" : "no"); LogInfo(" Disable Network HDUs: %s", m_disableNetworkHDU ? "yes" : "no");

@ -1217,6 +1217,7 @@ Trunk::Trunk(Control* p25, network::BaseNetwork* network, bool dumpTSBKData, boo
m_ctrlTimeDateAnn(false), m_ctrlTimeDateAnn(false),
m_ctrlTSDUMBF(true), m_ctrlTSDUMBF(true),
m_sndcpChGrant(false), m_sndcpChGrant(false),
m_disableGrantSrcIdCheck(false),
m_dumpTSBK(dumpTSBKData), m_dumpTSBK(dumpTSBKData),
m_verbose(verbose), m_verbose(verbose),
m_debug(debug) m_debug(debug)
@ -2227,19 +2228,21 @@ bool Trunk::writeRF_TSDU_Grant(uint32_t srcId, uint32_t dstId, uint8_t serviceOp
} }
} }
else { else {
// do collision check between grants to see if a SU is attempting a "grant retry" or if this is a if (!m_disableGrantSrcIdCheck) {
// different source from the original grant // do collision check between grants to see if a SU is attempting a "grant retry" or if this is a
uint32_t grantedSrcId = m_p25->m_affiliations.getGrantedSrcId(dstId); // different source from the original grant
if (srcId != grantedSrcId) { uint32_t grantedSrcId = m_p25->m_affiliations.getGrantedSrcId(dstId);
if (!net) { if (srcId != grantedSrcId) {
LogWarning(LOG_RF, P25_TSDU_STR ", TSBK_IOSP_GRP_VCH (Group Voice Channel Request) denied, traffic in progress, dstId = %u", dstId); if (!net) {
writeRF_TSDU_Deny(srcId, dstId, P25_DENY_RSN_PTT_COLLIDE, (grp) ? TSBK_IOSP_GRP_VCH : TSBK_IOSP_UU_VCH); LogWarning(LOG_RF, P25_TSDU_STR ", TSBK_IOSP_GRP_VCH (Group Voice Channel Request) denied, traffic in progress, dstId = %u", dstId);
writeRF_TSDU_Deny(srcId, dstId, P25_DENY_RSN_PTT_COLLIDE, (grp) ? TSBK_IOSP_GRP_VCH : TSBK_IOSP_UU_VCH);
::ActivityLog("P25", true, "group grant request from %u to TG %u denied", srcId, dstId); ::ActivityLog("P25", true, "group grant request from %u to TG %u denied", srcId, dstId);
m_p25->m_rfState = RS_RF_REJECTED; m_p25->m_rfState = RS_RF_REJECTED;
} }
return false; return false;
}
} }
chNo = m_p25->m_affiliations.getGrantedCh(dstId); chNo = m_p25->m_affiliations.getGrantedCh(dstId);

@ -150,6 +150,7 @@ namespace p25
bool m_ctrlTSDUMBF; bool m_ctrlTSDUMBF;
bool m_sndcpChGrant; bool m_sndcpChGrant;
bool m_disableGrantSrcIdCheck;
bool m_dumpTSBK; bool m_dumpTSBK;

Loading…
Cancel
Save

Powered by TurnKey Linux.