Browse Source

事件剥离逻辑,fix

DavidLiu 4 months ago
parent
commit
1beea66daa
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/core/callcenter/callback.py

+ 3 - 1
src/core/callcenter/callback.py

@@ -13,20 +13,22 @@ class Callback(object):
 
     def __init__(self, app):
         self.app = app
+        self.logger = app.logger
         self.cache = Cache(app)
         self.agent_event_service = AgentEventService(app)
 
     def callback_event(self, event):
         event_name = EslEventUtil.getEventName(event)
 
+        self.logger.info("liuwei::debugger::callback::event_name=%s", event_name)
         if not (CUSTOM == event_name and event_name.startswith('CHANNEL_') and event_name.startswith('PLAYBACK_') and event_name.startswith('PLAYBACK_')):
             return
 
         call_id = EslEventUtil.getCallId(event)
         device_id = EslEventUtil.getDeviceId(event)
-
         call_info = self.cache.get_call_info(call_id)
         device_info = call_info.device_info_map.get(device_id) if call_info and call_info.device_info_map else None
+        self.logger.info("liuwei::debugger::callback::event_name=%s, call_id=%s, device_id=%s, call_info=%s", event_name, call_id, device_id, call_info)
         if call_info and CallType.BOT_CALL.code == call_info.call_type:
             threading.Thread(target=self.agent_event_service.bot_event_channel, args=(event, call_info, device_info)).start()
             # self.agent_event_service.bot_event_channel(event, call_info, device_info)