From 202280e8d9e0222953179b8ef0bc7cac36f2a261 Mon Sep 17 00:00:00 2001 From: Cort Buffington Date: Wed, 17 May 2017 15:22:24 -0500 Subject: [PATCH] Fix Compatibility with Brandmeister MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit apparently they don’t increment the call sequence ID on each transmission, you know, like the standard says to do. --- confbridge.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/confbridge.py b/confbridge.py index de79681..a1aa5dd 100755 --- a/confbridge.py +++ b/confbridge.py @@ -355,9 +355,9 @@ class confbridgeIPSC(IPSC): # Action happens on key up if _burst_data_type == BURST_DATA_TYPE['VOICE_HEAD']: self._logger.info('(%s) GROUP VOICE START - DEBUGGING MESSAGE', self._system,) - if self.last_seq_id != _seq_id: + if self.last_seq_id != _seq_id or (self.call_start + TS_CLEAR_TIME) < now: self.last_seq_id = _seq_id - self.call_start = time() + self.call_start = now self._logger.info('(%s) GROUP VOICE START: CallID: %s PEER: %s, SUB: %s, TS: %s, TGID: %s', self._system, int_id(_seq_id), int_id(_peerid), int_id(_src_sub), _ts, int_id(_dst_group)) if self._CONFIG['REPORTS']['REPORT_NETWORKS'] == 'NETWORK': self._report.send_bridgeEvent('DEBUGGING - this should be immediately followed by a GROUP VOICE START message') @@ -366,7 +366,7 @@ class confbridgeIPSC(IPSC): # Action happens on un-key if _burst_data_type == BURST_DATA_TYPE['VOICE_TERM']: if self.last_seq_id == _seq_id: - self.call_duration = time() - self.call_start + self.call_duration = now - self.call_start self._logger.info('(%s) GROUP VOICE END: CallID: %s PEER: %s, SUB: %s, TS: %s, TGID: %s Duration: %s', self._system, int_id(_seq_id), int_id(_peerid), int_id(_src_sub), _ts, int_id(_dst_group), self.call_duration) if self._CONFIG['REPORTS']['REPORT_NETWORKS'] == 'NETWORK': self._report.send_bridgeEvent('({}) GROUP VOICE END: CallID: {} PEER: {}, SUB: {}, TS: {}, TGID: {} Duration: {}'.format(self._system, int_id(_seq_id), int_id(_peerid), int_id(_src_sub), _ts, int_id(_dst_group), self.call_duration))