Don't send to system if more than 6 (1 min) BCKA missed

This commit is contained in:
Simon 2021-04-15 18:33:38 +01:00
parent 1b5f3fdcec
commit cc5178faab

View File

@ -1097,10 +1097,14 @@ class routerOBP(OPENBRIDGE):
#We want to ignore this system and TS combination if it's called again for this packet
_sysIgnore.append((_target['SYSTEM'],_target['TS']))
#If target has quenched us, don't send
if ('_bcsq' in _target_system) and (_dst_id in _target_system['_bcsq']) and (_target_system['_bcsq'][_dst_id] == _stream_id):
#logger.info('(%s) Conference Bridge: %s, is Source Quenched for Stream ID: %s, skipping system: %s TS: %s, TGID: %s', self._system, _bridge, int_id(_stream_id), _target['SYSTEM'], _target['TS'], int_id(_target['TGID']))
continue
#If target has missed 6 (on 1 min) of keepalives, don't send
if _target_system['ENHANCED_OBP'] ['_bcka'] in _target_system and _target_system['_bcka'] < _pkt_time - 60:
continue
# Is this a new call stream on the target?
@ -1292,26 +1296,13 @@ class routerOBP(OPENBRIDGE):
else:
if '_fin' in self.STATUS[_stream_id]:
if '_finlog' not in self.STATUS[_stream_id]:
logger.warning("(%s) OBP *LoopControl* STREAM ID: %s ALREADY FINISHED FROM THIS SOURCE, IGNORING",self._system, int_id(_stream_id))
self.STATUS[_stream_id]['_finlog'] = True
return
# Loop Control
#_removeextra1 = []
#_count = 0
#for system in systems:
#if system == self._system:
#continue
#if CONFIG['SYSTEMS'][system]['MODE'] == 'OPENBRIDGE':
#if _stream_id in systems[system].STATUS and '1ST' in systems[system].STATUS[_stream_id]:
#_count = _count + 1
#if _count > 1:
#logger.warning('Extra')
#_removeextra1.append(system)
#for remove in _removeextra1:
#del systems[remove].STATUS[_stream_id]['1ST']
for system in systems:
if system == self._system:
@ -1458,9 +1449,14 @@ class routerHBP(HBSYSTEM):
#We want to ignore this system and TS combination if it's called again for this packet
_sysIgnore.append((_target['SYSTEM'],_target['TS']))
#If target has quenched us, don't send
if ('_bcsq' in _target_system) and (_dst_id in _target_system['_bcsq']) and (_target_system['_bcsq'][_target['TGID']] == _stream_id):
#logger.info('(%s) Conference Bridge: %s, is Source Quenched for Stream ID: %s, skipping system: %s TS: %s, TGID: %s', self._system, _bridge, int_id(_stream_id), _target['SYSTEM'], _target['TS'], int_id(_target['TGID']))
continue
#If target has missed 6 (on 1 min) of keepalives, don't send
if _target_system['ENHANCED_OBP'] ['_bcka'] in _target_system and _target_system['_bcka'] < _pkt_time - 60:
continue
# Is this a new call stream on the target?
if (_stream_id not in _target_status):