|
@@ -195,23 +195,21 @@ class AgentEventService:
|
|
|
self.logger.info('bot_event_channel, event_name=%s, call_id=%s, device_id=%s, is_agent=%s, agent_num=%s, hangup_dir=%s, hangup_count=%s, answer_count=%s', event_name, call_id, device_id, is_agent, agent_num, call_info.hangup_dir, call_info.hangup_count, call_info.answer_count)
|
|
|
agent = self.data_handle_server.get_agent(saas_id, agent_num)
|
|
|
if not agent:
|
|
|
- self.logger.warn("bot event service channel agent is null %s %s %s %s %s %s", saas_id, event_name, call_id, caller, called,
|
|
|
- json.dumps(event.serialize('json')))
|
|
|
+ self.logger.warn("bot event service channel agent is null %s %s %s %s %s", saas_id, event_name, call_id, caller, called)
|
|
|
return
|
|
|
agent_monitor = self.data_handle_server.get_agent_monitor(saas_id, agent_num)
|
|
|
if not agent_monitor:
|
|
|
- self.logger.warn("bot event service channel agentMonitor is null %s %s %s %s %s %s", saas_id, event_name, call_id, caller,
|
|
|
- called, json.dumps(event.serialize('json')))
|
|
|
+ self.logger.warn("bot event service channel agentMonitor is null %s %s %s %s %s", saas_id, event_name, call_id, caller, called)
|
|
|
return
|
|
|
|
|
|
# 信道发起事件,触发完成发起(或桥)&& 坐席侧
|
|
|
if CHANNEL_ORIGINATE == event_name and is_agent:
|
|
|
- self.data_handle_server.update_record(call_id, transfer_user_id=agent.user_id,transfer_user_name=agent.agent_name) # 转接给客服以后更新转接人
|
|
|
# if call_info.hangup_dir and call_info.hangup_dir == HangupDir.CUSTOMER_HANGUP.code:
|
|
|
# self.logger.info('bot_event_channel:already:hangup, event_name=%s, call_id=%s, device_id=%s, is_agent=%s, agent_num=%s, hangup_dir=%s, hangup_count=%s, answer_count=%s', event_name, call_id, device_id, is_agent, agent_num, call_info.hangup_dir, call_info.hangup_count, call_info.answer_count)
|
|
|
# return
|
|
|
self.push_handler.push_on_call_ring(saas_id, flow_id, agent_num, AgentScene.ROBOT, call_id, ServiceDirect.ROBOT_CALL.service_direct, called, caller, human_service_id)
|
|
|
self.push_handler.push_on_agent_work_report(saas_id, flow_id, agent_num, call_id, AgentScene.ROBOT, WorkStatus.AGENT_RINGING,phone=call_info.caller)
|
|
|
+ self.data_handle_server.update_record(call_id, transfer_user_id=agent.user_id,transfer_user_name=agent.agent_name) # 转接给客服以后更新转接人
|
|
|
|
|
|
|
|
|
if CHANNEL_ANSWER == event_name:
|