774056846 4 months ago
parent
commit
89ad012557
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/core/callcenter/esl/handler/channel_hangup_handler.py

+ 7 - 0
src/core/callcenter/esl/handler/channel_hangup_handler.py

@@ -29,22 +29,29 @@ class ChannelHangupHandler(EslEventHandler):
         print(json.loads(event.serialize('json')))
         try:
             call_id = EslEventUtil.getCallId(event)
+            print('call_id is ', call_id)
+            sys.stdout.flush()  # 强制刷新输出缓冲区
             if not call_id:
                 self.release(event)
                 print("call_id is null")
                 return
             call = Cache.get_call_info(call_id)
+            print('call_info is ', call)
+            sys.stdout.flush()  # 强制刷新输出缓冲区
             if not call:
                 print("call:%s is null", call_id)
                 return
             device_id = EslEventUtil.getDeviceId(event)
             device = call.device_info_map.get(device_id)
+            print('device_id is ', device_id)
+            sys.stdout.flush()  # 强制刷新输出缓冲区
             if not device:
                 print("device:%s is null", device_id)
                 return
 
             count = len(call.device_list)
             print('ChannelHangupHandler, call_id=%s, device_id=%s, count=%s'% (call_id, device_id, count))
+            sys.stdout.flush()  # 强制刷新输出缓冲区
             try:
                 call.device_list.remove(device_id)
             except: