余尚辉 hai 4 meses
pai
achega
57efe30954

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

@@ -34,7 +34,7 @@ class CallService:
         agent = self.cache.get_agent_info(request.saas_id, request.agent_id)
         route_gateway = self.cache.get_route_gateway(request.saas_id)
         call_info = CallInfo(cti_flow_id=request.cti_flow_id, call_id=call_id, agent_key=agent.agent_number, sip_server=agent.sip_server,
-                             caller=agent.agent_number, called=request.called, direction=Direction.OUTBOUND.code,
+                             caller=agent.agent_number, called=request.called, direction=Direction.INBOUND.code,
                              caller_display=request.caller_display, called_display=request.called_display,
                              call_type=request.call_type, call_time=now, follow_data=request.follow_data,
                              uuid1=request.uuid1, uuid2=request.uuid2, saas_id=saasId,

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

@@ -119,7 +119,7 @@ class ChannelHangupHandler(EslEventHandler):
 
                 self.logger.info('全部挂断 %s', device_info.device_type)
                 # 更新坐席状态
-                if device_info.device_type == DeviceType.AGENT.code or device_info.device_type == DeviceType.CUSTOMER.code:
+                if device_info.device_type == DeviceType.AGENT.code:
                     self.logger.info('更新坐席状态')
                     self.dataHandleServer.update_agent_monitor_service_state(call_info.agent_key, AgentServiceState.IDLE.code)
 

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

@@ -20,6 +20,6 @@ class ChannelOriginateHandler(EslEventHandler):
         call = self.cache.get_call_info(call_id)
         device = call.device_info_map.get(device_id)
         self.logger.info('ChannelOriginateHandler::event %s, device.device_type: %s, DeviceType.AGENT.code:%s ', event,device.device_type, DeviceType.AGENT.code)
-        if call.direction == Direction.INBOUND.code and device.device_type == DeviceType.AGENT.code: # 如果是呼入有响铃
+        if device.device_type == DeviceType.AGENT.code: # 如果是呼入有响铃
             self.push_handler.push_on_call_ring(call.cti_flow_id,call.agent_key,AgentScene.ROBOT,call.call_id,call.caller, call.called,"00000000000000000")
             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)