DavidLiu 3 ヶ月 前
コミット
31b60accc9
1 ファイル変更4 行追加1 行削除
  1. 4 1
      src/core/callcenter/callback.py

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

@@ -1,5 +1,6 @@
 #!/usr/bin/env python3
 # encoding:utf-8
+import json
 import queue
 import threading
 import concurrent.futures
@@ -57,11 +58,13 @@ class Callback(object):
         if not call_id and device_id:
             call_id = self.cache.get_call_id_by_device_id(device_id)
         call_info = self.cache.get_call_info(call_id)
+        if 'CHANNEL_HANGUP' == event_name:
+            self.logger.info("callback::call_id=%s, device_id=%s, event=", json.loads(event.serialize('json')))
         if not call_info:
             # self.logger.info("callback:return::event_name=%s, call_id=%s, device_id=%s", event_name, call_id, device_id)
             return
         device_info = call_info.device_info_map.get(device_id) if call_info and call_info.device_info_map else None
-        self.logger.info("callback::event_name=%s, call_id=%s, device_id=%s", event_name, call_id, device_id)
+        # self.logger.info("callback::event_name=%s, call_id=%s, device_id=%s", event_name, call_id, device_id)
         self.event_queue.put_nowait((event, call_info, device_info))