import request from '@/utils/request'

// 查询aiSIP手动外呼通话记录列表
export function listOutboundCdr(query) {
  return request({
    url: '/his/aiSipCall/outboundCdr/list',
    method: 'get',
    params: query
  })
}

// 查询aiSIP手动外呼通话记录详细
export function getOutboundCdr(id) {
  return request({
    url: '/his/aiSipCall/outboundCdr/' + id,
    method: 'get'
  })
}

// 新增aiSIP手动外呼通话记录
export function addOutboundCdr(data) {
  return request({
    url: '/his/aiSipCall/outboundCdr',
    method: 'post',
    data: data
  })
}

// 修改aiSIP手动外呼通话记录
export function updateOutboundCdr(data) {
  return request({
    url: '/his/aiSipCall/outboundCdr',
    method: 'put',
    data: data
  })
}

// 删除aiSIP手动外呼通话记录
export function delOutboundCdr(id) {
  return request({
    url: '/his/aiSipCall/outboundCdr/' + id,
    method: 'delete'
  })
}

// 导出aiSIP手动外呼通话记录
export function exportOutboundCdr(query) {
  return request({
    url: '/his/aiSipCall/outboundCdr/export',
    method: 'get',
    params: query
  })
}
// 取手动外呼客户沟通信息
export function getCustCommunicationInfo(phoneNum,callType,uuid,dialMode) {
  return request({
    url: '/company/aiSipCall/outboundCdr/getCustCommunicationInfo?phoneNum=' +  phoneNum + "&callType=" + callType + "&uuid=" + uuid + "&dialMode=" + dialMode,
    method: 'get'
  })
}

// 新增保存手动外呼沟通记录
export function addCustcallrecord(data) {
  return request({
    url: '/his/aiSipCall/outboundCdr/add/custcallrecord',
    method: 'post',
    data: data
  })
}
// 获取加密电话
export function encryptMobile(data) {
  return request({
    url: '/his/aiSipCall/outboundCdr/encryptMobile',
    method: 'post',
    data: data
  })
}

// 同步当前通话记录
export function callEndSyncByUuid(data) {
  return request({
    url: '/his/aiSipCall/outboundCdr/callEndSyncByUuid',
    method: 'post',
    data: data
  })
}

