From d4c312eaee6a41e92a73b5cb6082c5ce942e9b97 Mon Sep 17 00:00:00 2001 From: Cort Buffington Date: Tue, 13 Feb 2018 19:16:45 -0600 Subject: [PATCH] Fixed logging problem from previous updates --- hb_bridge_all.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hb_bridge_all.py b/hb_bridge_all.py index 6cb69dc..5fc7e5c 100755 --- a/hb_bridge_all.py +++ b/hb_bridge_all.py @@ -172,6 +172,11 @@ class bridgeallSYSTEM(HBSYSTEM): self._logger.info('(%s) *CALL START* STREAM ID: %s SUB: %s (%s) REPEATER: %s (%s) TGID %s (%s), TS %s', \ self._system, int_id(_stream_id), get_alias(_rf_src, subscriber_ids), int_id(_rf_src), get_alias(_radio_id, peer_ids), int_id(_radio_id), get_alias(_dst_id, talkgroup_ids), int_id(_dst_id), _slot) + # Final actions - Is this a voice terminator? + if (_frame_type == hb_const.HBPF_DATA_SYNC) and (_dtype_vseq == hb_const.HBPF_SLT_VTERM) and (self.STATUS[_slot]['RX_TYPE'] != hb_const.HBPF_SLT_VTERM): + call_duration = pkt_time - self.STATUS['RX_START'] + self._logger.info('(%s) *CALL END* STREAM ID: %s SUB: %s (%s) REPEATER: %s (%s) TGID %s (%s), TS %s, Duration: %s', \ + self._system, int_id(_stream_id), get_alias(_rf_src, subscriber_ids), int_id(_rf_src), get_alias(_radio_id, peer_ids), int_id(_radio_id), get_alias(_dst_id, talkgroup_ids), int_id(_dst_id), _slot, call_duration) # Mark status variables for use later self.STATUS[_slot]['RX_RFS'] = _rf_src @@ -217,11 +222,7 @@ class bridgeallSYSTEM(HBSYSTEM): #self._logger.debug('(%s) Packet routed to system: %s', self._system, _target) - # Final actions - Is this a voice terminator? - if (_frame_type == hb_const.HBPF_DATA_SYNC) and (_dtype_vseq == hb_const.HBPF_SLT_VTERM) and (self.STATUS[_slot]['RX_TYPE'] != hb_const.HBPF_SLT_VTERM): - call_duration = pkt_time - self.STATUS['RX_START'] - self._logger.info('(%s) *CALL END* STREAM ID: %s SUB: %s (%s) REPEATER: %s (%s) TGID %s (%s), TS %s, Duration: %s', \ - self._system, int_id(_stream_id), get_alias(_rf_src, subscriber_ids), int_id(_rf_src), get_alias(_radio_id, peer_ids), int_id(_radio_id), get_alias(_dst_id, talkgroup_ids), int_id(_dst_id), _slot, call_duration) +