Davidliu 1 ماه پیش
والد
کامیت
5a3c0d44be
1فایلهای تغییر یافته به همراه17 افزوده شده و 3 حذف شده
  1. 17 3
      src/core/callcenter/esl/client.py

+ 17 - 3
src/core/callcenter/esl/client.py

@@ -202,14 +202,28 @@ class InboundClient:
         if not call_info:
             self.logger.info("exec_when_acd_timeout callInfo为空 callId: %s", call_id)
             return
+        next_cmd = call_info.next_commands[0] if call_info.next_commands and len(call_info.next_commands) >0 else None
+        self.logger.info("do_delay_action:exec_when_acd_timeout:next_cmd=%s, call_info=%s", next_cmd, call_info)
+        if next_cmd and next_cmd.next_type == NextType.NEXT_TRANSFER_CALL.code:
+            device_id = next_cmd.next_value
+            self.break0(device_id)
+            self.hold_play(device_id, WaitingHangupMusicPath)
+            self.play_timeout(call_id, timeout=30)
+            next_command = NextCommand(device_id = device_id, next_type=NextType.NEXT_HANGUP.code)
+            call_info.next_commands = [next_command]
+            self.cache.add_call_info(call_info)
+            # self.dataHandleServer.update_record(call_id, status= 0)
+            self.logger.info("waitingTimeOut 开始播放结束音乐 callId:%s customerDeviceId:%s playFile:%s", call_id,
+                             device_id, WaitingHangupMusicPath)
+
         device_list = [v for k,v in call_info.device_info_map.items() if v.device_type == DeviceType.CUSTOMER]
         self.logger.info("do_delay_action:exec_when_acd_timeout:device_list=%s, call_info=%s", device_list, call_info)
         if device_list and len(device_list) == 1:
             device_id = device_list[0].device_id
             self.break0(device_id)
-            # if not WaitingHangupMusicPath:
-            #     self.hangup_call(call_id, device_id, CallCause.WAITING_TIMEOUT)
-            #     return
+            if not WaitingHangupMusicPath:
+                self.hangup_call(call_id, device_id, CallCause.WAITING_TIMEOUT)
+                return
 
             self.hold_play(device_id, WaitingHangupMusicPath)
             self.play_timeout(call_id, timeout=30)