add call duration timer
This commit is contained in:
parent
c26e5bb489
commit
c33ba91f4f
@ -335,11 +335,16 @@ class bridgeIPSC(IPSC):
|
|||||||
if _burst_data_type == BURST_DATA_TYPE['VOICE_HEAD']:
|
if _burst_data_type == BURST_DATA_TYPE['VOICE_HEAD']:
|
||||||
if self.last_seq_id != _seq_id:
|
if self.last_seq_id != _seq_id:
|
||||||
self.last_seq_id = _seq_id
|
self.last_seq_id = _seq_id
|
||||||
|
call_start = time()
|
||||||
logger.info('(%s) GROUP VOICE START: PEER: %s, SUB: %s, TS: %s, TGID: %s', _network, int_id(_peerid), int_id(_src_sub), _ts+1, int_id(_dst_group))
|
logger.info('(%s) GROUP VOICE START: PEER: %s, SUB: %s, TS: %s, TGID: %s', _network, int_id(_peerid), int_id(_src_sub), _ts+1, int_id(_dst_group))
|
||||||
|
|
||||||
# Action happens on un-key
|
# Action happens on un-key
|
||||||
if _burst_data_type == BURST_DATA_TYPE['VOICE_TERM']:
|
if _burst_data_type == BURST_DATA_TYPE['VOICE_TERM']:
|
||||||
logger.info('(%s) GROUP VOICE END: PEER: %s, SUB: %s, TS: %s, TGID: %s', _network, int_id(_peerid), int_id(_src_sub), _ts+1, int_id(_dst_group))
|
if self.last_seq_id == _seq_id:
|
||||||
|
call_duration = time() - call_start
|
||||||
|
logger.info('(%s) GROUP VOICE END: PEER: %s, SUB: %s, TS: %s, TGID: %s Duration: %ss', _network, int_id(_peerid), int_id(_src_sub), _ts+1, int_id(_dst_group), call_duration)
|
||||||
|
else:
|
||||||
|
logger.warning('(%s) GROUP VOICE END WITHOUT MATCHING START: PEER: %s, SUB: %s, TS: %s, TGID: %s', _network, int_id(_peerid), int_id(_src_sub), _ts+1, int_id(_dst_group))
|
||||||
|
|
||||||
# Iterate the rules dictionary
|
# Iterate the rules dictionary
|
||||||
for rule in RULES[_network]['GROUP_VOICE']:
|
for rule in RULES[_network]['GROUP_VOICE']:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user