|
@@ -17,7 +17,8 @@ from src.core.callcenter import BizException
|
|
|
from src.core.callcenter.cache import Cache
|
|
|
from src.core.callcenter.api import MakeCallContext, DelayAction, CallInfo, DeviceInfo, NextCommand
|
|
|
from src.core.callcenter.callback import Callback
|
|
|
-from src.core.callcenter.constant import SK, EMPTY, WaitingHangupMusicPath, SAAS_ID, HOLD_MUSIC_PATH
|
|
|
+from src.core.callcenter.constant import SK, EMPTY, WaitingHangupMusicPath, SAAS_ID, HOLD_MUSIC_PATH, \
|
|
|
+ AGENT_BUSY_MUSIC_PATH
|
|
|
from src.core.callcenter.esl.constant.esl_constant import BRIDGE_VARIABLES, BRIDGE, HANGUP, NORMAL_CLEARING, SIP_HEADER, \
|
|
|
SPACE, SOFIA, \
|
|
|
ORIGINATE, PARK, SET, EAVESDROP, SMF_ALEG, EXECUTE, PLAYBACK, PAUSE, TRANSFER, UUID_TRANSFER, UUID_BROADCAST, \
|
|
@@ -203,22 +204,22 @@ class InboundClient:
|
|
|
self.logger.info("exec_when_acd_timeout callInfo为空 callId: %s", call_id)
|
|
|
return
|
|
|
|
|
|
- def play_sorry():
|
|
|
- self.hold_play(device_id, WaitingHangupMusicPath)
|
|
|
+ def play_sorry(music_file):
|
|
|
+ self.hold_play(device_id, music_file)
|
|
|
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_id, music_file)
|
|
|
|
|
|
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)
|
|
|
- play_sorry()
|
|
|
+ play_sorry(AGENT_BUSY_MUSIC_PATH)
|
|
|
|
|
|
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)
|
|
@@ -228,7 +229,7 @@ class InboundClient:
|
|
|
if not WaitingHangupMusicPath:
|
|
|
self.hangup_call(call_id, device_id, CallCause.WAITING_TIMEOUT)
|
|
|
return
|
|
|
- play_sorry()
|
|
|
+ play_sorry(WaitingHangupMusicPath)
|
|
|
|
|
|
def make_call(self, context: MakeCallContext):
|
|
|
# self.logger.info("拨打测试context:%s", context.__dict__)
|