Dial-A-TG bug fix

Fix Dial-A-TG - Exclude privately dialed 9 in Dial-A-TG, return "busy" when dialled. (HackNix fix!)
This commit is contained in:
Shane Daley 2021-10-12 19:35:07 -04:00
parent 47369037a6
commit 55ff21a0ae
1 changed files with 8 additions and 2 deletions

View File

@ -1767,7 +1767,7 @@ class routerHBP(HBSYSTEM):
logger.warning('(%s) Reflector: Private call from %s to %s',self._system, int_id(_rf_src), _int_dst_id)
#if _int_dst_id >= 4000 and _int_dst_id <= 5000:
if _int_dst_id >= 5 and _int_dst_id <= 999999:
if _int_dst_id >= 5 and _int_dst_id != 9 and _int_dst_id <= 999999:
_bridgename = '#'+ str(_int_dst_id)
if _bridgename not in BRIDGES and not (_int_dst_id >= 4000 and _int_dst_id <= 5000) and not (_int_dst_id >=9991 and _int_dst_id <= 9999):
logger.info('(%s) [A] Reflector for TG %s does not exist. Creating as User Activated. Timeout: %s',self._system, _int_dst_id,CONFIG['SYSTEMS'][self._system]['DEFAULT_UA_TIMER'])
@ -1834,7 +1834,13 @@ class routerHBP(HBSYSTEM):
# for character in _systemcs:
# _say.append(words[character])
# _say.append(words['silence'])
if _int_dst_id <= 5 or _int_dst_id == 9:
logger.info('(%s) Reflector: voice called - TG < 5 or 9 - "busy""', self._system)
_say.append(words[_lang]['busy'])
_say.append(words[_lang]['silence'])
#If disconnection called
if _int_dst_id == 4000:
logger.info('(%s) Reflector: voice called - 4000 "not linked"', self._system)