Added Timestamp
This commit is contained in:
parent
6edf3ef978
commit
9ac7727b7a
10
ipsc.py
10
ipsc.py
@ -19,6 +19,7 @@ import hmac
|
|||||||
import hashlib
|
import hashlib
|
||||||
import socket
|
import socket
|
||||||
import csv
|
import csv
|
||||||
|
import time
|
||||||
|
|
||||||
#************************************************
|
#************************************************
|
||||||
# IMPORTING OTHER FILES - '#include'
|
# IMPORTING OTHER FILES - '#include'
|
||||||
@ -143,6 +144,7 @@ def xcmp_xnl(_network, _data):
|
|||||||
|
|
||||||
def group_voice(_network, _data):
|
def group_voice(_network, _data):
|
||||||
# _log = logger.debug
|
# _log = logger.debug
|
||||||
|
_time = time.strftime('%H:%M:%S')
|
||||||
_src_sub = int(binascii.b2a_hex(_data[6:9]), 16)
|
_src_sub = int(binascii.b2a_hex(_data[6:9]), 16)
|
||||||
_dst_group = int(binascii.b2a_hex(_data[9:12]), 16)
|
_dst_group = int(binascii.b2a_hex(_data[9:12]), 16)
|
||||||
_src_ipsc = int(binascii.b2a_hex(_data[1:5]), 16)
|
_src_ipsc = int(binascii.b2a_hex(_data[1:5]), 16)
|
||||||
@ -155,20 +157,20 @@ def group_voice(_network, _data):
|
|||||||
if _call == '00':
|
if _call == '00':
|
||||||
if (_network, 'Slot 1') not in ACTIVE_CALLS:
|
if (_network, 'Slot 1') not in ACTIVE_CALLS:
|
||||||
ACTIVE_CALLS.append((_network, 'Slot 1'))
|
ACTIVE_CALLS.append((_network, 'Slot 1'))
|
||||||
print('({}) CALL START Group Voice: \n\tIPSC Source:\t{}\n\tSubscriber:\t{}\n\tDestination:\t{}\n\tTimeslot\t1' .format(_network, _src_ipsc, _src_sub, _dst_group))
|
print('{} ({}) CALL START Group Voice: \n\tIPSC Source:\t{}\n\tSubscriber:\t{}\n\tDestination:\t{}\n\tTimeslot\t1' .format(_time, _network, _src_ipsc, _src_sub, _dst_group))
|
||||||
|
|
||||||
if _call == '20':
|
if _call == '20':
|
||||||
if (_network, 'Slot 2') not in ACTIVE_CALLS:
|
if (_network, 'Slot 2') not in ACTIVE_CALLS:
|
||||||
ACTIVE_CALLS.append((_network, 'Slot 2'))
|
ACTIVE_CALLS.append((_network, 'Slot 2'))
|
||||||
print('({}) CALL START Group Voice: \n\tIPSC Source:\t{}\n\tSubscriber:\t{}\n\tDestination:\t{}\n\tTimeslot\t2' .format(_network, _src_ipsc, _src_sub, _dst_group))
|
print('{} ({}) CALL START Group Voice: \n\tIPSC Source:\t{}\n\tSubscriber:\t{}\n\tDestination:\t{}\n\tTimeslot\t2' .format(_time, _network, _src_ipsc, _src_sub, _dst_group))
|
||||||
|
|
||||||
if _call == '40':
|
if _call == '40':
|
||||||
ACTIVE_CALLS.remove((_network, 'Slot 1'))
|
ACTIVE_CALLS.remove((_network, 'Slot 1'))
|
||||||
print('({}) CALL END Group Voice: \n\tIPSC Source:\t{}\n\tSubscriber:\t{}\n\tDestination:\t{}\n\tTimeslot\t1 \a' .format(_network, _src_ipsc, _src_sub, _dst_group))
|
print('{} ({}) CALL END Group Voice: \n\tIPSC Source:\t{}\n\tSubscriber:\t{}\n\tDestination:\t{}\n\tTimeslot\t1 \a' .format(_time, _network, _src_ipsc, _src_sub, _dst_group))
|
||||||
|
|
||||||
if _call == '60':
|
if _call == '60':
|
||||||
ACTIVE_CALLS.remove((_network, 'Slot 2'))
|
ACTIVE_CALLS.remove((_network, 'Slot 2'))
|
||||||
print('({}) CALL END Group Voice: \n\tIPSC Source:\t{}\n\tSubscriber:\t{}\n\tDestination:\t{}\n\tTimeslot\t2 \a' .format(_network, _src_ipsc, _src_sub, _dst_group))
|
print('{} ({}) CALL END Group Voice: \n\tIPSC Source:\t{}\n\tSubscriber:\t{}\n\tDestination:\t{}\n\tTimeslot\t2 \a' .format(_time, _network, _src_ipsc, _src_sub, _dst_group))
|
||||||
|
|
||||||
'''
|
'''
|
||||||
for source in NETWORK[_network]['RULES']['GROUP_VOICE']:
|
for source in NETWORK[_network]['RULES']['GROUP_VOICE']:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user