|
@@ -15,6 +15,7 @@ from src.core.callcenter.esl.constant.event_names import CHANNEL_HANGUP
|
|
|
from src.core.callcenter.esl.handler.esl_event_handler import EslEventHandler
|
|
|
from src.core.callcenter.api import CallInfo, DeviceInfo, NextCommand
|
|
|
from src.core.callcenter.push import PushHandler
|
|
|
+from src.core.callcenter import registry
|
|
|
from src.core.callcenter.data_handler import *
|
|
|
|
|
|
@EslEventName(CHANNEL_HANGUP)
|
|
@@ -99,6 +100,7 @@ class ChannelHangupHandler(EslEventHandler):
|
|
|
# if next_command:
|
|
|
# self.next_cmd(call_info, device_info, next_command, cause)
|
|
|
# return
|
|
|
+
|
|
|
# 一般情况下,挂断其他所有设备
|
|
|
if device_info.cdr_type <= 4 and not call_info.end_time and not skip_hangup_all:
|
|
|
call_info.end_time = device_info.end_time
|
|
@@ -106,6 +108,9 @@ class ChannelHangupHandler(EslEventHandler):
|
|
|
self.call_service.hangup_all(call_info, CallCause.HANGUP_EVENT)
|
|
|
# self.inbound_client.hangup_call(call_id, device_id, CallCause.HANGUP_EVENT)
|
|
|
|
|
|
+ if CallType.BOT_CALL.code == call_info.call_type and device_info.device_type == DeviceType.ROBOT.code:
|
|
|
+ registry.CALL_BOT_HANGUP_REQUESTS.labels(f"{call_info.bucket_type}").inc()
|
|
|
+
|
|
|
# 全部挂机以后推送挂机状态
|
|
|
# self.logger.info('yushanghui::call_info.device_list %s', call_info.device_list)
|
|
|
# if len(call_info.device_list) == 0:
|