余尚辉 vor 4 Monaten
Ursprung
Commit
835a5d88e4
2 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 0 1
      src/core/callcenter/agent.py
  2. 2 0
      src/core/callcenter/data_handler.py

+ 0 - 1
src/core/callcenter/agent.py

@@ -193,7 +193,6 @@ class AgentEventService:
 
         if CHANNEL_ANSWER == event_name:
             self.agent_state_service.busy(saas_id, agent.agent_num, agent.phone_num)
-            self.data_handle_server.update_record(call_id, status=1)
             if is_agent:
                 self.agent_monitor_service.update_calling(agent_monitor)
                 self.push_handler.push_on_agent_work_report(saas_id, flow_id, agent_num, call_id, AgentScene.ROBOT, WorkStatus.AGENT_ANSWER_INCOMING, "座席接通呼入电话! internal")

+ 2 - 0
src/core/callcenter/data_handler.py

@@ -32,6 +32,8 @@ class DataHandleServer:
                     agent = self.get_user_name(destination)
                     call_record.user_id = agent.user_id
                     call_record.user_name = agent.agent_name
+            else:  # 如果是机器人,则修改状态为已接通
+                call_record.status = 1
             db.session.add(call_record)
             db.session.commit()
             print("记录创建成功")