shanghui 3 months ago
parent
commit
ebacfe830f
2 changed files with 6 additions and 6 deletions
  1. 1 1
      src/core/callcenter/agent.py
  2. 5 5
      src/core/callcenter/data_handler.py

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

@@ -207,7 +207,7 @@ 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, user_id=agent.user_id,user_name=agent.agent_name)
+                self.data_handle_server.update_record(call_id, status=1, transfer_user_id=agent.user_id,transfer_user_name=agent.agent_name)
                 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")

+ 5 - 5
src/core/callcenter/data_handler.py

@@ -46,11 +46,11 @@ class DataHandleServer:
             call_record.bussiness_type = bot_record.intent if bot_record else ''
         # 如果记录是转人工并且有客服接通把客服更新到转接字段
         self.app.logger.debug(f"Received kwargs: {kwargs} user_id:{user_id},user_name:{user_name}")
-        if call_record.service_category==2 and user_id:
-           call_record.transfer_user_id = user_id
-           call_record.transfer_user_name =user_name
-           kwargs.pop('user_id', None)
-           kwargs.pop('user_name', None)
+        # if call_record.service_category==2 and user_id:
+        #    call_record.transfer_user_id = user_id
+        #    call_record.transfer_user_name =user_name
+        #    kwargs.pop('user_id', None)
+        #    kwargs.pop('user_name', None)
         # 动态更新字段
         for key, value in kwargs.items():
             if hasattr(call_record, key):