|
@@ -45,15 +45,11 @@ class AcdService:
|
|
|
agent_number = self.agent_service.assign(AgentActionRequest(saas_id=SAAS_ID, service_id=service_id))
|
|
|
if not agent_number:
|
|
|
# 如果没有空闲坐席,播放等待音
|
|
|
- text = "AcdService transferToAgent agentNumber is empty serviceId:%s,caller:%s,called:%s,callId:%s"%(service_id, call_info.caller, call_info.called, call_info.call_id)
|
|
|
- # print(text, flush=True)
|
|
|
- self.logger.info(text)
|
|
|
+ self.logger.info("AcdService transferToAgent agentNumber is empty serviceId:%s,caller:%s,called:%s,callId:%s"%(service_id, call_info.caller, call_info.called, call_info.call_id))
|
|
|
self.add_acd_queue(call_info, service_id)
|
|
|
else:
|
|
|
# 有空闲坐席,直接转接
|
|
|
- text = "AcdService transferToAgent agentNumber not empty %s, serviceId:%s,caller:%s,called:%s,callId:%s"%(agent_number, service_id, call_info.caller,call_info.called, call_info.call_id)
|
|
|
- # print(text, flush=True)
|
|
|
- self.logger.info(text)
|
|
|
+ self.logger.info("AcdService transferToAgent agentNumber not empty %s, serviceId:%s,caller:%s,called:%s,callId:%s"%(agent_number, service_id, call_info.caller,call_info.called, call_info.call_id))
|
|
|
self.call_service.transfer(call_info, agent_number, service_id)
|
|
|
# self.agent_state_service.busy(call_info.saas_id, agent_number, agent_number)
|
|
|
self.cache.add_call_info(call_info)
|
|
@@ -90,15 +86,11 @@ class AcdService:
|
|
|
continue
|
|
|
agent_number = self.agent_service.assign(AgentActionRequest(saas_id=SAAS_ID, service_id=task_service_id))
|
|
|
if not agent_number:
|
|
|
- text = "AcdService tryTransferAgent agentNumber is Empty %s %s"% (call_id, json.dumps(call_info.device_list))
|
|
|
- # print(text, flush=True)
|
|
|
- self.logger.info(text)
|
|
|
+ self.logger.info("AcdService tryTransferAgent agentNumber is Empty %s %s"% (call_id, json.dumps(call_info.device_list)))
|
|
|
tmp_arr.append(call_id)
|
|
|
continue
|
|
|
|
|
|
- text = "AcdService tryTransferAgent agentNumber not Empty %s, serviceId:%s, called:%s, callId:%s"%(agent_number, task_service_id, call_info.called, call_id)
|
|
|
- # print(text, flush=True)
|
|
|
- self.logger.info(text)
|
|
|
+ self.logger.info("AcdService tryTransferAgent agentNumber not Empty %s, serviceId:%s, called:%s, callId:%s"%(agent_number, task_service_id, call_info.called, call_id))
|
|
|
self.call_service.transfer(call_info, agent_number, task_service_id)
|
|
|
|
|
|
for call_id in tmp_arr:
|