|
@@ -30,7 +30,7 @@ class AgentCallRequest(BaseApi):
|
|
"""
|
|
"""
|
|
|
|
|
|
def __init__(self, saas_id, agent_id, call_type: CallType, caller, called, caller_display="", called_display="",
|
|
def __init__(self, saas_id, agent_id, call_type: CallType, caller, called, caller_display="", called_display="",
|
|
- uuid1=None, uuid2=None, follow_data: Dict[str, Any] = {}):
|
|
|
|
|
|
+ cti_flow_id=None, uuid1=None, uuid2=None, follow_data: Dict[str, Any] = {}):
|
|
# 租户id
|
|
# 租户id
|
|
self.saas_id = saas_id
|
|
self.saas_id = saas_id
|
|
# 坐席号
|
|
# 坐席号
|
|
@@ -45,6 +45,7 @@ class AgentCallRequest(BaseApi):
|
|
self.caller_display = caller_display
|
|
self.caller_display = caller_display
|
|
# 被叫显号,接口没传就用主技能配置
|
|
# 被叫显号,接口没传就用主技能配置
|
|
self.called_display = called_display
|
|
self.called_display = called_display
|
|
|
|
+ self.cti_flow_id = cti_flow_id
|
|
# uuid1
|
|
# uuid1
|
|
self.uuid1 = uuid1
|
|
self.uuid1 = uuid1
|
|
# uuid2
|
|
# uuid2
|
|
@@ -205,7 +206,7 @@ class MakeCallContext(BaseApi):
|
|
device_type: Optional[int] = None,
|
|
device_type: Optional[int] = None,
|
|
timeout: Optional[int] = 30,
|
|
timeout: Optional[int] = 30,
|
|
originate_timeout: Optional[int] = 30,
|
|
originate_timeout: Optional[int] = 30,
|
|
- sip_header_map: Optional[Dict[str, str]] = [],
|
|
|
|
|
|
+ sip_header_map: Optional[Dict[str, str]] = {},
|
|
called_prefix: Optional[str] = "",
|
|
called_prefix: Optional[str] = "",
|
|
service_id: Optional[str] = None,
|
|
service_id: Optional[str] = None,
|
|
call_type: Optional[int] = None):
|
|
call_type: Optional[int] = None):
|
|
@@ -432,7 +433,7 @@ class AgentInfo(BaseApi):
|
|
|
|
|
|
|
|
|
|
class CallInfo(BaseApi):
|
|
class CallInfo(BaseApi):
|
|
- def __init__(self, core_uuid=None, call_id=None, conference=None, saas_id=None, group_id=None,
|
|
|
|
|
|
+ def __init__(self, core_uuid=None, cti_flow_id=None, call_id=None, conference=None, saas_id=None, group_id=None,
|
|
hidden_customer=0, caller_display=None, caller=None, called_display=None, called=None,
|
|
hidden_customer=0, caller_display=None, caller=None, called_display=None, called=None,
|
|
number_location=None, agent_key=None, agent_name=None, login_type=None, ivr_id=None, task_id=None,
|
|
number_location=None, agent_key=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,
|
|
media_host=None, sip_server=None, client_host=None, record=None, record2=None, record_time=None,
|
|
@@ -443,6 +444,7 @@ class CallInfo(BaseApi):
|
|
device_info_map: Dict[str, Any] = {}, follow_data: Dict[str, Any] = {},
|
|
device_info_map: Dict[str, Any] = {}, follow_data: Dict[str, Any] = {},
|
|
process_data: Dict[str, Any] = {}, next_commands=[], call_details=[]):
|
|
process_data: Dict[str, Any] = {}, next_commands=[], call_details=[]):
|
|
self.core_uuid = core_uuid # 通话唯一标识
|
|
self.core_uuid = core_uuid # 通话唯一标识
|
|
|
|
+ self.cti_flow_id = cti_flow_id
|
|
self.call_id = call_id # 通话唯一标识
|
|
self.call_id = call_id # 通话唯一标识
|
|
self.conference = conference # 会议号
|
|
self.conference = conference # 会议号
|
|
self.saas_id = saas_id # 企业id
|
|
self.saas_id = saas_id # 企业id
|
|
@@ -501,8 +503,8 @@ class CallInfo(BaseApi):
|
|
next_commands = [NextCommand(**x) for x in data.get('next_commands', [])]
|
|
next_commands = [NextCommand(**x) for x in data.get('next_commands', [])]
|
|
call_details = [CallDetail(**x) for x in data.get('call_details', [])]
|
|
call_details = [CallDetail(**x) for x in data.get('call_details', [])]
|
|
|
|
|
|
- return cls(core_uuid=data.get('core_uuid'), call_id=data.get('call_id'), conference=data.get('conference'),
|
|
|
|
- saas_id=data.get('saas_id'), group_id=data.get('group_id'),
|
|
|
|
|
|
+ return cls(core_uuid=data.get('core_uuid'), cti_flow_id=data.get('cti_flow_id'), call_id=data.get('call_id'),
|
|
|
|
+ conference=data.get('conference'), saas_id=data.get('saas_id'), group_id=data.get('group_id'),
|
|
hidden_customer=data.get('hidden_customer'), caller_display=data.get('caller_display'),
|
|
hidden_customer=data.get('hidden_customer'), caller_display=data.get('caller_display'),
|
|
caller=data.get('caller'), called_display=data.get('called_display'), called=data.get('called'),
|
|
caller=data.get('caller'), called_display=data.get('called_display'), called=data.get('called'),
|
|
number_location=data.get('number_location'), agent_key=data.get('agent_key'),
|
|
number_location=data.get('number_location'), agent_key=data.get('agent_key'),
|
|
@@ -528,6 +530,7 @@ class CallInfo(BaseApi):
|
|
def to_json_string(self):
|
|
def to_json_string(self):
|
|
new_dict = {
|
|
new_dict = {
|
|
"core_uuid": self.core_uuid,
|
|
"core_uuid": self.core_uuid,
|
|
|
|
+ "cti_flow_id": self.cti_flow_id,
|
|
"call_id": self.call_id,
|
|
"call_id": self.call_id,
|
|
"conference": self.conference,
|
|
"conference": self.conference,
|
|
"saas_id": self.saas_id,
|
|
"saas_id": self.saas_id,
|
|
@@ -581,12 +584,13 @@ class CallInfo(BaseApi):
|
|
|
|
|
|
|
|
|
|
class DeviceInfo(BaseApi):
|
|
class DeviceInfo(BaseApi):
|
|
- def __init__(self, call_id=None, conference=None, device_id=None, agent_key=None, agent_name=None, device_type=None,
|
|
|
|
|
|
+ def __init__(self, cti_flow_id=None, call_id=None, conference=None, device_id=None, agent_key=None, agent_name=None, device_type=None,
|
|
cdr_type=None, from_agent=None, caller=None, called=None, display=None, called_location=None,
|
|
cdr_type=None, from_agent=None, caller=None, called=None, display=None, called_location=None,
|
|
caller_location=None, call_time=None, ring_start_time=None, ring_end_time=None, answer_time=None,
|
|
caller_location=None, call_time=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,
|
|
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,
|
|
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):
|
|
record_start_time=None, state=None, apparent_number=None, caller_display=None):
|
|
|
|
+ self.cti_flow_id = cti_flow_id
|
|
self.call_id = call_id # 通话唯一标识
|
|
self.call_id = call_id # 通话唯一标识
|
|
self.conference = conference # 会议模式
|
|
self.conference = conference # 会议模式
|
|
self.device_id = device_id # 设备id
|
|
self.device_id = device_id # 设备id
|