From 66bd5f842059e647e81ca5da2a917e784e6af5c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Pe=CC=81rez?= Date: Sun, 12 May 2024 23:41:40 -0400 Subject: [PATCH] Configs and tabs --- bridge.py | 36 +++++++-------- bridge_master.py | 58 ++++++++++++------------- config.py | 4 +- hotspot_proxy_self_service.py | 4 +- hotspot_proxy_v2.py | 2 +- i8n_voice_map.py | 14 +++--- playback_file.py | 2 +- report_receiver.py | 2 +- report_sql.py | 2 +- rules_SAMPLE.py | 2 +- systemd-scripts/adn.service | 11 +++++ systemd-scripts/freedmrrepeater.service | 25 ----------- utils.py | 2 +- 13 files changed, 75 insertions(+), 89 deletions(-) create mode 100644 systemd-scripts/adn.service delete mode 100644 systemd-scripts/freedmrrepeater.service diff --git a/bridge.py b/bridge.py index b38fc4e..d792362 100755 --- a/bridge.py +++ b/bridge.py @@ -447,7 +447,7 @@ class routerOBP(OPENBRIDGE): logger.debug('(%s) Generating TX FULL and EMB LCs for HomeBrew destination: System: %s, TS: %s, TGID: %s', self._system, _target['SYSTEM'], _target['TS'], int_id(_target['TGID'])) logger.info('(%s) Conference Bridge: %s, Call Bridged to HBP System: %s TS: %s, TGID: %s', self._system, _bridge, _target['SYSTEM'], _target['TS'], int_id(_target['TGID'])) if CONFIG['REPORTS']['REPORT']: - systems[_target['SYSTEM']]._report.send_bridgeEvent('GROUP VOICE,START,TX,{},{},{},{},{},{}'.format(_target['SYSTEM'], int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), _target['TS'], int_id(_target['TGID'])).encode(encoding='utf-8', errors='ignore')) + systems[_target['SYSTEM']]._report.send_bridgeEvent('GROUP VOICE,START,TX,{},{},{},{},{},{}'.format(_target['SYSTEM'], int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), _target['TS'], int_id(_target['TGID'])).encode(encoding='utf-8', errors='ignore')) # Set other values for the contention handler to test next time there is a frame to forward _target_status[_target['TS']]['TX_TIME'] = pkt_time @@ -494,8 +494,8 @@ class routerOBP(OPENBRIDGE): logger.info('(%s) *CALL END* STREAM ID: %s SUB: %s (%s) PEER: %s (%s) TGID %s (%s), TS %s, Duration: %.2f', \ self._system, int_id(_stream_id), get_alias(_rf_src, subscriber_ids), int_id(_rf_src), get_alias(_peer_id, peer_ids), int_id(_peer_id), get_alias(_dst_id, talkgroup_ids), int_id(_dst_id), _slot, call_duration) if CONFIG['REPORTS']['REPORT']: - self._report.send_bridgeEvent('GROUP VOICE,END,RX,{},{},{},{},{},{},{:.2f}'.format(self._system, int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), _slot, int_id(_dst_id), call_duration).encode(encoding='utf-8', errors='ignore')) - self.STATUS[_stream_id]['_fin'] = True + self._report.send_bridgeEvent('GROUP VOICE,END,RX,{},{},{},{},{},{},{:.2f}'.format(self._system, int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), _slot, int_id(_dst_id), call_duration).encode(encoding='utf-8', errors='ignore')) + self.STATUS[_stream_id]['_fin'] = True #removed = self.STATUS.pop(_stream_id) #logger.debug('(%s) OpenBridge sourced call stream end, remove terminated Stream ID: %s', self._system, int_id(_stream_id)) #if not removed: @@ -746,20 +746,20 @@ class routerHBP(HBSYSTEM): # Is this a new call stream? if (_stream_id != self.STATUS[_slot]['RX_STREAM_ID']): - # Record the DST TGID and Stream ID - _target_status[_target['TS']]['TX_START'] = pkt_time - _target_status[_target['TS']]['TX_TGID'] = _target['TGID'] - _target_status[_target['TS']]['TX_STREAM_ID'] = _stream_id - _target_status[_target['TS']]['TX_RFS'] = _rf_src - _target_status[_target['TS']]['TX_PEER'] = _peer_id - # Generate LCs (full and EMB) for the TX stream - dst_lc = self.STATUS[_slot]['RX_LC'][0:3] + _target['TGID'] + _rf_src - _target_status[_target['TS']]['TX_H_LC'] = bptc.encode_header_lc(dst_lc) - _target_status[_target['TS']]['TX_T_LC'] = bptc.encode_terminator_lc(dst_lc) - _target_status[_target['TS']]['TX_EMB_LC'] = bptc.encode_emblc(dst_lc) - logger.debug('(%s) Generating TX FULL and EMB LCs for HomeBrew destination: System: %s, TS: %s, TGID: %s', self._system, _target['SYSTEM'], _target['TS'], int_id(_target['TGID'])) - logger.info('(%s) Conference Bridge: %s, Call Bridged to HBP System: %s TS: %s, TGID: %s', self._system, _bridge, _target['SYSTEM'], _target['TS'], int_id(_target['TGID'])) - if CONFIG['REPORTS']['REPORT']: + # Record the DST TGID and Stream ID + _target_status[_target['TS']]['TX_START'] = pkt_time + _target_status[_target['TS']]['TX_TGID'] = _target['TGID'] + _target_status[_target['TS']]['TX_STREAM_ID'] = _stream_id + _target_status[_target['TS']]['TX_RFS'] = _rf_src + _target_status[_target['TS']]['TX_PEER'] = _peer_id + # Generate LCs (full and EMB) for the TX stream + dst_lc = self.STATUS[_slot]['RX_LC'][0:3] + _target['TGID'] + _rf_src + _target_status[_target['TS']]['TX_H_LC'] = bptc.encode_header_lc(dst_lc) + _target_status[_target['TS']]['TX_T_LC'] = bptc.encode_terminator_lc(dst_lc) + _target_status[_target['TS']]['TX_EMB_LC'] = bptc.encode_emblc(dst_lc) + logger.debug('(%s) Generating TX FULL and EMB LCs for HomeBrew destination: System: %s, TS: %s, TGID: %s', self._system, _target['SYSTEM'], _target['TS'], int_id(_target['TGID'])) + logger.info('(%s) Conference Bridge: %s, Call Bridged to HBP System: %s TS: %s, TGID: %s', self._system, _bridge, _target['SYSTEM'], _target['TS'], int_id(_target['TGID'])) + if CONFIG['REPORTS']['REPORT']: systems[_target['SYSTEM']]._report.send_bridgeEvent('GROUP VOICE,START,TX,{},{},{},{},{},{}'.format(_target['SYSTEM'], int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), _target['TS'], int_id(_target['TGID'])).encode(encoding='utf-8', errors='ignore')) # Set other values for the contention handler to test next time there is a frame to forward @@ -811,7 +811,7 @@ class routerHBP(HBSYSTEM): logger.info('(%s) *CALL END* STREAM ID: %s SUB: %s (%s) PEER: %s (%s) TGID %s (%s), TS %s, Duration: %.2f', \ self._system, int_id(_stream_id), get_alias(_rf_src, subscriber_ids), int_id(_rf_src), get_alias(_peer_id, peer_ids), int_id(_peer_id), get_alias(_dst_id, talkgroup_ids), int_id(_dst_id), _slot, call_duration) if CONFIG['REPORTS']['REPORT']: - self._report.send_bridgeEvent('GROUP VOICE,END,RX,{},{},{},{},{},{},{:.2f}'.format(self._system, int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), _slot, int_id(_dst_id), call_duration).encode(encoding='utf-8', errors='ignore')) + self._report.send_bridgeEvent('GROUP VOICE,END,RX,{},{},{},{},{},{},{:.2f}'.format(self._system, int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), _slot, int_id(_dst_id), call_duration).encode(encoding='utf-8', errors='ignore')) # # Begin in-band signalling for call end. This has nothign to do with routing traffic directly. diff --git a/bridge_master.py b/bridge_master.py index 2edc20f..ca16287 100644 --- a/bridge_master.py +++ b/bridge_master.py @@ -149,7 +149,7 @@ def config_API(_config, _bridges): application = Application([FD_API], - tns='freedmr.api', + tns='adn.api', in_protocol=HttpRpc(validator='soft'), out_protocol=JsonDocument() ) @@ -189,7 +189,7 @@ def make_bridges(_rules): else: _system['TIMER'] = time() - # if _bridge[0:1] == '#': + # if _bridge[0:1] == '#': # continue for _confsystem in CONFIG['SYSTEMS']: @@ -507,10 +507,10 @@ def kaReporting(): if CONFIG['SYSTEMS'][system]['MODE'] == 'OPENBRIDGE': if CONFIG['SYSTEMS'][system]['ENHANCED_OBP']: if '_bcka' not in CONFIG['SYSTEMS'][system]: - logger.warning('(ROUTER) not sending to system %s as KeepAlive never seen',system) + logger.warning('(ROUTER) not sending to system %s as KeepAlive never seen',system) elif CONFIG['SYSTEMS'][system]['_bcka'] < time() - 60: logger.warning('(ROUTER) not sending to system %s as last KeepAlive was %s seconds ago',system, int(time() - CONFIG['SYSTEMS'][system]['_bcka'])) - + #Write SUB_MAP to disk def subMapWrite(): try: @@ -535,7 +535,7 @@ def SubMapTrimmer(): SUB_MAP.pop(_remove) if CONFIG['ALIASES']['SUB_MAP_FILE']: subMapWrite() - + # run this every 10 seconds to trim stream ids def stream_trimmer_loop(): @@ -911,7 +911,7 @@ def options_config(): _options['OVERRIDE_IDENT_TG'] = _options.pop('VOICETG') if 'IDENT' in _options: _options['VOICE'] = _options.pop('IDENT') - + #DMR+ style options if 'StartRef' in _options: _options['DEFAULT_REFLECTOR'] = _options.pop('StartRef') @@ -1474,7 +1474,7 @@ class routerOBP(OPENBRIDGE): if CONFIG['GLOBAL']['DATA_GATEWAY'] and 'DATA-GATEWAY' in CONFIG['SYSTEMS'] and CONFIG['SYSTEMS']['DATA-GATEWAY']['MODE'] == 'OPENBRIDGE' and CONFIG['SYSTEMS']['DATA-GATEWAY']['ENABLED']: logger.debug('(%s) DATA packet sent to DATA-GATEWAY',self._system) self.sendDataToOBP('DATA-GATEWAY',_data,dmrpkt,pkt_time,_stream_id,_dst_id,_peer_id,_rf_src,_bits,_slot,_source_rptr,_ber,_rssi) - + #Send other openbridges for system in systems: @@ -1503,7 +1503,7 @@ class routerOBP(OPENBRIDGE): else: logger.debug('(%s) UNIT Data not bridged to HBP on slot 1 - target busy: %s DST_ID: %s',self._system,_d_system,_int_dst_id) - + else: #If destination ID is logged in as a hotspot for _d_system in systems: @@ -1593,8 +1593,8 @@ class routerOBP(OPENBRIDGE): #LoopControl hr_times = {} for system in systems: - # if system == self._system: - # continue + # if system == self._system: + # continue if system != self._system and CONFIG['SYSTEMS'][system]['MODE'] != 'OPENBRIDGE': for _sysslot in systems[system].STATUS: if 'RX_STREAM_ID' in systems[system].STATUS[_sysslot] and _stream_id == systems[system].STATUS[_sysslot]['RX_STREAM_ID']: @@ -1606,7 +1606,7 @@ class routerOBP(OPENBRIDGE): else: #if _stream_id in systems[system].STATUS and systems[system].STATUS[_stream_id]['START'] <= self.STATUS[_stream_id]['START']: if _stream_id in systems[system].STATUS and '1ST' in systems[system].STATUS[_stream_id] and systems[system].STATUS[_stream_id]['TGID'] == _dst_id: - hr_times[system] = systems[system].STATUS[_stream_id]['1ST'] + hr_times[system] = systems[system].STATUS[_stream_id]['1ST'] #use the minimum perf_counter to ensure #We always use only the earliest packet @@ -1671,7 +1671,7 @@ class routerOBP(OPENBRIDGE): self.STATUS[_stream_id]['lastSeq'] = _seq #Save this packet self.STATUS[_stream_id]['lastData'] = _data - + self.STATUS[_stream_id]['crcs'].add(_pkt_crc) @@ -1704,9 +1704,9 @@ class routerOBP(OPENBRIDGE): logger.info('(%s) *CALL END* STREAM ID: %s SUB: %s (%s) PEER: %s (%s) TGID %s (%s), TS %s, Duration: %.2f, Packet rate: %.2f/s, Loss: %.2f%%', \ self._system, int_id(_stream_id), get_alias(_rf_src, subscriber_ids), int_id(_rf_src), get_alias(_peer_id, peer_ids), int_id(_peer_id), get_alias(_dst_id, talkgroup_ids), int_id(_dst_id), _slot, call_duration, packet_rate,loss) if CONFIG['REPORTS']['REPORT']: - self._report.send_bridgeEvent('GROUP VOICE,END,RX,{},{},{},{},{},{},{:.2f}'.format(self._system, int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), _slot, int_id(_dst_id), call_duration).encode(encoding='utf-8', errors='ignore')) - self.STATUS[_stream_id]['_fin'] = True - + self._report.send_bridgeEvent('GROUP VOICE,END,RX,{},{},{},{},{},{},{:.2f}'.format(self._system, int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), _slot, int_id(_dst_id), call_duration).encode(encoding='utf-8', errors='ignore')) + self.STATUS[_stream_id]['_fin'] = True + self.STATUS[_stream_id]['lastSeq'] = False class routerHBP(HBSYSTEM): @@ -1949,7 +1949,7 @@ class routerHBP(HBSYSTEM): # Transmit the packet to the destination system systems[_target['SYSTEM']].send_system(_tmp_data,b'',_ber,_rssi,_source_server, _source_rptr) - + return _sysIgnore def sendDataToHBP(self,_d_system,_d_slot,_dst_id,_tmp_bits,_data,dmrpkt,_rf_src,_stream_id,_peer_id): @@ -1963,7 +1963,7 @@ class routerHBP(HBSYSTEM): systems[_d_system]._report.send_bridgeEvent('UNIT DATA,DATA,TX,{},{},{},{},{},{}'.format(_d_system, int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), 1, _int_dst_id).encode(encoding='utf-8', errors='ignore')) def sendDataToOBP(self,_target,_data,dmrpkt,pkt_time,_stream_id,_dst_id,_peer_id,_rf_src,_bits,_slot,_hops = b'',_ber = b'\x00', _rssi = b'\x00',_source_server = b'\x00\x00\x00\x00', _source_rptr = b'\x00\x00\x00\x00'): - # _sysIgnore = sysIgnore +# _sysIgnore = sysIgnore _source_server = self._CONFIG['GLOBAL']['SERVER_ID'] _source_rptr = _peer_id _int_dst_id = int_id(_dst_id) @@ -2059,14 +2059,14 @@ class routerHBP(HBSYSTEM): #_bits = header(_slot,'unit',_bits) #logger.info('(%s) Type Rewrite - GPS data from ID: %s, on TG 900999 rewritten to unit call to ID 900999 : bits %s',self._system,int_id(_rf_src),_bits) #_call_type == 'unit' - + #Rewrite incoming loro request to group call #if _call_type == 'unit' and _int_dst_id == 9990: #_bits = header(_slot,'group',_bits) #logger.info('(%s) Type Rewrite - Echo data from ID: %s, on PC 9990 rewritten to group call to TG 9990',self._system,int_id(_rf_src)) #_call_type == 'group' - - + + if _call_type == 'unit' and (_dtype_vseq == 6 or _dtype_vseq == 7 or _dtype_vseq == 8 or (_stream_id != self.STATUS[_slot]['RX_STREAM_ID'] and _dtype_vseq == 3)): _data_call = True @@ -2145,7 +2145,7 @@ class routerHBP(HBSYSTEM): else: logger.debug('(%s) UNIT Data not bridged to HBP on slot %s - target busy: %s DST_ID: %s',self._system,_d_slot,_d_system,_int_dst_id) - + else: #If destination ID is logged in as a hotspot for _d_system in systems: @@ -2174,7 +2174,7 @@ class routerHBP(HBSYSTEM): #Handle AMI private calls if _call_type == 'unit' and not _data_call and self.STATUS[_slot]['_allStarMode'] and CONFIG['ALLSTAR']['ENABLED']: if (_stream_id != self.STATUS[_slot]['RX_STREAM_ID']): - logger.info('(%s) AMI: Private call from %s to %s',self._system, int_id(_rf_src), _int_dst_id) + logger.info('(%s) AMI: Private call from %s to %s',self._system, int_id(_rf_src), _int_dst_id) if (_frame_type == HBPF_DATA_SYNC) and (_dtype_vseq == HBPF_SLT_VTERM) and (self.STATUS[_slot]['RX_TYPE'] != HBPF_SLT_VTERM): @@ -2302,8 +2302,8 @@ class routerHBP(HBSYSTEM): logger.info('(%s) Reflector: voice called - 4000 "not linked"', self._system) _say.append(words[_lang]['notlinked']) _say.append(words[_lang]['silence']) - - #If status called + + #If status called elif _int_dst_id == 5000: _active = False for _bridge in BRIDGES: @@ -2350,7 +2350,7 @@ class routerHBP(HBSYSTEM): for num in str(_int_dst_id): _say.append(words[_lang][num]) - + if _say: speech = pkt_gen(bytes_3(5000), _nine, bytes_4(9), 1, _say) #call speech in a thread as it contains sleep() and hence could block the reactor @@ -2501,7 +2501,7 @@ class routerHBP(HBSYSTEM): self.STATUS[_slot]['lastSeq'] = _seq #Save this packet self.STATUS[_slot]['lastData'] = _data - + _sysIgnore = deque() for _bridge in BRIDGES: #if _bridge[0:1] != '#': @@ -2529,7 +2529,7 @@ class routerHBP(HBSYSTEM): logger.info('(%s) *CALL END* STREAM ID: %s SUB: %s (%s) PEER: %s (%s) TGID %s (%s), TS %s, Duration: %.2f, Packet rate: %.2f/s, LOSS: %.2f%%', \ self._system, int_id(_stream_id), get_alias(_rf_src, subscriber_ids), int_id(_rf_src), get_alias(_peer_id, peer_ids), int_id(_peer_id), get_alias(_dst_id, talkgroup_ids), int_id(_dst_id), _slot, call_duration, packet_rate, loss) if CONFIG['REPORTS']['REPORT']: - self._report.send_bridgeEvent('GROUP VOICE,END,RX,{},{},{},{},{},{},{:.2f}'.format(self._system, int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), _slot, int_id(_dst_id), call_duration).encode(encoding='utf-8', errors='ignore')) + self._report.send_bridgeEvent('GROUP VOICE,END,RX,{},{},{},{},{},{},{:.2f}'.format(self._system, int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), _slot, int_id(_dst_id), call_duration).encode(encoding='utf-8', errors='ignore')) #Reset back to False self.STATUS[_slot]['lastSeq'] = False @@ -2904,7 +2904,7 @@ if __name__ == '__main__': words[lang][_mapword] = words[lang][_map[_mapword]] # HBlink instance creation - logger.info('(GLOBAL) FreeDMR \'bridge_master.py\' -- SYSTEM STARTING...') + logger.info('(GLOBAL) ADN \'bridge_master.py\' -- SYSTEM STARTING...') listeningPorts = {} @@ -2958,7 +2958,7 @@ if __name__ == '__main__': stream_trimmer_task = task.LoopingCall(stream_trimmer_loop) stream_trimmer = stream_trimmer_task.start(5) stream_trimmer.addErrback(loopingErrHandle) - + # Ident #This runs in a thread so as not to block the reactor ident_task = task.LoopingCall(threadIdent) diff --git a/config.py b/config.py index 83bbf1c..1aae971 100755 --- a/config.py +++ b/config.py @@ -169,7 +169,7 @@ def build_config(_config_file): 'LOG_FILE': config.get(section, 'LOG_FILE', fallback='/dev/null'), 'LOG_HANDLERS': config.get(section, 'LOG_HANDLERS', fallback='console-timed'), 'LOG_LEVEL': config.get(section, 'LOG_LEVEL', fallback='INFO'), - 'LOG_NAME': config.get(section, 'LOG_NAME', fallback='FreeDMR') + 'LOG_NAME': config.get(section, 'LOG_NAME', fallback='ADN') }) @@ -406,7 +406,7 @@ if __name__ == '__main__': # CLI argument parser - handles picking up the config file from the command line, and sending a "help" message parser = argparse.ArgumentParser() - parser.add_argument('-c', '--config', action='store', dest='CONFIG_FILE', help='/full/path/to/config.file (usually freedmr.cfg)') + parser.add_argument('-c', '--config', action='store', dest='CONFIG_FILE', help='/full/path/to/config.file (usually adn.cfg)') cli_args = parser.parse_args() diff --git a/hotspot_proxy_self_service.py b/hotspot_proxy_self_service.py index 86d971d..e3782fc 100644 --- a/hotspot_proxy_self_service.py +++ b/hotspot_proxy_self_service.py @@ -329,7 +329,7 @@ class Proxy(DatagramProtocol): if data[8:].upper().startswith(b"PASS="): _psswd = data[13:] if len(_psswd) >= 6: - dk = pbkdf2_hmac("sha256", _psswd, b"FreeDMR", 2000).hex() + dk = pbkdf2_hmac("sha256", _psswd, b"ADN", 2000).hex() self.db_proxy.updt_tbl("psswd", _peer_id, psswd=dk) self.transport.write(b"".join([RPTACK, _peer_id]), addr) print(f"Password stored for: {int_id(_peer_id)}") @@ -454,7 +454,7 @@ if __name__ == "__main__": "--config", action="store", dest="CONFIG_FILE", - help="/full/path/to/config.file (usually freedmr.cfg)", + help="/full/path/to/config.file (usually adn.cfg)", ) cli_args = parser.parse_args() diff --git a/hotspot_proxy_v2.py b/hotspot_proxy_v2.py index 0878cfc..d7aae74 100644 --- a/hotspot_proxy_v2.py +++ b/hotspot_proxy_v2.py @@ -301,7 +301,7 @@ if __name__ == '__main__': # CLI argument parser - handles picking up the config file from the command line, and sending a "help" message parser = argparse.ArgumentParser() - parser.add_argument('-c', '--config', action='store', dest='CONFIG_FILE', help='/full/path/to/config.file (usually freedmr.cfg)') + parser.add_argument('-c', '--config', action='store', dest='CONFIG_FILE', help='/full/path/to/config.file (usually adn.cfg)') cli_args = parser.parse_args() diff --git a/i8n_voice_map.py b/i8n_voice_map.py index cd215b9..6af187c 100644 --- a/i8n_voice_map.py +++ b/i8n_voice_map.py @@ -115,7 +115,7 @@ voiceMap = { 'en_US': { 'to': '2', - 'freedmr': 'silence', + 'adn': 'silence', 'this-is': 'silence', 'allstar-link-mode': 'alpha' }, @@ -269,7 +269,7 @@ voiceMap = { 'dk_DK': { 'to': 'silence', - 'freedmr': 'silence', + 'adn': 'silence', 'this-is': 'silence', 'allstar-link-mode': 'A' @@ -277,35 +277,35 @@ voiceMap = { 'it_IT': { 'to': 'silence', - 'freedmr': 'silence', + 'adn': 'silence', 'this-is': 'silence', 'allstar-link-mode': 'A' }, 'no_NO': { 'to': 'silence', - 'freedmr': 'silence', + 'adn': 'silence', 'this-is': 'silence', 'allstar-link-mode': 'A' }, 'pl_PL': { 'to': 'silence', - 'freedmr': 'silence', + 'adn': 'silence', 'this-is': 'silence', 'allstar-link-mode': 'A' }, 'se_SE': { 'to': 'silence', - 'freedmr': 'silence', + 'adn': 'silence', 'this-is': 'silence', 'allstar-link-mode': 'A' }, 'CW': { 'to': 'silence', - 'freedmr': 'silence', + 'adn': 'silence', 'this-is': 'silence', 'linkedto': 'silence', 'allstar-link-mode': 'T' diff --git a/playback_file.py b/playback_file.py index cf76cdf..1be8aa5 100644 --- a/playback_file.py +++ b/playback_file.py @@ -270,7 +270,7 @@ if __name__ == '__main__': report_server = config_reports(CONFIG, reportFactory) # HBlink instance creation - logger.info('FreeDMR \'playback_file.py\' (c) 2022 Simon Adlem based on work from 2017-2019 Cort Buffington, N0MJS & Mike Zingman, N4IRR -- SYSTEM STARTING...') + logger.info('ADN \'playback_file.py\' (c) 2022 Simon Adlem based on work from 2017-2019 Cort Buffington, N0MJS & Mike Zingman, N4IRR -- SYSTEM STARTING...') for system in CONFIG['SYSTEMS']: if CONFIG['SYSTEMS'][system]['ENABLED']: if CONFIG['SYSTEMS'][system]['MODE'] == 'OPENBRIDGE': diff --git a/report_receiver.py b/report_receiver.py index 97893fd..383366d 100644 --- a/report_receiver.py +++ b/report_receiver.py @@ -16,7 +16,7 @@ # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ############################################################################### -#This is example code to connect to the report service in FreeDMR / HBLink3 +#This is example code to connect to the report service in ADN / HBLink3 #It can be used as a skeleton to build logging and monitoring tools. import pickle diff --git a/report_sql.py b/report_sql.py index 92ccf99..ed1e2d0 100644 --- a/report_sql.py +++ b/report_sql.py @@ -24,7 +24,7 @@ __license__ = 'GNU GPLv3' __maintainer__ = 'Simon Adlem G7RZU' __email__ = 'simon@gb7fr.org.uk' -#This is example code to connect to the report service in FreeDMR / HBLink3 +#This is example code to connect to the report service in ADN / HBLink3 #It can be used as a skeleton to build logging and monitoring tools. import pickle diff --git a/rules_SAMPLE.py b/rules_SAMPLE.py index 6270d72..4732c71 100755 --- a/rules_SAMPLE.py +++ b/rules_SAMPLE.py @@ -1,7 +1,7 @@ ''' THIS EXAMPLE WILL NOT WORK AS IT IS - YOU MUST SPECIFY YOUR OWN VALUES!!! -In FreeDMR, the rules file should be *empty* unless you have static routing required. Please see the +In ADN, the rules file should be *empty* unless you have static routing required. Please see the documentation for more details. This file is organized around the "Conference Bridges" that you wish to use. If you're a c-Bridge diff --git a/systemd-scripts/adn.service b/systemd-scripts/adn.service new file mode 100644 index 0000000..6dff3b6 --- /dev/null +++ b/systemd-scripts/adn.service @@ -0,0 +1,11 @@ +[Unit] +Description= ADN DMR Repeaters Service +After=syslog.target network.target + +[Service] +User=root +WorkingDirectory=/opt/adn +ExecStart=/usr/bin/python3 bridge_master.py -c ./config/adn.cfg -r ./config/rules.py + +[Install] +WantedBy=multi-user.target diff --git a/systemd-scripts/freedmrrepeater.service b/systemd-scripts/freedmrrepeater.service deleted file mode 100644 index 7caa330..0000000 --- a/systemd-scripts/freedmrrepeater.service +++ /dev/null @@ -1,25 +0,0 @@ -[Unit] - -Description= FreeDMR Repeaters Service - - - -After=syslog.target network.target - - - -[Service] -User=root - -WorkingDirectory=/opt/FreeDMR - -ExecStart=/usr/bin/python3 bridge_master.py -c ./config/hblink.cfg -r ./config/rules.py - - - - - - -[Install] -WantedBy=multi-user.target - diff --git a/utils.py b/utils.py index df85a89..6fdda96 100644 --- a/utils.py +++ b/utils.py @@ -20,7 +20,7 @@ #Some utilty functions from dmr_utils3 have been modified. These live here. -# Also new FreeDMR specific functions. +# Also new ADN specific functions. import ssl from time import time