diff --git a/bridge_master.py b/bridge_master.py index a2bb5e9..352ff7b 100755 --- a/bridge_master.py +++ b/bridge_master.py @@ -549,6 +549,60 @@ def options_config(): _options[k] = v logger.debug('(OPTIONS) Options found for %s',_system) + if 'DIAL' in _options: + _options['DEFAULT_REFLECTOR'] = _options.pop('DIAL') + if 'TIMER' in _options: + _options['DEFAULT_UA_TIMER'] = _options.pop('TIMER') + if 'TS1' in _options: + _options['TS1_STATIC'] = _options.pop('TS1') + if 'TS2' in _options: + _options['TS2_STATIC'] = _options.pop('TS2') + + #DMR+ style options + if 'StartRef' in _options: + _options['DEFAULT_REFLECTOR'] = _options.pop('StartRef') + if 'RelinkTime' in _options: + _options['DEFAULT_UA_TIMER'] = _options.pop('RelinkTime') + if 'TS1_1' in _options: + _options['TS1_STATIC'] = _options.pop('TS1_1') + if 'TS1_2' in _options: + _options['TS1_STATIC'] = _options['TS1_STATIC'] + ',' + _options.pop('TS1_2') + if 'TS1_3' in _options: + _options['TS1_STATIC'] = _options['TS1_STATIC'] + ',' + _options.pop('TS1_3') + if 'TS1_4' in _options: + _options['TS1_STATIC'] = _options['TS1_STATIC'] + ',' + _options.pop('TS1_4') + if 'TS1_4' in _options: + _options['TS1_STATIC'] = _options['TS1_STATIC'] + ',' + _options.pop('TS1_5') + if 'TS2_2' in _options: + _options['TS2_STATIC'] = _options.pop('TS2_1') + if 'TS2_2' in _options: + _options['TS2_STATIC'] = _options['TS2_STATIC'] + ',' + _options.pop('TS2_2') + if 'TS2_3' in _options: + _options['TS2_STATIC'] = _options['TS2_STATIC'] + ',' + _options.pop('TS2_3') + if 'TS2_4' in _options: + _options['TS2_STATIC'] = _options['TS2_STATIC'] + ',' + _options.pop('TS2_4') + if 'TS2_4' in _options: + _options['TS2_STATIC'] = _options['TS2_STATIC'] + ',' + _options.pop('TS2_5') + if 'UserLink' in _options: + _options.pop('UserLink') + + if 'TS1_STATIC' not in _options: + _options['TS1_STATIC'] = False + + if 'TS2_STATIC' not in _options: + _options['TS2_STATIC'] = False + + if 'DEFAULT_REFLECTOR' not in _options: + _options['DEFAULT_REFLECTOR'] = 0 + + if 'DEFAULT_UA_TIMER' not in _options: + _options['DEFAULT_UA_TIMER'] = CONFIG['SYSTEMS'][_system]['DEFAULT_UA_TIMER'] + + if 'VOICE' in _options and (CONFIG['SYSTEMS'][_system]['VOICE_IDENT'] != bool(int(_options['VOICE']))): + CONFIG['SYSTEMS'][_system]['VOICE_IDENT'] = bool(int(_options['VOICE'])) + logger.debug("(OPTIONS) %s - Setting voice ident to %s",_system,CONFIG['SYSTEMS'][_system]['VOICE_IDENT']) + + if 'TS1_STATIC' not in _options or 'TS2_STATIC' not in _options or 'DEFAULT_REFLECTOR' not in _options or 'DEFAULT_UA_TIMER' not in _options: logger.debug('(OPTIONS) %s - Required field missing, ignoring',_system) continue diff --git a/docker-configs/entrypoint-hdstack b/docker-configs/entrypoint-hdstack index 837948f..de4276c 100755 --- a/docker-configs/entrypoint-hdstack +++ b/docker-configs/entrypoint-hdstack @@ -3,5 +3,5 @@ cd /opt/freedmr python /opt/freedmr/hdstack/hotspot_proxy_v2.py & python /opt/freedmr/bridge_master.py -c freedmr.cfg -r rules.py & -python /opt/freedmr/bridge_master.py -c hdstack/stack1.cfg -r rules.py & -python /opt/freedmr/bridge_master.py -c hdstack/stack2.cfg -r rules.py & +python /opt/freedmr/bridge_master.py -c hdstack/hdstack1.cfg -r rules.py & +python /opt/freedmr/bridge_master.py -c hdstack/hdstack2.cfg -r rules.py & diff --git a/hdstack/freebridge.cfg b/hdstack/freebridge.cfg index 9acf606..449752d 100644 --- a/hdstack/freebridge.cfg +++ b/hdstack/freebridge.cfg @@ -46,11 +46,11 @@ TABLE: repeaters MODE: OPENBRIDGE ENABLED: True IP: 127.0.0.1 -PORT: 70001 +PORT: 7001 NETWORK_ID: 3 PASSPHRASE: internal TARGET_IP: 127.0.0.1 -TARGET_PORT: 70001 +TARGET_PORT: 7001 USE_ACL: True SUB_ACL: DENY:1 TGID_ACL: PERMIT:ALL @@ -60,11 +60,11 @@ RELAX_CHECKS: True MODE: OPENBRIDGE ENABLED: True IP: 127.0.0.1 -PORT: 70002 +PORT: 7002 NETWORK_ID: 4 PASSPHRASE: internal TARGET_IP: 127.0.0.1 -TARGET_PORT: 70002 +TARGET_PORT: 7002 USE_ACL: True SUB_ACL: DENY:1 TGID_ACL: PERMIT:ALL diff --git a/hdstack/hdstack1.cfg b/hdstack/hdstack1.cfg index 3111d67..0b6e158 100644 --- a/hdstack/hdstack1.cfg +++ b/hdstack/hdstack1.cfg @@ -46,11 +46,11 @@ TABLE: repeaters MODE: OPENBRIDGE ENABLED: True IP: 127.0.0.1 -PORT: 70001 +PORT: 7001 NETWORK_ID: 1 PASSPHRASE: internal TARGET_IP: 127.0.0.1 -TARGET_PORT: 70001 +TARGET_PORT: 7001 USE_ACL: True SUB_ACL: DENY:1 TGID_ACL: PERMIT:ALL diff --git a/hdstack/hdstack2.cfg b/hdstack/hdstack2.cfg index 6bda71c..44f5371 100644 --- a/hdstack/hdstack2.cfg +++ b/hdstack/hdstack2.cfg @@ -46,11 +46,11 @@ TABLE: repeaters MODE: OPENBRIDGE ENABLED: True IP: 127.0.0.1 -PORT: 70002 +PORT: 7002 NETWORK_ID: 2 PASSPHRASE: internal TARGET_IP: 127.0.0.1 -TARGET_PORT: 70002 +TARGET_PORT: 7002 USE_ACL: True SUB_ACL: DENY:1 TGID_ACL: PERMIT:ALL