minor changes

This commit is contained in:
KF7EEL 2021-09-24 04:52:41 -07:00
parent 207ad07345
commit d2a20b2354
2 changed files with 6 additions and 5 deletions

View File

@ -353,10 +353,11 @@ def mirror_traffic(_data):
if CONFIG['SYSTEMS'][system]['ENABLED']: if CONFIG['SYSTEMS'][system]['ENABLED']:
if CONFIG['SYSTEMS'][system]['MODE'] == 'OPENBRIDGE': if CONFIG['SYSTEMS'][system]['MODE'] == 'OPENBRIDGE':
print(CONFIG['SYSTEMS'][system]['OTHER_OPTIONS']) print(CONFIG['SYSTEMS'][system]['OTHER_OPTIONS'])
if 'MIRROR_TRAFFIC' in CONFIG['SYSTEMS'][system]['OTHER_OPTIONS']: if 'MIRROR_ALL_TRAFFIC' in CONFIG['SYSTEMS'][system]['OTHER_OPTIONS']:
print('mirrored to ' + system) print('mirrored to ' + system)
print(_data) print(_data)
systems[system].send_system(SVRD + b'DATA' + _data) systems[system].send_system(SVRD + b'DATA' + _data)
# Import Bridging rules # Import Bridging rules
@ -1583,11 +1584,10 @@ if __name__ == '__main__':
stream_trimmer = stream_trimmer_task.start(5) stream_trimmer = stream_trimmer_task.start(5)
stream_trimmer.addErrback(loopingErrHandle) stream_trimmer.addErrback(loopingErrHandle)
logger.info('Unit calls will be bridged to: ' + str(UNIT)) logger.info('UNIT calls will be bridged to: ' + str(UNIT))
# Download burn list # Download burn list
if LOCAL_CONFIG['WEB_SERVICE']['REMOTE_CONFIG_ENABLED']: if LOCAL_CONFIG['WEB_SERVICE']['REMOTE_CONFIG_ENABLED']:
with open(CONFIG['WEB_SERVICE']['BURN_FILE'], 'w') as f: with open(CONFIG['WEB_SERVICE']['BURN_FILE'], 'w') as f:
f.write(str(download_burnlist(CONFIG))) f.write(str(download_burnlist(CONFIG)))
print(CONFIG['SYSTEMS'])
reactor.run() reactor.run()

View File

@ -1253,6 +1253,7 @@ class OBP(OPENBRIDGE):
def dmrd_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data): def dmrd_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data):
print(_frame_type)
UNIT_MAP[_rf_src] = (self._system, time()) UNIT_MAP[_rf_src] = (self._system, time())
if _rf_src not in PACKET_MATCH: if _rf_src not in PACKET_MATCH:
PACKET_MATCH[_rf_src] = [_data, time()] PACKET_MATCH[_rf_src] = [_data, time()]
@ -1296,8 +1297,8 @@ class OBP(OPENBRIDGE):
_dtype_vseq = (_bits & 0xF) # data, 1=voice header, 2=voice terminator; voice, 0=burst A ... 5=burst F _dtype_vseq = (_bits & 0xF) # data, 1=voice header, 2=voice terminator; voice, 0=burst A ... 5=burst F
_stream_id = _data[16:20] _stream_id = _data[16:20]
# Record last packet to prevent duplicates, think finger printing. ## # Record last packet to prevent duplicates, think finger printing.
PACKET_MATCH[_rf_src] = [_data, time()] ## PACKET_MATCH[_rf_src] = [_data, time()]
self.dmrd_received(_peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data) self.dmrd_received(_peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data)