diff --git a/bridge.py b/bridge.py index f60f45c..e5f7230 100755 --- a/bridge.py +++ b/bridge.py @@ -439,9 +439,18 @@ class routerOBP(OPENBRIDGE): pkt_time = time() dmrpkt = _data[20:53] _bits = _data[15] + + # Check if subscriber is in STATIC_UNIT + for i in STATIC_UNIT: + # Subscriber is static. Add 20 years of time. + if i[0] == int_id(_rf_src): + map_time = pkt_time + time_20 + # Proceed as normal + else: + map_time = pkt_time # Make/update this unit in the UNIT_MAP cache - UNIT_MAP[_rf_src] = (self.name, pkt_time) + UNIT_MAP[_rf_src] = (self.name, map_time) # Is this a new call stream? @@ -922,6 +931,16 @@ class routerHBP(HBSYSTEM): dmrpkt = _data[20:53] _bits = _data[15] + # Check if subscriber is in STATIC_UNIT + for i in STATIC_UNIT: + # Subscriber is static. Add 20 years of time. + if i[0] == int_id(_rf_src): + map_time = pkt_time + time_20 + # Proceed as normal + else: + map_time = pkt_time + + # Make/update this unit in the UNIT_MAP cache UNIT_MAP[_rf_src] = (self.name, pkt_time) diff --git a/rules_SAMPLE.py b/rules_SAMPLE.py index 4470117..661d2d9 100755 --- a/rules_SAMPLE.py +++ b/rules_SAMPLE.py @@ -54,12 +54,19 @@ list the names of each system that should bridge unit to unit (individual) calls UNIT = ['ONE', 'TWO'] ''' -The amount of time to keep sending private calls to a system before flooding again +Unit Call flood timeout: +The amount of time to keep sending private calls to a single system before +flooding all systems with the call. A higher value should be set for systems where subscribers +are not moving between systems often. A lower value should be set for systems that have subscribers +moving between systems often. + +Time is in minutes. ''' UNIT_TIME = 15 ''' -Input the DMR ID and SYSTEM of a subscriber that you would like to have always have private calls routed. This will not flood all systems. +Input the DMR ID and SYSTEM of a subscriber that you would like to have always have private calls routed. +This will not flood all systems. ''' STATIC_UNIT = [ [ 123, 'CLIENT-1'],