diff --git a/bridge_master.py b/bridge_master.py index a797c71..181655b 100644 --- a/bridge_master.py +++ b/bridge_master.py @@ -1675,7 +1675,10 @@ class routerOBP(OPENBRIDGE): if self._system != fi: if 'LOOPLOG' not in self.STATUS[_stream_id] or not self.STATUS[_stream_id]['LOOPLOG']: - logger.warning("(%s) OBP *LoopControl* FIRST OBP %s, STREAM ID: %s, TG %s, IGNORE THIS SOURCE",self._system, fi, int_id(_stream_id), int_id(_dst_id)) + call_duration = pkt_time - self.STATUS[_stream_id]['START'] + packet_rate = 0 + packet_rate = self.STATUS[_stream_id]['packets'] / call_duration + logger.warning("(%s) OBP *LoopControl* FIRST OBP %s, STREAM ID: %s, TG %s, IGNORE THIS SOURCE. PACKET RATE %0.2f",self._system, fi, int_id(_stream_id), int_id(_dst_id),call_duration) self.STATUS[_stream_id]['LOOPLOG'] = True self.STATUS[_stream_id]['LAST'] = pkt_time @@ -1737,8 +1740,7 @@ class routerOBP(OPENBRIDGE): # Final actions - Is this a voice terminator? if (_frame_type == HBPF_DATA_SYNC) and (_dtype_vseq == HBPF_SLT_VTERM): call_duration = pkt_time - self.STATUS[_stream_id]['START'] - packet_rate = 100 - #if 'packets' in self.STATUS[_stream_id]: + packet_rate = 0 packet_rate = self.STATUS[_stream_id]['packets'] / call_duration 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', \ 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)