余尚辉 vor 4 Monaten
Ursprung
Commit
62a1a8eaba

+ 1 - 1
src/core/callcenter/esl/handler/channel_originate_handler.py

@@ -22,4 +22,4 @@ class ChannelOriginateHandler(EslEventHandler):
         self.logger.info('ChannelOriginateHandler::event %s, device.device_type: %s, DeviceType.AGENT.code:%s ', event,device.device_type, DeviceType.AGENT.code)
         print('ceshisdsdsdsdsdsdsd', device.device_type, DeviceType.AGENT.code, flush=True)
         if device.device_type == DeviceType.AGENT.code: # 如果是坐席接听 变更坐席状态
-            self.push_handler.push_on_agent_work_report(call.saas_id, call.cti_flow_id,call.agent_key,call.call_id,AgentScene.ROBOT, WorkStatus.AGENT_RINGING)
+            self.push_handler.push_on_agent_work_report(call.saas_id, call.cti_flow_id,call.agent_key,call.call_id,AgentScene.ROBOT, WorkStatus.AGENT_RINGING,phone=call.caller)

+ 3 - 2
src/core/callcenter/push.py

@@ -18,14 +18,15 @@ class PushHandler:
         # 获取 RedisHandler 实例并发布消息到 Redis 频道
         redis_handler = RedisHandler()
         redis_handler.publish('socket_channel', message)
-    def push_on_agent_work_report(self, saas_id, flow_id, user_id, call_id, scene: AgentScene, work_status: WorkStatus, description=None):
+    def push_on_agent_work_report(self, saas_id, flow_id, user_id, call_id, scene: AgentScene, work_status: WorkStatus, description=None, phone=None):
         data = {
             'eventName': DownEvent.ON_AGENT_WORK_REPORT.code,
             'ext': {'workStatus': work_status.code,
                     'description': description or work_status.description,
                     'callId': call_id,
                     'ctiFlowId': flow_id,
-                    'scene': scene.code
+                    'scene': scene.code,
+                    'phone':phone
                     }
         }
         self.logger.info("flowId:[%s] OnAgentWorkReport push:[%s].", flow_id, json.dumps(data))