|
@@ -38,15 +38,17 @@ class ChannelAnswerHandler(EslEventHandler):
|
|
|
call_info.answer_flag = AnswerFlag.ROBOT_ANSWER.code
|
|
|
registry.CALL_BOT_ANSWER_REQUESTS.labels(f"{call_info.bucket_type}").inc()
|
|
|
|
|
|
+ device_info.answer_time = EslEventUtil.getEventDateTimestamp(event)
|
|
|
+ device_info.ring_end_time = EslEventUtil.getEventDateTimestamp(event)
|
|
|
+ call_info.answer_count = call_info.answer_count + 1
|
|
|
+
|
|
|
next_command = call_info.next_commands[0] if len(call_info.next_commands) > 0 else None
|
|
|
device_type = DeviceType.get_by_code(device_info.device_type)
|
|
|
self.logger.info("ChannelAnswerHandler call_id:%s, device_id:%s, device_type:%s, next_command:%s"%(call_id, device_id, device_type, next_command))
|
|
|
if not next_command:
|
|
|
+ self.cache.add_call_info(call_info)
|
|
|
return
|
|
|
|
|
|
- device_info.answer_time = EslEventUtil.getEventDateTimestamp(event)
|
|
|
- device_info.ring_end_time = EslEventUtil.getEventDateTimestamp(event)
|
|
|
- call_info.answer_count = call_info.answer_count + 1
|
|
|
call_info.next_commands.remove(next_command)
|
|
|
self.logger.info("ChannelAnswerHandler call_info.answer_time::%s,time:%s", call_info.answer_time, EslEventUtil.getEventDateTimestamp(event))
|
|
|
|