|
|
|
@ -1466,6 +1466,7 @@ class routerOBP(OPENBRIDGE):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def dmrd_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data,_hash, _hops = b'', _source_server = b'\x00\x00\x00\x00', _ber = b'\x00', _rssi = b'\x00'):
|
|
|
|
def dmrd_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data,_hash, _hops = b'', _source_server = b'\x00\x00\x00\x00', _ber = b'\x00', _rssi = b'\x00'):
|
|
|
|
|
|
|
|
|
|
|
|
pkt_time = time()
|
|
|
|
pkt_time = time()
|
|
|
|
dmrpkt = _data[20:53]
|
|
|
|
dmrpkt = _data[20:53]
|
|
|
|
_bits = _data[15]
|
|
|
|
_bits = _data[15]
|
|
|
|
@ -1657,8 +1658,8 @@ class routerOBP(OPENBRIDGE):
|
|
|
|
_inthops = 0
|
|
|
|
_inthops = 0
|
|
|
|
if _hops:
|
|
|
|
if _hops:
|
|
|
|
_inthops = int.from_bytes(_hops,'big')
|
|
|
|
_inthops = int.from_bytes(_hops,'big')
|
|
|
|
logger.info('(%s) *CALL START* STREAM ID: %s SUB: %s (%s) PEER: %s (%s) TGID %s (%s), TS %s, SRC: %s, BER: %s, RSSI -%sdBm, HOPS %s', \
|
|
|
|
logger.info('(%s) *CALL START* STREAM ID: %s SUB: %s (%s) PEER: %s (%s) TGID %s (%s), TS %s, SRC: %s, HOPS %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,int_id(_source_server),int.from_bytes(_ber,'big'),int.from_bytes(_rssi,'big'),_inthops)
|
|
|
|
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,int_id(_source_server),_inthops)
|
|
|
|
if CONFIG['REPORTS']['REPORT']:
|
|
|
|
if CONFIG['REPORTS']['REPORT']:
|
|
|
|
self._report.send_bridgeEvent('GROUP VOICE,START,RX,{},{},{},{},{},{}'.format(self._system, int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), _slot, int_id(_dst_id)).encode(encoding='utf-8', errors='ignore'))
|
|
|
|
self._report.send_bridgeEvent('GROUP VOICE,START,RX,{},{},{},{},{},{}'.format(self._system, int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), _slot, int_id(_dst_id)).encode(encoding='utf-8', errors='ignore'))
|
|
|
|
|
|
|
|
|
|
|
|
@ -1785,8 +1786,8 @@ class routerOBP(OPENBRIDGE):
|
|
|
|
packet_rate = 0
|
|
|
|
packet_rate = 0
|
|
|
|
if call_duration:
|
|
|
|
if call_duration:
|
|
|
|
packet_rate = self.STATUS[_stream_id]['packets'] / call_duration
|
|
|
|
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, BER: %s, RSSI: -%sdBm Packet rate: %.2f/s', \
|
|
|
|
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, int.from_bytes(_ber,'big'),int.from_bytes(_rssi,'big'), packet_rate)
|
|
|
|
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)
|
|
|
|
if CONFIG['REPORTS']['REPORT']:
|
|
|
|
if CONFIG['REPORTS']['REPORT']:
|
|
|
|
self._report.send_bridgeEvent('GROUP VOICE,END,RX,{},{},{},{},{},{},{:.2f}'.format(self._system, int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), _slot, int_id(_dst_id), call_duration).encode(encoding='utf-8', errors='ignore'))
|
|
|
|
self._report.send_bridgeEvent('GROUP VOICE,END,RX,{},{},{},{},{},{},{:.2f}'.format(self._system, int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), _slot, int_id(_dst_id), call_duration).encode(encoding='utf-8', errors='ignore'))
|
|
|
|
self.STATUS[_stream_id]['_fin'] = True
|
|
|
|
self.STATUS[_stream_id]['_fin'] = True
|
|
|
|
@ -2580,8 +2581,8 @@ class routerHBP(HBSYSTEM):
|
|
|
|
call_duration = pkt_time - self.STATUS[_slot]['RX_START']
|
|
|
|
call_duration = pkt_time - self.STATUS[_slot]['RX_START']
|
|
|
|
if call_duration:
|
|
|
|
if call_duration:
|
|
|
|
packet_rate = self.STATUS[_slot]['packets'] / call_duration
|
|
|
|
packet_rate = self.STATUS[_slot]['packets'] / call_duration
|
|
|
|
logger.info('(%s) *CALL END* STREAM ID: %s SUB: %s (%s) PEER: %s (%s) TGID %s (%s), TS %s, Duration: %.2f, BER: %s, RSSI: -%sdBm, Packet rate: %.2f/s', \
|
|
|
|
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,int.from_bytes(_ber,'big'), int.from_bytes(_rssi,'big'), packet_rate)
|
|
|
|
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)
|
|
|
|
if CONFIG['REPORTS']['REPORT']:
|
|
|
|
if CONFIG['REPORTS']['REPORT']:
|
|
|
|
self._report.send_bridgeEvent('GROUP VOICE,END,RX,{},{},{},{},{},{},{:.2f}'.format(self._system, int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), _slot, int_id(_dst_id), call_duration).encode(encoding='utf-8', errors='ignore'))
|
|
|
|
self._report.send_bridgeEvent('GROUP VOICE,END,RX,{},{},{},{},{},{},{:.2f}'.format(self._system, int_id(_stream_id), int_id(_peer_id), int_id(_rf_src), _slot, int_id(_dst_id), call_duration).encode(encoding='utf-8', errors='ignore'))
|
|
|
|
|
|
|
|
|
|
|
|
|