|
@@ -137,8 +137,8 @@ class ChannelAnswerHandler(EslEventHandler):
|
|
|
|
|
|
self.logger.info("liuwei::debugger::answer, 44444")
|
|
|
self.record(event, device_id)
|
|
|
- call.next_commands.append(NextCommand(device_id, NextType.NEXT_TRANSFER_SUCCESS.code, call.device_list[1]))
|
|
|
- self.logger.info("转接电话中 callId:%s, from:%s, to:%s "% (call.call_id, device_id, call.device_list[1]))
|
|
|
+ call.next_commands.append(NextCommand(call.device_list[0], NextType.NEXT_TRANSFER_SUCCESS.code, device_id))
|
|
|
+ self.logger.info("转接电话中 callId:%s, from:%s, to:%s "% (call.call_id, device_id, next_command.next_value))
|
|
|
self.inbound_client.transfer_call(device_id, next_command.next_value)
|
|
|
self.logger.info("转接完成 callId:%s, from:%s, to:%s "% (call.call_id, device_id, call.device_list[0]))
|
|
|
self.inbound_client.bridge_call(call.call_id, device_id, call.device_list[0])
|
|
@@ -161,8 +161,17 @@ class ChannelAnswerHandler(EslEventHandler):
|
|
|
if not device:
|
|
|
self.logger.info("answer.record deviceInfo is null,call_id:%s, device_id:%s"%(call_id, device_id))
|
|
|
return
|
|
|
-
|
|
|
- return self.start_recording(device_id, get_record_file_name(call_id, CallStage.ALL), call)
|
|
|
+ _record_url = None
|
|
|
+ if CallType.BOT_CALL.code == call.call_type:
|
|
|
+ if DeviceType.CUSTOMER.code == device.device_type:
|
|
|
+ _record_url = self.start_recording(device_id, get_record_file_name(call_id, CallStage.ALL), call)
|
|
|
+ elif DeviceType.ROBOT.code == device.device_type:
|
|
|
+ _record_url = self.start_recording(device_id, get_record_file_name(call_id, CallStage.ROBOT), call)
|
|
|
+ elif DeviceType.AGENT.code == call.call_type:
|
|
|
+ _record_url = self.start_recording(device_id, get_record_file_name(call_id, CallStage.AGENT), call)
|
|
|
+ else:
|
|
|
+ _record_url = self.start_recording(device_id, get_record_file_name(call_id, CallStage.ALL), call)
|
|
|
+ return _record_url
|
|
|
|
|
|
def start_recording(self, device_id, file_name, call: CallInfo):
|
|
|
record_url = get_record_prefix(call) + '/' + file_name + '.wav'
|