|
@@ -548,24 +548,20 @@ class OutboundClient:
|
|
|
traceback.print_exc()
|
|
|
|
|
|
def build_call_info(self, call_id, device_id, new_device_id, destination, **kwargs):
|
|
|
- agent = Cache.get_agent_info(saasId, destination)
|
|
|
- route_gateway = Cache.get_route_gateway(saasId)
|
|
|
caller = kwargs.get('Channel-Caller-ID-Number')
|
|
|
called = destination
|
|
|
now = datetime.utcnow().timestamp()
|
|
|
|
|
|
- call_info = CallInfo(call_id=call_id, agent_key=agent.agent_number, sip_server=agent.sip_server,
|
|
|
+ call_info = CallInfo(call_id=call_id, agent_key=destination,
|
|
|
caller=caller, called=called, direction=Direction.INBOUND.code,
|
|
|
call_type=CallType.BOOT_CALL.code, call_time=now,
|
|
|
uuid1=call_id, uuid2=device_id, saas_id=saasId)
|
|
|
device_custom = DeviceInfo(device_id=device_id, call_time=now,
|
|
|
call_id=call_id, device_type=DeviceType.CUSTOMER.code,
|
|
|
- agent_key=agent.agent_number, caller_display=route_gateway.name,
|
|
|
- cdr_type=CdrType.INBOUND.code)
|
|
|
+ agent_key=destination, cdr_type=CdrType.INBOUND.code)
|
|
|
device_bot = DeviceInfo(device_id=new_device_id, call_time=now,
|
|
|
call_id=call_id, device_type=DeviceType.ROBOT.code,
|
|
|
- agent_key=agent.agent_number, caller_display=route_gateway.name,
|
|
|
- cdr_type=CdrType.INBOUND.code)
|
|
|
+ agent_key=destination, cdr_type=CdrType.INBOUND.code)
|
|
|
|
|
|
call_info.device_list.append(device_id)
|
|
|
call_info.device_list.append(new_device_id)
|