davidliu 4 miesięcy temu
rodzic
commit
98a767b70f
2 zmienionych plików z 13 dodań i 9 usunięć
  1. 7 4
      src/core/callcenter/call.py
  2. 6 5
      src/core/callcenter/esl/client.py

+ 7 - 4
src/core/callcenter/call.py

@@ -35,10 +35,12 @@ class CallService:
                              caller=agent.agent_number, called=request.called, direction=Direction.INBOUND.code,
                              caller_display=request.caller_display, called_display=request.called_display,
                              call_type=request.call_type.code, call_time=now, follow_data=request.follow_data,
-                             uuid1=request.uuid1, uuid2=request.uuid2, saas_id=saasId, device_list=[],device_info_map = {},
-                             process_data = {}, next_commands=[], call_details=[])
+                             uuid1=request.uuid1, uuid2=request.uuid2, saas_id=saasId,
+                             core_uuid=None, conference=None, group_id=None, hidden_customer=0, number_location=None, agent_name=None, login_type=None, ivr_id=None, task_id=None, media_host=None, client_host=None, record=None, record2=None, record_time=None, answer_flag=None, wait_time=None, answer_count=0, hangup_dir=None, sdk_hangup=0, hangup_code=None, answer_time=None, end_time=None, talk_time=None, first_queue_time=None, queue_start_time=None, queue_end_time=None, overflow_count=0, cdr_notify_url=None, queue_level=None, transfer_agent=None, device_list=[], device_info_map = {}, process_data = {}, next_commands=[], call_details=[])
         device_info = DeviceInfo(cti_flow_id=request.cti_flow_id, device_id=device_id, call_time=now, call_id=call_id, device_type=DeviceType.AGENT.code,
-                                 agent_key=agent.agent_number, caller_display=route_gateway.name, cdr_type=CdrType.INBOUND.code)
+                                 agent_key=agent.agent_number, caller_display=route_gateway.name, cdr_type=CdrType.INBOUND.code,
+                                 conference=None, agent_name=None, from_agent=None, caller=None, called=None, display=None, called_location=None, caller_location=None, ring_start_time=None, ring_end_time=None, answer_time=None, bridge_time=None, end_time=None, talk_time=None, sip_protocol=None, channel_name=None, hangup_cause=None, ring_cause=None, sip_status=None, record=None, record_time=None, record_start_time=None, state=None, apparent_number=None,
+                                 )
         call_info.device_list.append(device_id)
         self.logger.info("liuwei::debugger:1111::call_id=%s, device_id=%s"%(call_id, device_id))
         call_info.next_commands.append(NextCommand(device_id, NextType.NEXT_CALL_OTHER.code))
@@ -90,7 +92,8 @@ class CallService:
         now = datetime.utcnow().timestamp()
 
         device_info = DeviceInfo(device_id=device_id, caller=caller, display=caller, called=agent_number, call_id=call_id,
-                            call_time=now, cdr_type=CdrType.TRANSFER.code, device_type=DeviceType.AGENT.code)
+                            call_time=now, cdr_type=CdrType.TRANSFER.code, device_type=DeviceType.AGENT.code,
+                            cti_flow_id=None, agent_key=None, agent_name=None, from_agent=None, called_location=None, caller_location=None, ring_start_time=None, ring_end_time=None, answer_time=None, bridge_time=None, end_time=None, talk_time=None, sip_protocol=None, channel_name=None, hangup_cause=None, ring_cause=None, sip_status=None, record=None, record_time=None, record_start_time=None, state=None, apparent_number=None, caller_display=None)
         call_info.device_list.append(device_id)
         self.logger.info("liuwei::debugger:2222::call_id=%s, device_id=%s" % (call_id, device_id))
 

+ 6 - 5
src/core/callcenter/esl/client.py

@@ -592,15 +592,16 @@ class OutboundClient:
             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_list=[],
-                                 device_info_map = {}, follow_data = {},
-                                 process_data = {}, next_commands=[], call_details=[])
+                                 uuid1=call_id, uuid2=device_id, saas_id=saasId,
+                                 core_uuid=None, cti_flow_id=None, conference=None, group_id=None, hidden_customer=0, caller_display=None, called_display=None, number_location=None, agent_name=None, login_type=None, ivr_id=None, task_id=None, media_host=None, sip_server=None, client_host=None, record=None, record2=None, record_time=None, answer_flag=None, wait_time=None, answer_count=0, hangup_dir=None, sdk_hangup=0, hangup_code=None, answer_time=None, end_time=None, talk_time=None, first_queue_time=None, queue_start_time=None, queue_end_time=None, overflow_count=0, cdr_notify_url=None, queue_level=None, transfer_agent=None,device_list=[], device_info_map = {}, follow_data = {}, process_data = {}, next_commands=[], call_details=[])
             device_custom = DeviceInfo(device_id=device_id, call_time=now,
                                      call_id=call_id, device_type=DeviceType.CUSTOMER.code,
-                                     agent_key=destination, cdr_type=CdrType.OUTBOUND.code)
+                                     agent_key=destination, cdr_type=CdrType.OUTBOUND.code,
+                                     cti_flow_id=None, conference=None, agent_name=None, from_agent=None, caller=None, called=None, display=None, called_location=None, caller_location=None, ring_start_time=None, ring_end_time=None, answer_time=None, bridge_time=None, end_time=None, talk_time=None, sip_protocol=None, channel_name=None, hangup_cause=None, ring_cause=None, sip_status=None, record=None, record_time=None, record_start_time=None, state=None, apparent_number=None, caller_display=None)
             device_bot = DeviceInfo(device_id=new_device_id, call_time=now,
                                      call_id=call_id, device_type=DeviceType.ROBOT.code,
-                                     agent_key=destination, cdr_type=CdrType.INBOUND.code)
+                                     agent_key=destination, cdr_type=CdrType.INBOUND.code,
+                                     cti_flow_id=None, conference=None, agent_name=None, from_agent=None, caller=None, called=None, display=None, called_location=None, caller_location=None, ring_start_time=None, ring_end_time=None, answer_time=None, bridge_time=None, end_time=None, talk_time=None, sip_protocol=None, channel_name=None, hangup_cause=None, ring_cause=None, sip_status=None, record=None, record_time=None, record_start_time=None, state=None, apparent_number=None, caller_display=None)
 
             call_info.device_list.append(device_id)
             self.server.logger.info("liuwei::debugger:3333::call_id=%s, device_id=%s" % (call_id, device_id))