|
@@ -29,7 +29,7 @@ class AcdService:
|
|
|
self.checkIdleScheduler.add_job(self.try_transfer_agent, 'interval', seconds=2, max_instances=1)
|
|
|
self.checkIdleScheduler.start()
|
|
|
|
|
|
- def transfer_to_agent(self, call_id, device_id, service_id):
|
|
|
+ def transfer_to_agent(self, call_id, device_id, service_id, user_part):
|
|
|
call_info = self.cache.get_call_info(call_id)
|
|
|
if not call_info:
|
|
|
return
|
|
@@ -37,7 +37,8 @@ class AcdService:
|
|
|
self.cache.add_call_info(call_info)
|
|
|
self.logger.info('debugger::transfer_to_agent, come in ')
|
|
|
# 1. hold住并且播放等待音
|
|
|
- self.call_service.hold(call_info, device_id)
|
|
|
+ if self.call_service.hold(call_info, device_id):
|
|
|
+ self.client.bot_agent.self.hangup(user_part)
|
|
|
self.logger.info('debugger::transfer_to_agent, 1111111 ')
|
|
|
# 获得空闲坐席
|
|
|
agent_number = self.agent_service.assign(AgentActionRequest(saas_id=saasId, service_id=service_id))
|