|
@@ -81,11 +81,13 @@ class ChannelHangupHandler(EslEventHandler):
|
|
|
if device.record_start_time:
|
|
|
device.record_time = int(device.end_time) - int(device.record_start_time)
|
|
|
call.device_info_map[device.device_id] = device
|
|
|
- # self.logger.info("ceshiyix shijian",device)
|
|
|
+
|
|
|
+ skip_hangup_all = device.device_type == DeviceType.ROBOT.code
|
|
|
+
|
|
|
# 更新通话记录
|
|
|
# self.dataHandleServer.update_record(call_id, {"time_end": datetime.fromtimestamp(int(device.end_time)),"times":device.talk_time})
|
|
|
|
|
|
- self.logger.info('debugger::ChannelHangupHandler, hangup_reason=%s, device_type=%s' % (hangup_reason, device.device_type))
|
|
|
+ self.logger.info('debugger::ChannelHangupHandler, hangup_reason=%s, device_type=%s, skip_hangup_all=%s' % (hangup_reason, device.device_type, skip_hangup_all))
|
|
|
# 如果是转人工
|
|
|
# if 'transferToAgent' == hangup_reason and DeviceType.ROBOT.code == device.device_type:
|
|
|
# call.answer_flag = AnswerFlag.TRANSFER_TO_AGENT.code
|
|
@@ -101,9 +103,8 @@ class ChannelHangupHandler(EslEventHandler):
|
|
|
# if next_command:
|
|
|
# self.next_cmd(call, device, next_command, cause)
|
|
|
# return
|
|
|
-
|
|
|
# 一般情况下,挂断其他所有设备
|
|
|
- if device.cdr_type <= 4 and not call.end_time:
|
|
|
+ if device.cdr_type <= 4 and not call.end_time and not skip_hangup_all:
|
|
|
call.end_time = device.end_time
|
|
|
self.call_service.hangup_all(call, CallCause.HANGUP_EVENT)
|
|
|
# self.inbound_client.hangup_call(call_id, device_id, CallCause.HANGUP_EVENT)
|