REST API文档

高级配置-自动外呼

自动外呼

信息说明如下:

参数说明
idID
dest_number被叫号码
group_id所属任务组ID
external_id外部 ID
uuid通话UUID
call_status呼叫状态(calling呼叫中, done, stop手动停止)
outbound_call是否发起过外呼(0:发起过 1:未发起过)
call_start_time呼叫开始时间
call_end_time呼叫结束时间
cause挂机原因
created_at创建时间
updated_at更新时间
deleted_at删除时间

查询自动外呼信息

  • 请求 URL/api/out_call_tasks
  • 请求 URL/api/out_call_tasks?perPage=500&page=1&name=test&status=init

注:根据任务名称或任务状态查询(其中 name 为任务名称,status 为任务状态,page 为页数,perPage 为每页显示条数)

  • 请求方式GET

  • Body 信息:无

  • 返回值

{
	"page":	1,
	"data":	[{
			"auto_record":	"0",
			"description":	"",
			"task_end_time":	"",
			"dest_context":	"",
			"group_confirm_file":	"",
			"status":	"init",
			"cid_name":	"",
			"total":	0,
			"done":	0,
			"deleted_at":	"",
			"group_confirm_read_timeout":	"",
			"updated_at":	"2026-04-24 05:18:23",
			"created_at":	"2026-04-24 05:18:23",
			"id":	"1",
			"action":	"",
			"task_start_time":	"",
			"context":	"",
			"max_concurrency":	"1",
			"disable_ring_back":	"1",
			"data":	"",
			"group_name":	"test",
			"max_caps":	"1",
			"auto_dial":	"0",
			"group_confirm_key":	"",
			"cid_number":	"",
			"calling_time":	"30"
		}],
	"rowCount":	1,
	"pageCount":	1
}

查看指定自动外呼表的配置参数

  • 请求 URL/api/out_call_tasks/$id
  • 请求方式GET
  • Body 信息:无
  • 返回值
{
	"done_total": "0/0",
	"id": 1,
	"action": "",
	"auto_record": 0,
	"task_start_time": "",
	"context": "",
	"task_end_time": "",
	"group_confirm_file": "",
	"description": "",
	"updated_at": "2026-04-24 05:18:23",
	"data": "",
	"created_at": "2026-04-24 05:18:23",
	"calling_time": 30,
	"max_concurrency": 1,
	"disable_ring_back": 1,
	"group_name": "test",
	"group_confirm_key": "",
	"auto_dial": 0,
	"max_caps": 1,
	"cid_name": "",
	"status": "init",
	"deleted_at": "",
	"cid_number": "",
	"dest_context": ""
}

返回信息说明如下:

参数说明
done_total完成数量统计
idID
action执行动作
auto_record自动录音开关
task_start_time任务开始时间
context呼叫源
task_end_time任务结束时间
group_confirm_file确认文件
description任务描述
updated_at更新时间
data数据
created_at创建时间
calling_time呼叫超时时间
max_concurrency最大并发数
disable_ring_back关闭回铃音
group_name任务组名称
group_confirm_key群组确认密钥
auto_dial自动外呼开关
max_caps最大并发上限
cid_name主叫名称
status任务状态
deleted_at删除时间
cid_number主叫号码
dest_context出局呼叫源

创建新的自动外呼

  • 请求 URL/api/out_call_tasks
  • 请求方式POST
  • Body 信息
参数说明
group_name任务名称
description描述

Body

{
  "group_name": "test2",
  "description": "test"
}
  • 返回值
{
	"message":	"success",
	"data":	3,
	"code":	200
}

修改指定自动外呼表

修改基本信息

  • 请求 URL/api/out_call_tasks/$id
  • 请求方式PUT
  • Body 信息
参数说明
group_name任务名称
description描述
cid_number主叫号码
cid_name主叫名称
{
  "group_name": "test1",
  "description": "test",
  "cid_number": "1000",
  "cid_name": "1000"
}
  • 返回值
{
	"code":	200,
	"message":	"success",
	"data":	"1"
}

修改呼叫设置

  • 请求 URL/api/out_call_tasks/$id
  • 请求方式PUT
  • Body 信息
参数说明
dest_context出局呼叫源
calling_time超时时长
max_capsCAPS
max_concurrency最大并发呼叫数
task_start_time任务开始时间
auto_dial定时任务开关
disable_ring_back回铃音开关
auto_record自动录音开关
{
  "dest_context": "context-1",
  "calling_time": 30,
  "max_caps": 1,
  "max_concurrency": 1,
  "task_start_time": "",
  "auto_dial": 0,
  "disable_ring_back": 1,
  "auto_record": 0
}
  • 返回值
{
	"code":	200,
	"message":	"success",
	"data":	"1"
}

修改呼叫确认

  • 请求 URL/api/out_call_tasks/$id
  • 请求方式PUT
  • Body 信息
