余尚辉 4 月之前
父節點
當前提交
e06c9ee964
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      src/core/callcenter/esl/handler/channel_hangup_handler.py

+ 4 - 2
src/core/callcenter/esl/handler/channel_hangup_handler.py

@@ -114,10 +114,12 @@ class ChannelHangupHandler(EslEventHandler):
                     call_info.end_time = timestamp
                     call_info.talk_time = int(call_info.end_time) - int(call_info.answer_time)
                     self.dataHandleServer.update_record(call_id, {"time_end": datetime.utcnow(), "times": int(call_info.talk_time / 1_000_000) })
+                    self.push_handler.push_on_call_end(call_info.cti_flow_id, call_info.agent_key, AgentScene.ROBOT,call_info.direction, device_info.device_type)
+                    self.push_handler.push_on_agent_work_report(call_info.saas_id, call_info.cti_flow_id,call_info.agent_key, call_info.call_id, AgentScene.ROBOT, WorkStatus.AGENT_HANG_IDLE)
+
+                self.logger.info('全部挂断' % device_info.device_type)
                 # 更新坐席状态
                 if device_info.device_type == DeviceType.AGENT.code:
-                    self.push_handler.push_on_call_end(call_info.cti_flow_id, call_info.agent_key, AgentScene.ROBOT, call_info.direction, device_info.device_type)
-                    self.push_handler.push_on_agent_work_report(call_info.saas_id, call_info.cti_flow_id, call_info.agent_key, call_info.call_id, AgentScene.ROBOT, WorkStatus.AGENT_HANG_IDLE)
                     self.dataHandleServer.update_agent_monitor_service_state(call_info.agent_key, AgentServiceState.IDLE.code)
 
             # 判断挂机方向 && 更新缓存