|
@@ -19,7 +19,8 @@ from apscheduler.schedulers.background import BackgroundScheduler
|
|
|
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.constant import SK, EMPTY, CTI_ENGINE_DELAY_ACTION_LOCK, HOLD_MUSIC_PATH, saasId
|
|
|
+from src.core.callcenter.constant import SK, EMPTY, CTI_ENGINE_DELAY_ACTION_LOCK, HOLD_MUSIC_PATH, saasId, \
|
|
|
+ WaitingHangupMusicPath
|
|
|
from src.core.callcenter.esl.constant.esl_constant import BRIDGE_VARIABLES, BRIDGE, HANGUP, NORMAL_CLEARING, SIP_HEADER, \
|
|
|
SPACE, SPLIT, SOFIA, \
|
|
|
ORIGINATE, PARK, SET, EAVESDROP, SMF_ALEG, EXECUTE, PLAYBACK, PAUSE, TRANSFER, UUID_TRANSFER, UUID_BROADCAST, \
|
|
@@ -195,11 +196,14 @@ class InboundClient:
|
|
|
if device_list and len(device_list) == 1:
|
|
|
device_id = device_list[0].device_id
|
|
|
self.bridge_break(device_id)
|
|
|
- self.hold_play(device_id, HOLD_MUSIC_PATH)
|
|
|
+ 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)
|
|
|
self.cache.add_call_info(call_info)
|
|
|
self.logger.info("waitingTimeOut 开始播放结束音乐 callId:%s customerDeviceId:%s playFile:%s", call_id,
|
|
|
- device_id, HOLD_MUSIC_PATH)
|
|
|
+ device_id, WaitingHangupMusicPath)
|
|
|
|
|
|
def make_call_new(self, context: MakeCallContext):
|
|
|
called = context.get_called()
|