参数说明
group_confirm_key确认键
group_confirm_read_timeout按键超时
group_confirm_file确认文件
{
  "group_confirm_key": "1",
  "group_confirm_read_timeout": "2",
  "group_confirm_file": "{\"media_id\":205,\"media_path\":\"phrase:welcome_short@xui\",\"media_type\":\"SYSTEM\",\"media_name\":\"welcome_short\"}"
}
  • 返回值
{
	"code":	200,
	"message":	"success",
	"data":	"1"
}

修改接通后动作

  • 请求 URL/api/out_call_tasks/$id
  • 请求方式PUT
  • Body 信息
参数说明
action动作
data数据
group_confirm_file确认文件
{
  "action": "playback",
  "data": "{\"media_id\":205,\"media_path\":\"phrase:welcome_short@xui\",\"media_type\":\"SYSTEM\",\"media_name\":\"welcome_short\"}",
  "group_confirm_file": "{\"media_type\":\"SYSTEM\",\"media_id\":205,\"media_name\":\"welcome_short\",\"media_path\":\"phrase:welcome_short@xui\"}"
}
  • 返回值
{
	"code":	200,
	"message":	"success",
	"data":	"1"
}

创建被叫号码表

  • 请求 URL/api/out_call_tasks/$id/import
  • 请求方式POST
  • Body 信息
参数说明
dest_number被叫号码
external_id外部 ID
{
  "data": [
    {
      "dest_number": "1000",
      "external_id": ""
    }
  ]
}
  • 返回值
{
	"data":	"{}",
	"code":	200,
	"message":	"success"
}

查看被叫号码表

  • 请求 URL/api/out_call_tasks/$id/numbers

  • 请求方式GET

  • Body 信息:无

  • 返回值

{
	"pageCount":	1,
	"data":	[{
			"outbound_call":	"1",
			"id":	"7",
			"dest_number":	"111",
			"dtmf":	"",
			"cause":	"",
			"call_answer_time":	"",
			"call_status":	"init",
			"created_at":	"2026-04-24 08:19:50",
			"external_id":	"7",
			"group_id":	"1",
			"updated_at":	"2026-04-24 08:19:50",
			"call_end_time":	"",
			"call_start_time":	"",
			"uuid":	"",
			"deleted_at":	""
		}, {
			"outbound_call":	"1",
			"id":	"6",
			"dest_number":	"",
			"dtmf":	"",
			"cause":	"",
			"call_answer_time":	"",
			"call_status":	"init",
			"created_at":	"2026-04-24 08:17:20",
			"external_id":	"",
			"group_id":	"1",
			"updated_at":	"2026-04-24 08:17:20",
			"call_end_time":	"",
			"call_start_time":	"",
			"uuid":	"",
			"deleted_at":	""
		}],
	"page":	1,
	"rowCount":	2
}

导出被叫号码表

  • 请求 URL/api/out_call_tasks/$id/download

  • 请求方式GET

  • Body 信息:无

  • 返回值

[
    [
        "任务名称",
        "接通后动作",
        "被叫号码",
        "呼叫状态",
        "呼叫开始时间",
        "呼叫应答时间",
        "呼叫结束时间",
        "总时长",
        "计费时长",
        "挂机原因"
    ],
    [
        "test1",
        "放音",
        "1000",
        "init",
        "",
        "",
        "",
        ""
    ]
]

启动/关闭自动外呼

启动自动外呼

  • 请求 URLapi/out_call_tasks
  • 请求方式PUT
  • Body 信息
{
  "action": "start",
  "data": [
    "2"
  ]
}
  • 返回值
{
	"data":	[{
			"task_start_time":	"now()",
			"data_id":	"2",
			"updated_at":	"now()",
			"status":	"running"
		}],
	"code":	200,
	"message":	"success"
}

关闭自动外呼

  • 请求 URLapi/out_call_tasks
  • 请求方式PUT
  • Body 信息
{
  "action": "stop",
  "data": [
    "2"
  ]
}
  • 返回值
{
	"message":	"success",
	"data":	[{
			"status":	"stop",
			"data_id":	"2",
			"updated_at":	"now()",
			"task_end_time":	"now()"
		}],
	"code":	200
}

克隆自动外呼

  • 请求 URL/api/out_call_tasks/clone
  • 请求方式POST
  • Body 信息
参数说明
group_name任务名称
description描述
is_clone_numbers是否包含所有被叫号码
idID

Body

{
  "group_name": "test3",
  "description": "test",
  "is_clone_numbers": true,
  "id": 2
}
  • 返回值
{
	"code":	200,
	"data":	4,
	"message":	"success"
}

删除指定自动外呼表

  • 请求 URL/api/out_call_tasks/$id
  • 请求方式DELETE
  • Body 信息:无
  • 返回值
{
	"message":	"success",
	"data":	"2",
	"code":	200
}
高级配置-菜单