DavidLiu před 3 měsíci
rodič
revize
0b08fadfb1

+ 5 - 0
src/core/callcenter/esl/handler/channel_answer_handler.py

@@ -26,11 +26,16 @@ class ChannelAnswerHandler(EslEventHandler):
         call_info = self.cache.get_call_info(call_id)
         self.logger.info("answer call_id:%s, call_info:%s", call_id, call_info)
         if not call_info:
+            self.logger.info("answer call_info is null, call_id:%s", call_id)
             return
 
         registry.CALL_ANSWER_REQUESTS.labels(f"{call_info.bucket_type}").inc()
         device_id = EslEventUtil.getDeviceId(event)
         device_info = call_info.device_info_map.get(device_id)
+        if not device_info:
+            self.logger.info("answer device_info is null, call_id:%s, call_info:%s", call_id, call_info)
+            return
+
         if CallType.AGENT_CALL.code == call_info.call_type and device_info.device_type == DeviceType.CUSTOMER.code:
             device_info.record = self.record(event, device_id)
 

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

@@ -52,7 +52,7 @@ class ChannelHangupHandler(EslEventHandler):
             # self.logger.info('device_id is ', device_id)
             if not device_info:
                 self.release(event)
-                self.logger.info("device_info:%s is null", device_id)
+                self.logger.info("device_info:%s is null, call_id=%s, device_id=%s, call_info=%s", call_id, device_id, call_info)
                 return
             # 只要用户测挂机就回收
             if device_info.device_type == DeviceType.CUSTOMER.code: