REST API文档

用户管理

用户

用户指人,可以登录到系统 Web 界面,或拥有一次资源(如分机)、操作权限等。

用户信息说明如下:

字段必选类型备注
idstring用户 ID,自动生成
loginstring登录名,必填
namestring姓名
passwordstring密码
extnstring默认分机号
cid_namestring主叫名称,默认为$name
cid_numberstring主叫号码,默认为$extn
contextstring呼叫源,默认为context-1
domainstring域,多租户中必选
vm_passwordstringVoiceMail 密码
emailstringEMAIL,暂未用
typestring用户类型,参加下面用户类型列表
telstring关联的手机号
auto_recordinit是否自动录音,默认为否 0,开启为 1
disabledinit禁止登录,分机失效 ,默认为 0, 禁用为 1
agent_infoJSONB当用户类型为坐席时,初始化坐席相关参数。默认为'{}'
ha1bstring登录名@域+域+密码三个字段 md5 加密后的值
tel_enabledinit默认为 0
saltstring加盐
sha1stringsha1 加密后的值
is_superinit默认为 0
extn_idinit选择创建分机时,会向 extenion 中新增一条分机数据,该字段为分机 id
last_login_attimestamp只读,最后一次登录时间
created_attimestamp只读,创建时间
updated_attimestamp只读,最后更新时间
deleted_attimestamp只读,删除时间

用户类型:

  • NORMAL:普通用户
  • AGENT:坐席,在呼叫中心中使用,坐席具有普通用户所有的权限
  • CONFMAN:会议管理员,能管理会议,具有普通用户所有的权限

特别注意

所有涉及密码的接口数据请自行修改为复杂密码,防止因为密码过于简单导致系统被攻击。

创建用户同时创建用户分机

创建用户信息说明如下:

字段必选类型备注
loginstring登录名,必填
namestring姓名
passwordstring密码,必填,由大写字母+小写字母+数字+特殊符号组成,且在 8-20 位之间
typestring用户类型,默认为NORMAL

带有分机号用户信息说明如下:

字段必选类型备注
extnstring默认分机号
contextstring呼叫源,可选
extn_passwordstring分机号密码,必填,由大写字母+小写字母+数字组成,且在 8-20 位之间
  • 请求 URL/api/users
  • 请求方式POST
  • 消息头Content-Type: application/json
  • Body 信息: 参见用户信息说明。如:
{
  "login": "cherry",
  "name": "小樱桃",
  "password": "123!@#QWEqwe"
}
  • 返回值

正常返回一个 JSON Object,data 中只包含id

返回字段必选类型备注
idint用户 ID

如果出错,返回 HTTP 状态码如403500等,详见HTTP 状态码参考JSON 返回格式参考相关内容。

  • 其它说明:无
  • curl 示例
curl -0 -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" \
-H "Content-Type: application/json" \
-d '{"login":"cherry","name":"小樱桃","password":"123!@#QWEqwe"}' \
"192.168.0.1:8081/api/users"

返回:

{
  "code": 200,
  "data": 32,
  "message": "success"
}

批量创建用户

批量创建用户信息说明如下:

字段必选类型备注
users_startstring开始号码,必填
users_endstring结束号码,必填
passwordstring密码,必填,由大写字母+小写字母+数字+特殊符号组成,且在 8-20 位之间
typestring用户类型,默认为NORMAL
extn_passwordstring分机号密码,可选,若有值,则同时创建分机,由大写字母+小写字母+数字组成,且在 8-20 位之间
contextstring呼叫源,可选
  • 请求 URL: /api/users/muti_add
  • 请求方式: POST
  • 消息头: Content-Type: application/json
  • Body 信息: 参见分配器信息说明。

Body:

{
  "users_start": 2011,
  "users_end": 2012,
  "password": "Xswitch.cn/6753997!Qqa",
  "type": "NORMAL",
  "context": "context-1",
  "extn_password": "123qaQQQ"
}

返回:

{
  "data": [
    {
      "email": "",
      "tel_enabled": 0,
      "login": "2011",
      "deleted_at": "",
      "tel": "",
      "created_at": "2023-03-17 01:02:38",
      "agent_info": "{}",
      "updated_at": "2023-03-17 01:02:38",
      "last_login_at": "",
      "extn": "2011",
      "is_super": 0,
      "auto_record": 0,
      "type": "NORMAL",
      "password": "Xswitch.cn/6753997!Qqa",
      "ha1": "6b2f4520f0f925f8f08c1249e0c178c1",
      "name": "2011",
      "context": "context-1",
      "extn_id": 0,
      "vm_password": "",
      "ha1b": "2620139be102567d75de062931e58b15",
      "domain": "192.168.31.98",
      "cid_name": "",
      "id": 44,
      "cid_number": ""
    },
    {
      "email": "",
      "tel_enabled": 0,
      "login": "2012",
      "deleted_at": "",
      "tel": "",
      "created_at": "2023-03-17 01:02:38",
      "agent_info": "{}",
      "updated_at": "2023-03-17 01:02:38",
      "last_login_at": "",
      "extn": "2012",
      "is_super": 0,
      "auto_record": 0,
      "type": "NORMAL",
      "password": "Xswitch.cn/6753997!Qqa",
      "ha1": "8bf8153d51fb13cba01a85670ac3cbcd",
      "name": "2012",
      "context": "context-1",
      "extn_id": 0,
      "vm_password": "",
      "ha1b": "32ce02f6c4daa7580dcc29c63d4cd2d8",
      "domain": "192.168.31.98",
      "cid_name": "",
      "id": 45,
      "cid_number": ""
    }
  ],
  "code": 200,
  "message": "success"
}
  • curl 示例:
curl -XPOST -H "X-XTRA-AUTH-ID: 790480b3-d930-435a-87c4-6990e01cafc9" -d '{"users_start": 2011,"users_end": 2012,"password": "Xswitch.cn/6753997!Qqa","type": "NORMAL","extn_password": "123qaQQQ","context":"context-1"}' -H "Content-Type: application/json" "http://192.168.31.98:8081/api/users/muti_add"

删除用户

  • 请求 URL/api/users/$id
  • 请求方式DELETE
  • 消息头:无
  • 返回值:对象,包含被删除用户的 ID,如 {"id": "3"}
  • 示例
curl -0 -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" -XDELETE 192.168.1.100:8081/api/users/3

返回: {"id": "3"}

修改用户

  • 请求 URL/api/users/$id
  • 请求方式PUT
  • 消息头Content-Type: application/json
  • Body 信息:参见用户信息说明
  • 返回值: 对象,包含被修改的用户的 ID,如: {"id": "3"}
  • 示例
PUT http://192.168.1.100:8081/api/users/3

Body:

{
  "login": "36",
  "name": "36",
  "vm_password": "36",
  "domain": "xswitch.cn",
  "type": "NORMAL",
  "tel": "123456789",
  "auto_record": "0",
  "tel_enabled": "0"
}
  • curl 示例
curl -XPUT -H "X-XTRA-AUTH-ID: 790480b3-d930-435a-87c4-6990e01cafc9" -H "Content-Type: applcation/json" -d '{"login": "36","name": "36","vm_password": "36","domain": "xswitch.cn","type": "NORMAL","tel": "1234567890000","auto_record": "0","tel_enabled": "0"}' "192.168.3.16:8081/api/users/49"

返回:

{
  "data": "49",
  "message": "success",
  "code": 200
}
  • 其它说明

如果在请求参数中包含用户的 ID,则会被忽略。

修改用户密码

  • 请求 URL: /api/users/change_password
  • 请求方式: PUT
  • 消息头: Content-Type: application/json
  • Body 信息: 参见用户信息说明
  • 返回值: status 200 OK
  • 示例:
PUT http://192.168.1.100:8081/api/users/change_password

Body:

{
  "password": "1qazQAZ!@4",
  "old_password": "1qazQAZ!@5",
  "domain": "192.168.31.98",
  "id": "39"
}
  • curl 示例:
curl -XPUT -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" \
-H "Content-Type: application/json" \
-d '{"id":"39","password":"1qazQAZ!@4","old_password": "1qazQAZ!@5","domain": "192.168.31.98"}' \
"192.168.1.100:8081/api/users/change_password"

返回:

{
  "code": 200,
  "data": "{}",
  "message": "success"
}

查看用户

  • 请求 URL/api/users 返回所有用户
  • 请求 URL/api/users? 返回所有用户
  • 请求 URL/api/users?page=1&perPage=10&login=1001&name=张三&type=NORMAL 支持用户名、名称、类型等查询
  • 请求 URL/api/users/$id 返回指定 ID 的用户
  • 请求方式GET
  • 返回值: 用户对象,如果找不到会返回 HTTP 状态码404
返回值结果
JSON 字符串成功
404失败
  • 示例
GET /api/users/1

返回:

{
  "extn": "admin",
  "cid_name": "",
  "context": "context-1",
  "ha1b": "747e17632f2443bfdbef0113eba4a266",
  "name": "Admin",
  "type": "",
  "last_login_at": "2022-05-11 09:44:44",
  "deleted_at": "",
  "id": 1,
  "login": "admin",
  "updated_at": "2022-05-11 09:44:44",
  "ha1": "fd4500fcb6ccd4ee87d5debac892ac59",
  "created_at": "2022-05-11 09:43:15",
  "is_super": 1,
  "auto_record": 0,
  "email": "",
  "tel_enabled": 0,
  "tel": "",
  "cid_number": "",
  "extn_id": 0,
  "domain": "demo.xswitch.cn",
  "vm_password": ""
}
GET /api/users

返回

{
  "data": [
    {
      "cid_number": "",
      "ha1b": "",
      "auto_record": 0,
      "vm_password": "",
      "domain": "demo.xswitch.cn",
      "cid_name": "",
      "extn_id": 0,
      "extn": "",
      "tel": "",
      "deleted_at": "",
      "updated_at": "2022-05-11 09:43:16",
      "is_super": 0,
      "created_at": "2022-05-11 09:43:15",
      "last_login_at": "",
      "tel_enabled": 0,
      "context": "",
      "name": "SYSTEM",
      "ha1": "",
      "login": "system",
      "email": "",
      "type": "",
      "id": 0
    },
    {
      "cid_number": "",
      "ha1b": "747e17632f2443bfdbef0113eba4a266",
      "auto_record": 0,
      "vm_password": "",
      "domain": "demo.xswitch.cn",
      "cid_name": "",
      "extn_id": 0,
      "extn": "admin",
      "tel": "",
      "deleted_at": "",
      "updated_at": "2022-05-11 09:44:44",
      "is_super": 1,
      "created_at": "2022-05-11 09:43:15",
      "last_login_at": "2022-05-11 09:44:44",
      "tel_enabled": 0,
      "context": "context-1",
      "name": "Admin",
      "ha1": "fd4500fcb6ccd4ee87d5debac892ac59",
      "login": "admin",
      "email": "",
      "type": "",
      "id": 1
    }
  ],
  "pageCount": 1,
  "rowCount": 2,
  "page": 1
}
  • curl 示例
curl -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" 192.168.1.100:8081/api/users/1

查看用户分机注册情况

  • 请求 URL/api/users/list 返回所有用户下分机在线状态
  • 请求 URL/api/users/list?extn=$extn 返回指定分机号用户信息和注册信息
  • 请求方式GET

GET /api/users/list

返回

[
  {
    "extn": "admin",
    "status": "offline"
  },
  {
    "extn": "1001",
    "status": "offline"
  },
  {
    "extn": "1000",
    "status": "offline"
  }
]

GET /api/users/list?extn=1001

返回

{
  "ha1b": "6238501df8a36fe9ee9cbb4855b651e1",
  "ha1": "f0ad0f1442d65643068a0f6faeea5208",
  "extn": "1001",
  "cid_number": "",
  "email": "",
  "login": "1001",
  "is_super": 0,
  "cid_name": "bob",
  "last_login_at": "",
  "password": "Xswitch.cn/6753997",
  "context": "context-1",
  "regs": [],
  "updated_at": "2022-05-11 09:50:56",
  "auto_record": 0,
  "vm_password": "1234",
  "id": 3,
  "created_at": "2022-05-11 09:43:15",
  "domain": "demo.xswitch.cn",
  "tel": "",
  "name": "5555",
  "extn_id": 0,
  "tel_enabled": 0,
  "agent_info": "{}",
  "type": "AGENT",
  "deleted_at": ""
}
  • curl 示例
curl -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" 192.168.1.100:8081/api/users/list

查看分机注册和未注册情况

  • 请求 URL/api/users/list1 返回所有分机在线以及未在线状态
  • 请求方式GET

GET /api/users/list1

返回

{
  "reg": {
    "row_count": 2,
    "rows": [
      {
        "url": "sofia/default/sip:1003@192.168.3.107:5060;transport=tcp",
        "expires": "1666342728",
        "token": "678042420-5060-1@BJC.BGI.D.BAH",
        "reg_user": "1003",
        "network_proto": "tcp",
        "metadata": "",
        "hostname": "a7642d101231",
        "network_port": "58570",
        "realm": "xswitch.cn",
        "network_ip": "172.18.0.1"
      },
      {
        "url": "sofia/default/sip:1002@172.18.0.1:62404;transport=UDP;rinstance=3c3795973a249e7d",
        "expires": "1666340706",
        "token": "2xrd5GUgSWnixoaYvD8Xpw..",
        "reg_user": "1002",
        "network_proto": "udp",
        "metadata": "",
        "hostname": "a7642d101231",
        "network_port": "62404",
        "realm": "xswitch.cn",
        "network_ip": "172.18.0.1"
      }
    ]
  },
  "unreg": [
    {
      "status": "offline",
      "extn": "admin"
    },
    {
      "status": "offline",
      "extn": "1000"
    }
  ]
}
  • curl 示例
curl -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" 192.168.1.100:8081/api/users/list1

批量设置用户类型

  • 请求 URL/api/users/
  • 请求方式PUT

GET /api/users/

Body:

{
    "type": "AGENT",
    "idle_timeout": 60,
    "username": [
        "9",
        "8",
        "7"
    ]
}

返回值:

{
    "code": 200,
    "data": [],
    "message": "update rows 3"
}
  • curl 示例
curl --location --request PUT 'http://192.168.0.101:8081/api/users/' \
--header 'token: 01906d5e-28a0-7495-aa9f-0fdeb7212878' \
--header 'Content-Type: application/json' \
--header 'Cookie: freeswitch_xtra_session_id=01906d5e-28a0-7495-aa9f-0fdeb7212878' \
--data '{
    "type": "AGENT",
    "idle_timeout": 60,
    "username": [
        "9",
        "8",
        "7"
    ]
}'

设置用户下某分机为默认分机(用户下存在多个分机时)

  • 请求 URL/api/users/:extnID
  • 请求方式PUT

GET /api/users/4607

Body:

{
    "action": "toggle",
    "extn_id": 2510
}

返回值:

{
    "data": "4607",
    "message": "success",
    "code": 200
}
  • curl 示例
curl --location --request PUT 'http://192.168.0.101:8081/api/users/4607' \
--header 'token: 01906d5e-28a0-7495-aa9f-0fdeb7212878' \
--header 'Content-Type: application/json' \
--header 'Cookie: freeswitch_xtra_session_id=01906d5e-28a0-7495-aa9f-0fdeb7212878' \
--data '{
    "action": "toggle",
    "extn_id": 2510
}'

分机管理

分机字段信息说明如下:

字段类型备注
idPRIMARY KEY分机 ID,自动生成
namestring分机名
domainstring域名
descriptionstring描述
extnstring分机号码
passwordstring密码
vm_passwordstring语音邮箱密码
cid_numberstring主叫号码
cid_namestring主叫名称
typestring分机类型,默认 'SIP'
connect_phonestring联系方式
call_transfer_typeINTEGERDEFAULT 0 -- 呼叫转接类型,0:无设置 1:共振 2:无应答转移 3:呼叫失败转 4:无条件前转
voicemailINTEGERDEFAULT 0, --语音邮箱,0:关闭,1:开启
ringbackstring彩铃
timeoutstring超时时长
enable_ringbackINTEGERDEFAULT 0, --是否开启彩铃 0:不开启,1:开启
auto_recordINTEGERDEFAULT 0, --是否录音 0:不录音 1:录音
call_limitINTEGERDEFAULT 1, -- 呼出权限 0:不允许 1:允许
called_limitINTEGERDEFAULT 1, -- 呼入权限 0:不允许 1:允许
call_authorityINTEGERDEFAULT 4, --呼叫权限 0:紧急呼叫 1:本局呼叫,2:本地呼叫,3:国内呼叫,4:国际呼叫
interceptINTEGERDEFAULT 0, --代答功能,0:无代答,1:组代答,2:全局代答
group_namestring--组代答组名
contextstring呼叫源
user_idINTEGERDEFAULT 0 REFERENCES users(id) ON DELETE CASCADE
force_insertINTEGERDEFAULT 0, --强插,0:关闭,1:开启
force_breakdownINTEGERDEFAULT 0, --强拆,0:关闭,1:开启
eavesdropINTEGERDEFAULT 0, --监听,0:关闭,1:开启
extn_cidrstringCIDR
prioritystringDEFAULT 99, 优先级
weblogin_disabledINTEGERDEFAULT 0, 开启 web 登陆
ha1bstringextn@domain+domain+password 三个字段的 md5 值
ha1stringextn+domain+password 三个字段的 md5 值
sync_enabledINTEGERDEFAULT 0
display_orderstringDEFAULT 0
disabledINTEGERDEFAULT 0, 是否启用
enable_srtpINTEGERDEFAULT 0, 是否开启srtp,0:关闭,1:开启
forced_insertINTEGERDEFAULT 0, 被强插,0:关闭,1:开启
eavesdroppedINTEGERDEFAULT 0, 被监听,0:关闭,1:开启
interceptedINTEGERDEFAULT 0, 被代答,0:无代答,1:组代答,2
intercepted_group_nameVARCHAR被代答组名
codecVARCHAR编码
mac_addressVARCHAR话机mac地址
enable_cb_onbusyVARCHAR是否开启遇忙回呼
caller_displayINTEGERDEFAULT 1, 呼叫来显 0:不显示 1:显示
hotline_numberVARCHAR热线号码
hotline_typeVARCHAR热线设备类型
hotline_addressVARCHAR热线设备地址
enable_hotlineINTEGERDEFAULT 0, 是否开启热线
boss_extnBOOLEANDEFAULT false
secretary_extnVARCHARDEFAULT 0, 是否开启热线
dtmf_typeINTEGERDEFAULT 0, DTMF类型 0:不指定 1:info, 2:inband, 3:rfc2833
enable_extn_time_recurrencesINTEGERDEFAULT 0, 分机被叫处时间管理
enable_t38INTEGERDEFAULT 0, 启用t38 0:不启用 1:启用
forced_breakdownINTEGERDEFAULT 0, --被强拆,0:关闭,1:开启
created_atTIMESTAMP(0)DEFAULT now(), 创建时间
updated_atTIMESTAMP(0)DEFAULT now(), 更新时间
deleted_atTIMESTAMP(0)删除时间
type 类型说明
GATEWAY网关
SIPSIP
HK海康摄像头
TDMTDM
WebRTCWebRTC

创建分机

创建单个分机号信息说明如下:

字段必选类型备注
loginstring所属用户,必填
namestring姓名
passwordstring密码
extnstring分机号
contextstring呼叫源

批量创建分机号信息说明如下:

字段必选类型备注
passwordstring密码
contextstring呼叫源
extns_startstring开始号码,必填
extns_endstring结束号码,必填
user_idint所属用户 ID,必填
  • 请求 URL/api/extensions
  • 请求方式POST
  • 消息头Content-Type: application/json
  • Body 信息
{
  "name": "lis",
  "extn": "889",
  "password": "123QWEqwe",
  "context": "context-1",
  "user_id": 6
}
  • name: 分机名
  • extn:分机号码
  • password:分机注册密码,需由大写字母+小写字母+数字组合而成,且在 8-20 位之间
  • context:分机呼叫源
  • curl 示例
curl -0 -H "X-XTRA-AUTH-ID: 018fb7c0-5e52-79ed-92f4-6263b2835f1b" \
-d '{"name": "接口测试12","extn": "47789451001","context": "context-1","user_id": 6,"password": "XSwitch.cn/6753997"}' \
-H "Content-Type: application/json" "192.168.0.108:8081/api/extensions"
  • 返回值
{
	"message":	"success",
	"data":	{
		"eavesdrop":	0,
		"tmf_type":	0,
		"extn":	"47789451001",
		"mac_address":	"",
		"called_limit":	1,
		"forced_insert":	0,
		"forced_breakdown":	0,
		"ringback":	"",
		"name":	"接口测试12",
		"boss_extn":	false,
		"enable_srtp":	0,
		"weblogin_disabled":	0,
		"disabled":	0,
		"timeout":	"",
		"enable_t38":	0,
		"enable_extn_time_recurrences":	0,
		"cid_number":	"",
		"caller_display":	1,
		"dtmf_type":	0,
		"call_limit":	1,
		"eavesdropped":	0,
		"extn_cidr":	"",
		"updated_at":	"2024-05-27 10:02:19",
		"intercepted_group_name":	"",
		"created_at":	"2024-05-27 10:02:19",
		"group_name":	"",
		"call_authority":	4,
		"auto_record":	0,
		"secretary_extn":	"",
		"enable_hotline":	0,
		"hotline_address":	"",
		"hotline_type":	"",
		"force_breakdown":	0,
		"enable_cb_onbusy":	0,
		"sync_enabled":	0,
		"codec":	"",
		"ha1":	"dc093f09ebeb9a37283f22956e1d5b5e",
		"type":	"SIP",
		"description":	"",
		"password":	"XSwitch.cn/6753997",
		"connect_phone":	"",
		"domain":	"xswitch.cn",
		"hotline_number":	"",
		"vm_password":	"",
		"call_transfer_type":	0,
		"force_insert":	0,
		"deleted_at":	"",
		"user_id":	6,
		"intercepted":	0,
		"id":	2531,
		"priority":	"99",
		"display_order":	"0",
		"enable_ringback":	0,
		"intercept":	0,
		"voicemail":	0,
		"cid_name":	"",
		"ha1b":	"fe25bae9818d72a995af21faef3a3cae",
		"context":	"context-1"
	},
	"code":	200
}

批量创建分机

  • 请求 URL: /api/extensions/muti_add
  • 请求方式: POST
  • 消息头: Content-Type: application/json
  • Body 信息: 参见分配器信息说明。

Body:

{
    "extns_start": 100001,
    "extns_end": 100002,
    "password": "Lv1.rqdg6Un6ho4B",
    "context": "context-5",
    "user_id": 6
}
  • extns_start:批量创建分机起始号码
  • extns_start:批量创建分机结束号码
  • password :分机注册密码,需由大写字母+小写字母+数字组合而成,且在 8-20 位之间
  • user_id:分机归属于此 ID 对应的用户,如 0 代表 system 用户
  • context:分机呼叫源
  • curl 示例:
curl -XPOST -H "X-XTRA-AUTH-ID: 06d8b7cd-88ca-4910-a9f4-4b2c7abae23e" -d '{"extns_start": 9898959,"extns_end": 9898969,"password": "XSwitch.cn/6753997","context": "context-1","user_id": 6}' -H "Content-Type: application/json" "http://192.168.3.16:8081/api/extensions/muti_add"
  • 返回值
{
    "data": [
        {
            "tmf_type": 0,
            "password": "Lv1.rqdg6Un6ho4B",
            "cid_name": "",
            "weblogin_disabled": 0,
            "timeout": "",
            "group_name": "",
            "context": "context-5",
            "voicemail": 0,
            "enable_extn_time_recurrences": 0,
            "connect_phone": "",
            "enable_t38": 0,
            "enable_srtp": 0,
            "vm_password": "",
            "called_limit": 1,
            "deleted_at": "",
            "cid_number": "",
            "ha1b": "f6947385ed54ae16d7738d1314c533bf",
            "dtmf_type": 0,
            "description": "",
            "sync_enabled": 0,
            "id": 2554,
            "updated_at": "2024-05-31 09:29:51",
            "enable_ringback": 0,
            "secretary_extn": "",
            "priority": "99",
            "ringback": "",
            "display_order": "0",
            "call_limit": 1,
            "forced_insert": 0,
            "name": "100001",
            "boss_extn": false,
            "hotline_address": "",
            "force_breakdown": 0,
            "hotline_number": "",
            "caller_display": 1,
            "enable_cb_onbusy": 0,
            "disabled": 0,
            "mac_address": "",
            "codec": "",
            "force_insert": 0,
            "intercepted_group_name": "",
            "intercepted": 0,
            "type": "SIP",
            "eavesdropped": 0,
            "auto_record": 0,
            "hotline_type": "",
            "ha1": "342e2bf9f7b828814af3800ecf8ed73a",
            "intercept": 0,
            "eavesdrop": 0,
            "extn": "100001",
            "forced_breakdown": 0,
            "user_id": 6,
            "enable_hotline": 0,
            "domain": "xswitch.cn",
            "extn_cidr": "",
            "call_transfer_type": 0,
            "created_at": "2024-05-31 09:29:51",
            "call_authority": 4
        },
        {
            "tmf_type": 0,
            "password": "Lv1.rqdg6Un6ho4B",
            "cid_name": "",
            "weblogin_disabled": 0,
            "timeout": "",
            "group_name": "",
            "context": "context-5",
            "voicemail": 0,
            "enable_extn_time_recurrences": 0,
            "connect_phone": "",
            "enable_t38": 0,
            "enable_srtp": 0,
            "vm_password": "",
            "called_limit": 1,
            "deleted_at": "",
            "cid_number": "",
            "ha1b": "4b8bbfb59bcff8d3a80de2bb533812c9",
            "dtmf_type": 0,
            "description": "",
            "sync_enabled": 0,
            "id": 2555,
            "updated_at": "2024-05-31 09:29:51",
            "enable_ringback": 0,
            "secretary_extn": "",
            "priority": "99",
            "ringback": "",
            "display_order": "0",
            "call_limit": 1,
            "forced_insert": 0,
            "name": "100002",
            "boss_extn": false,
            "hotline_address": "",
            "force_breakdown": 0,
            "hotline_number": "",
            "caller_display": 1,
            "enable_cb_onbusy": 0,
            "disabled": 0,
            "mac_address": "",
            "codec": "",
            "force_insert": 0,
            "intercepted_group_name": "",
            "intercepted": 0,
            "type": "SIP",
            "eavesdropped": 0,
            "auto_record": 0,
            "hotline_type": "",
            "ha1": "42adeeb1dc2b16ad2d9846b93beb18a3",
            "intercept": 0,
            "eavesdrop": 0,
            "extn": "100002",
            "forced_breakdown": 0,
            "user_id": 6,
            "enable_hotline": 0,
            "domain": "xswitch.cn",
            "extn_cidr": "",
            "call_transfer_type": 0,
            "created_at": "2024-05-31 09:29:51",
            "call_authority": 4
        }
    ],
    "code": 200,
    "message": "success"
}

如果批量创建分机出现数据重复,例如创建 1106、1107 和 1008 三个分机,用户已被创建,则返回创建成功的值以及exit已存在的值,如下:

请求 Body:

{
  "extns_start": 66661,
  "extns_end": 66662,
  "password": "123QWEqwe",
  "context": "context-1",
  "user_id": 0
}

返回如下:

{
  "message": "success",
  "code": 200,
  "data": {
    "exit": [
      {
        "intercept": 2,
        "force_insert": 1,
        "sync_enabled": 0,
        "weblogin_disabled": 0,
        "group_name": "",
        "voicemail": 0,
        "context": "context-1",
        "eavesdrop": 1,
        "priority": "99",
        "force_breakdown": 1,
        "eavesdropped": 1,
        "type": "SIP",
        "display_order": "0",
        "vm_password": "",
        "call_authority": 4,
        "disabled": 0,
        "auto_record": 0,
        "description": "",
        "mac_address": "",
        "deleted_at": "",
        "updated_at": "2022-10-25 14:43:19",
        "created_at": "2022-10-25 14:43:19",
        "codec": "",
        "intercepted_group_name": "",
        "called_limit": 1,
        "cid_number": "",
        "intercepted": 2,
        "ha1b": "f7e216ff5b1818f9a74c2f25e11986ad",
        "forced_breakdown": 1,
        "forced_insert": 1,
        "extn_cidr": "",
        "id": 57,
        "cid_name": "",
        "enable_ringback": 0,
        "ha1": "ee181fedb87ae7542f372479d0475ce0",
        "domain": "xswitch.cn",
        "ringback": "",
        "timeout": "",
        "password": "123QWEqwe",
        "user_id": 0,
        "call_limit": 1,
        "connect_phone": "",
        "name": "66661",
        "extn": "66661",
        "call_transfer_type": 0
      },
      {
        "intercept": 2,
        "force_insert": 1,
        "sync_enabled": 0,
        "weblogin_disabled": 0,
        "group_name": "",
        "voicemail": 0,
        "context": "context-1",
        "eavesdrop": 1,
        "priority": "99",
        "force_breakdown": 1,
        "eavesdropped": 1,
        "type": "SIP",
        "display_order": "0",
        "vm_password": "",
        "call_authority": 4,
        "disabled": 0,
        "auto_record": 0,
        "description": "",
        "mac_address": "",
        "deleted_at": "",
        "updated_at": "2022-10-25 14:43:19",
        "created_at": "2022-10-25 14:43:19",
        "codec": "",
        "intercepted_group_name": "",
        "called_limit": 1,
        "cid_number": "",
        "intercepted": 2,
        "ha1b": "1f8c36b1d190dceb324b2393613f1d89",
        "forced_breakdown": 1,
        "forced_insert": 1,
        "extn_cidr": "",
        "id": 58,
        "cid_name": "",
        "enable_ringback": 0,
        "ha1": "cd250e3ba44cdf0227acd898a63dd8ce",
        "domain": "xswitch.cn",
        "ringback": "",
        "timeout": "",
        "password": "123QWEqwe",
        "user_id": 0,
        "call_limit": 1,
        "connect_phone": "",
        "name": "66662",
        "extn": "66662",
        "call_transfer_type": 0
      }
    ]
  }
}

查询所有分机信息

  • 请求 URL/api/extensions
  • 请求方式GET
  • 消息头: 无
  • 返回值
{
    "rowCount": 54,
    "data": [
        {
            "vm_password": "",
            "extn": "admin",
            "force_insert": 0,
            "priority": "99",
            "timeout": "",
            "sync_enabled": 0,
            "status": "offline",
            "display_order": "0",
            "enable_t38": 0,
            "extn_cidr": "",
            "enable_extn_time_recurrences": 0,
            "domain": "xswitch.cn",
            "enable_srtp": 0,
            "call_transfer_type": 0,
            "intercepted_group_name": "",
            "cid_number": "",
            "context": "context-1",
            "voicemail": 0,
            "enable_cb_onbusy": 0,
            "tmf_type": 0,
            "enable_ringback": 0,
            "boss_extn": false,
            "updated_at": "2024-03-18 02:06:40",
            "created_at": "2024-03-18 02:06:40",
            "eavesdropped": 0,
            "mac_address": "",
            "deleted_at": "",
            "description": "",
            "caller_display": 1,
            "hotline_address": "",
            "hotline_type": "",
            "weblogin_disabled": 0,
            "disabled": 0,
            "name": "Admin",
            "user_id": 1,
            "enable_hotline": 0,
            "forced_insert": 0,
            "type": "SIP",
            "secretary_extn": "",
            "group_name": "",
            "called_limit": 1,
            "dtmf_type": 0,
            "connect_phone": "",
            "intercepted": 0,
            "call_authority": 4,
            "forced_breakdown": 0,
            "eavesdrop": 0,
            "force_breakdown": 0,
            "id": 1,
            "codec": "",
            "hotline_number": "",
            "call_limit": 1,
            "intercept": 0,
            "cid_name": "",
            "ringback": "",
            "auto_record": 0
        },
        {
            "vm_password": "",
            "extn": "1000",
            "force_insert": 1,
            "priority": "99",
            "timeout": "",
            "sync_enabled": 0,
            "status": "offline",
            "display_order": "0",
            "enable_t38": 1,
            "extn_cidr": "",
            "enable_extn_time_recurrences": 0,
            "domain": "xswitch.cn",
            "enable_srtp": 1,
            "call_transfer_type": 0,
            "intercepted_group_name": "",
            "cid_number": "1000",
            "context": "context-1",
            "voicemail": 1,
            "enable_cb_onbusy": 0,
            "tmf_type": 0,
            "enable_ringback": 0,
            "boss_extn": false,
            "updated_at": "2024-05-11 07:54:01",
            "created_at": "2024-03-18 02:06:40",
            "eavesdropped": 1,
            "mac_address": "",
            "deleted_at": "",
            "description": "",
            "caller_display": 1,
            "hotline_address": "",
            "hotline_type": "",
            "weblogin_disabled": 0,
            "disabled": 0,
            "name": "1000",
            "user_id": 2,
            "enable_hotline": 0,
            "forced_insert": 1,
            "type": "SIP",
            "secretary_extn": "",
            "group_name": "",
            "called_limit": 1,
            "dtmf_type": 2,
            "connect_phone": "",
            "intercepted": 2,
            "call_authority": 4,
            "forced_breakdown": 1,
            "eavesdrop": 1,
            "force_breakdown": 1,
            "id": 2,
            "codec": "",
            "hotline_number": "",
            "call_limit": 1,
            "intercept": 2,
            "cid_name": "",
            "ringback": "",
            "auto_record": 0
        },
        {
            "vm_password": "",
            "extn": "1001",
            "force_insert": 1,
            "priority": "99",
            "timeout": "",
            "sync_enabled": 0,
            "status": "offline",
            "display_order": "0",
            "enable_t38": 1,
            "extn_cidr": "",
            "enable_extn_time_recurrences": 1,
            "domain": "xswitch.cn",
            "enable_srtp": 1,
            "call_transfer_type": 0,
            "intercepted_group_name": "",
            "cid_number": "",
            "context": "context-1",
            "voicemail": 0,
            "enable_cb_onbusy": 0,
            "tmf_type": 0,
            "enable_ringback": 0,
            "boss_extn": false,
            "updated_at": "2024-04-26 09:18:08",
            "created_at": "2024-03-18 02:06:40",
            "eavesdropped": 0,
            "mac_address": "",
            "deleted_at": "",
            "description": "",
            "caller_display": 1,
            "hotline_address": "",
            "hotline_type": "",
            "weblogin_disabled": 0,
            "disabled": 0,
            "name": "1001",
            "user_id": 3,
            "enable_hotline": 0,
            "forced_insert": 0,
            "type": "SIP",
            "secretary_extn": "",
            "group_name": "",
            "called_limit": 1,
            "dtmf_type": 0,
            "connect_phone": "",
            "intercepted": 0,
            "call_authority": 4,
            "forced_breakdown": 0,
            "eavesdrop": 1,
            "force_breakdown": 0,
            "id": 3,
            "codec": "",
            "hotline_number": "",
            "call_limit": 1,
            "intercept": 2,
            "cid_name": "",
            "ringback": "",
            "auto_record": 0
        },
        {
            "vm_password": "",
            "extn": "1003",
            "force_insert": 0,
            "priority": "99",
            "timeout": "",
            "sync_enabled": 0,
            "status": "offline",
            "display_order": "0",
            "enable_t38": 0,
            "extn_cidr": "",
            "enable_extn_time_recurrences": 0,
            "domain": "xswitch.cn",
            "enable_srtp": 0,
            "call_transfer_type": 0,
            "intercepted_group_name": "",
            "cid_number": "",
            "context": "context-2",
            "voicemail": 0,
            "enable_cb_onbusy": 0,
            "tmf_type": 0,
            "enable_ringback": 0,
            "boss_extn": false,
            "updated_at": "2024-04-07 07:15:45",
            "created_at": "2024-03-21 01:39:07",
            "eavesdropped": 0,
            "mac_address": "",
            "deleted_at": "",
            "description": "",
            "caller_display": 1,
            "hotline_address": "",
            "hotline_type": "",
            "weblogin_disabled": 0,
            "disabled": 0,
            "name": "test",
            "user_id": 4,
            "enable_hotline": 0,
            "forced_insert": 0,
            "type": "SIP",
            "secretary_extn": "",
            "group_name": "",
            "called_limit": 1,
            "dtmf_type": 0,
            "connect_phone": "",
            "intercepted": 0,
            "call_authority": 4,
            "forced_breakdown": 0,
            "eavesdrop": 1,
            "force_breakdown": 0,
            "id": 4,
            "codec": "",
            "hotline_number": "",
            "call_limit": 1,
            "intercept": 0,
            "cid_name": "",
            "ringback": "",
            "auto_record": 0
        },
        {
            "vm_password": "",
            "extn": "10006",
            "force_insert": 0,
            "priority": "99",
            "timeout": "",
            "sync_enabled": 0,
            "status": "offline",
            "display_order": "0",
            "enable_t38": 0,
            "extn_cidr": "",
            "enable_extn_time_recurrences": 0,
            "domain": "xswitch.cn",
            "enable_srtp": 0,
            "call_transfer_type": 0,
            "intercepted_group_name": "",
            "cid_number": "",
            "context": "context-1",
            "voicemail": 0,
            "enable_cb_onbusy": 0,
            "tmf_type": 0,
            "enable_ringback": 0,
            "boss_extn": false,
            "updated_at": "2024-04-07 07:15:45",
            "created_at": "2024-03-21 02:16:01",
            "eavesdropped": 0,
            "mac_address": "",
            "deleted_at": "",
            "description": "",
            "caller_display": 1,
            "hotline_address": "",
            "hotline_type": "",
            "weblogin_disabled": 0,
            "disabled": 0,
            "name": "10006",
            "user_id": 5,
            "enable_hotline": 0,
            "forced_insert": 0,
            "type": "SIP",
            "secretary_extn": "",
            "group_name": "",
            "called_limit": 1,
            "dtmf_type": 0,
            "connect_phone": "",
            "intercepted": 0,
            "call_authority": 4,
            "forced_breakdown": 0,
            "eavesdrop": 1,
            "force_breakdown": 0,
            "id": 5,
            "codec": "",
            "hotline_number": "",
            "call_limit": 1,
            "intercept": 0,
            "cid_name": "",
            "ringback": "",
            "auto_record": 0
        },
        {
            "vm_password": "",
            "extn": "10007",
            "force_insert": 0,
            "priority": "99",
            "timeout": "",
            "sync_enabled": 0,
            "status": "offline",
            "display_order": "0",
            "enable_t38": 0,
            "extn_cidr": "",
            "enable_extn_time_recurrences": 0,
            "domain": "xswitch.cn",
            "enable_srtp": 0,
            "call_transfer_type": 0,
            "intercepted_group_name": "",
            "cid_number": "",
            "context": "context-2",
            "voicemail": 0,
            "enable_cb_onbusy": 0,
            "tmf_type": 0,
            "enable_ringback": 0,
            "boss_extn": false,
            "updated_at": "2024-04-03 03:11:00",
            "created_at": "2024-03-21 02:16:01",
            "eavesdropped": 0,
            "mac_address": "",
            "deleted_at": "",
            "description": "",
            "caller_display": 1,
            "hotline_address": "",
            "hotline_type": "",
            "weblogin_disabled": 0,
            "disabled": 0,
            "name": "admin",
            "user_id": 6,
            "enable_hotline": 0,
            "forced_insert": 0,
            "type": "SIP",
            "secretary_extn": "",
            "group_name": "",
            "called_limit": 1,
            "dtmf_type": 0,
            "connect_phone": "",
            "intercepted": 0,
            "call_authority": 4,
            "forced_breakdown": 0,
            "eavesdrop": 0,
            "force_breakdown": 0,
            "id": 6,
            "codec": "",
            "hotline_number": "",
            "call_limit": 1,
            "intercept": 0,
            "cid_name": "",
            "ringback": "",
            "auto_record": 0
        },
        {
            "vm_password": "",
            "extn": "10008",
            "force_insert": 0,
            "priority": "99",
            "timeout": "",
            "sync_enabled": 0,
            "status": "offline",
            "display_order": "0",
            "enable_t38": 0,
            "extn_cidr": "",
            "enable_extn_time_recurrences": 0,
            "domain": "xswitch.cn",
            "enable_srtp": 0,
            "call_transfer_type": 0,
            "intercepted_group_name": "",
            "cid_number": "",
            "context": "context-1",
            "voicemail": 0,
            "enable_cb_onbusy": 0,
            "tmf_type": 0,
            "enable_ringback": 0,
            "boss_extn": false,
            "updated_at": "2024-03-25 01:23:32",
            "created_at": "2024-03-21 02:16:01",
            "eavesdropped": 0,
            "mac_address": "",
            "deleted_at": "",
            "description": "",
            "caller_display": 1,
            "hotline_address": "",
            "hotline_type": "",
            "weblogin_disabled": 0,
            "disabled": 0,
            "name": "10008",
            "user_id": 7,
            "enable_hotline": 0,
            "forced_insert": 0,
            "type": "SIP",
            "secretary_extn": "",
            "group_name": "",
            "called_limit": 1,
            "dtmf_type": 0,
            "connect_phone": "",
            "intercepted": 0,
            "call_authority": 3,
            "forced_breakdown": 0,
            "eavesdrop": 0,
            "force_breakdown": 0,
            "id": 7,
            "codec": "PCMA,PCMU,G722,opus,G729,vp8,H264",
            "hotline_number": "",
            "call_limit": 1,
            "intercept": 0,
            "cid_name": "",
            "ringback": "",
            "auto_record": 0
        },
        {
            "vm_password": "",
            "extn": "10009",
            "force_insert": 0,
            "priority": "99",
            "timeout": "",
            "sync_enabled": 0,
            "status": "offline",
            "display_order": "0",
            "enable_t38": 0,
            "extn_cidr": "",
            "enable_extn_time_recurrences": 0,
            "domain": "xswitch.cn",
            "enable_srtp": 0,
            "call_transfer_type": 0,
            "intercepted_group_name": "",
            "cid_number": "",
            "context": "context-1",
            "voicemail": 0,
            "enable_cb_onbusy": 0,
            "tmf_type": 0,
            "enable_ringback": 0,
            "boss_extn": false,
            "updated_at": "2024-03-25 01:23:32",
            "created_at": "2024-03-21 02:16:01",
            "eavesdropped": 0,
            "mac_address": "",
            "deleted_at": "",
            "description": "",
            "caller_display": 1,
            "hotline_address": "",
            "hotline_type": "",
            "weblogin_disabled": 0,
            "disabled": 0,
            "name": "10009",
            "user_id": 8,
            "enable_hotline": 0,
            "forced_insert": 0,
            "type": "SIP",
            "secretary_extn": "",
            "group_name": "",
            "called_limit": 1,
            "dtmf_type": 0,
            "connect_phone": "",
            "intercepted": 0,
            "call_authority": 3,
            "forced_breakdown": 0,
            "eavesdrop": 0,
            "force_breakdown": 0,
            "id": 8,
            "codec": "PCMA,PCMU,G722,opus,G729,vp8,H264",
            "hotline_number": "",
            "call_limit": 1,
            "intercept": 0,
            "cid_name": "",
            "ringback": "",
            "auto_record": 0
        },
        {
            "vm_password": "",
            "extn": "10010",
            "force_insert": 0,
            "priority": "99",
            "timeout": "",
            "sync_enabled": 0,
            "status": "offline",
            "display_order": "0",
            "enable_t38": 0,
            "extn_cidr": "",
            "enable_extn_time_recurrences": 0,
            "domain": "xswitch.cn",
            "enable_srtp": 0,
            "call_transfer_type": 0,
            "intercepted_group_name": "",
            "cid_number": "",
            "context": "context-1",
            "voicemail": 0,
            "enable_cb_onbusy": 0,
            "tmf_type": 0,
            "enable_ringback": 0,
            "boss_extn": false,
            "updated_at": "2024-03-21 02:16:01",
            "created_at": "2024-03-21 02:16:01",
            "eavesdropped": 0,
            "mac_address": "",
            "deleted_at": "",
            "description": "",
            "caller_display": 1,
            "hotline_address": "",
            "hotline_type": "",
            "weblogin_disabled": 0,
            "disabled": 0,
            "name": "10010",
            "user_id": 9,
            "enable_hotline": 0,
            "forced_insert": 0,
            "type": "SIP",
            "secretary_extn": "",
            "group_name": "",
            "called_limit": 1,
            "dtmf_type": 0,
            "connect_phone": "",
            "intercepted": 0,
            "call_authority": 4,
            "forced_breakdown": 0,
            "eavesdrop": 0,
            "force_breakdown": 0,
            "id": 9,
            "codec": "",
            "hotline_number": "",
            "call_limit": 1,
            "intercept": 0,
            "cid_name": "",
            "ringback": "",
            "auto_record": 0
        },
        {
            "vm_password": "",
            "extn": "10011",
            "force_insert": 0,
            "priority": "99",
            "timeout": "",
            "sync_enabled": 0,
            "status": "offline",
            "display_order": "0",
            "enable_t38": 0,
            "extn_cidr": "",
            "enable_extn_time_recurrences": 0,
            "domain": "xswitch.cn",
            "enable_srtp": 0,
            "call_transfer_type": 0,
            "intercepted_group_name": "",
            "cid_number": "",
            "context": "context-1",
            "voicemail": 0,
            "enable_cb_onbusy": 0,
            "tmf_type": 0,
            "enable_ringback": 0,
            "boss_extn": false,
            "updated_at": "2024-03-22 07:17:26",
            "created_at": "2024-03-21 02:16:01",
            "eavesdropped": 0,
            "mac_address": "",
            "deleted_at": "",
            "description": "",
            "caller_display": 1,
            "hotline_address": "",
            "hotline_type": "",
            "weblogin_disabled": 0,
            "disabled": 0,
            "name": "10011",
            "user_id": 10,
            "enable_hotline": 0,
            "forced_insert": 0,
            "type": "SIP",
            "secretary_extn": "",
            "group_name": "",
            "called_limit": 1,
            "dtmf_type": 0,
            "connect_phone": "",
            "intercepted": 0,
            "call_authority": 4,
            "forced_breakdown": 0,
            "eavesdrop": 0,
            "force_breakdown": 0,
            "id": 10,
            "codec": "",
            "hotline_number": "",
            "call_limit": 1,
            "intercept": 0,
            "cid_name": "",
            "ringback": "",
            "auto_record": 0
        }
    ],
    "page": 1,
    "hpack": false,
    "pageCount": 6
}
  • curl 示例
curl -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" 192.168.1.100:8081/api/extensions

返回指定分机号用户信息

  • 请求 URL/api/extensions/:id

  • 请求方式GET

  • 消息头: 无

  • 返回值

  • 示例

    GET /api/extensions/2

{
    "group_name": "",
    "login": "1000",
    "call_authority": 4,
    "call_limit": 1,
    "user_id": 2,
    "id": 2,
    "context": "context-1",
    "display_order": "0",
    "forced_breakdown": 1,
    "connect_phone": "",
    "tmf_type": 0,
    "auto_record": 0,
    "sync_enabled": 0,
    "voicemail": 1,
    "timeout": "",
    "eavesdropped": 1,
    "cid_number": "1000",
    "extn": "1000",
    "created_at": "2024-03-18 02:06:40",
    "enable_extn_time_recurrences": 0,
    "caller_display": 1,
    "force_insert": 1,
    "disabled": 0,
    "dtmf_type": 2,
    "enable_hotline": 0,
    "deleted_at": "",
    "enable_t38": 1,
    "secretary_extn": "",
    "cid_name": "",
    "priority": "99",
    "boss_extn": false,
    "vm_password": "",
    "hotline_address": "",
    "eavesdrop": 1,
    "ringback": "",
    "enable_srtp": 1,
    "call_transfer_type": 0,
    "enable_cb_onbusy": 0,
    "mac_address": "",
    "codec": "",
    "intercepted_group_name": "",
    "hotline_number": "",
    "domain": "xswitch.cn",
    "intercepted": 2,
    "intercept": 2,
    "dids": [
        {
            "updated_at": "2024-05-16 03:04:57",
            "line_number": "7889541",
            "id": 17,
            "numbers": "1000",
            "deleted_at": "",
            "description": "",
            "type": "",
            "created_at": "2024-05-16 03:04:57"
        }
    ],
    "force_breakdown": 1,
    "forced_insert": 1,
    "hotline_type": "",
    "extn_cidr": "",
    "updated_at": "2024-05-11 07:54:01",
    "description": "",
    "called_limit": 1,
    "weblogin_disabled": 0,
    "enable_ringback": 0,
    "type": "SIP",
    "name": "1000"
}
  • curl 示例
curl -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" 192.168.1.100:8081/api/extensions/2

或根据分机号码查询分机详细信息,如下:

  • 请求 URL/api/extensions?page=1&page_size=10&hpack=false&extn=:extn

  • 请求方式GET

  • 消息头: 无

  • 返回值

  • 示例

    GET /api/extensions?page=1&page_size=10&hpack=false&extn=10010

返回

{
    "hpack": false,
    "data": [
        {
            "description": "",
            "hotline_number": "",
            "user_id": "9",
            "extn_cidr": "",
            "eavesdropped": "0",
            "vm_password": "",
            "updated_at": "2024-03-21 02:16:01",
            "context": "context-1",
            "codec": "",
            "timeout": "",
            "domain": "xswitch.cn",
            "ringback": "",
            "connect_phone": "",
            "sync_enabled": "0",
            "priority": "99",
            "enable_hotline": "0",
            "voicemail": "0",
            "call_authority": "4",
            "enable_extn_time_recurrences": "0",
            "enable_srtp": "0",
            "intercept": "0",
            "force_breakdown": "0",
            "tmf_type": "0",
            "deleted_at": "",
            "enable_ringback": "0",
            "created_at": "2024-03-21 02:16:01",
            "call_transfer_type": "0",
            "call_limit": "1",
            "boss_extn": "f",
            "enable_t38": "0",
            "extn": "10010",
            "forced_breakdown": "0",
            "hotline_type": "",
            "id": "9",
            "enable_cb_onbusy": "0",
            "called_limit": "1",
            "auto_record": "0",
            "disabled": "0",
            "mac_address": "",
            "intercepted_group_name": "",
            "caller_display": "1",
            "hotline_address": "",
            "name": "10010",
            "intercepted": "0",
            "forced_insert": "0",
            "eavesdrop": "0",
            "dtmf_type": "0",
            "weblogin_disabled": "0",
            "force_insert": "0",
            "cid_name": "",
            "secretary_extn": "",
            "display_order": "0",
            "status": "offline",
            "type": "SIP",
            "group_name": "",
            "cid_number": ""
        }
    ],
    "rowCount": 1,
    "page": 1,
    "pageCount": 1
}
  • curl 示例
curl -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" "192.168.1.100:8081/api/extensions?page=1&page_size=10&hpack=false&extn=10010"

修改指定分机号用户信息

  • 请求 URL/api/extensions/:id
  • 请求方式PUT
  • 消息头Content-Type: application/json
  • Body 信息
{
    "extn": "10010",
    "name": "修改信息",
    "context": "context-1",
    "login": "10010",
    "type": "SIP",
    "domain": "xswitch.cn"
}
  • 特别说明extn分机号不可修改。密码需由大写字母+小写字母+数字组合而成,且在 8-20 位之间。
  • curl 示例
curl -XPUT -H "X-XTRA-AUTH-ID: 018fcc41-6594-7398-9660-9e004ca2e956" \
-H "Content-Type: application/json" \
-d '{"extn": "10010","name": "修改信息","context": "context-1","login": "10010","type": "SIP","domain": "xswitch.cn"}' \
"192.168.0.103:8081/api/extensions/9"
  • 返回值
{
    "data": {
        "caller_display": 1,
        "force_breakdown": 0,
        "weblogin_disabled": 0,
        "login": "10010",
        "eavesdropped": 0,
        "intercept": 0,
        "mac_address": "",
        "priority": "99",
        "enable_srtp": 0,
        "description": "",
        "extn_cidr": "",
        "dtmf_type": 0,
        "created_at": "2024-03-21 02:16:01",
        "cid_name": "",
        "hotline_address": "",
        "tmf_type": 0,
        "timeout": "",
        "id": 9,
        "deleted_at": "",
        "updated_at": "2024-05-31 10:08:24",
        "enable_ringback": 0,
        "secretary_extn": "",
        "context": "context-1",
        "voicemail": 0,
        "boss_extn": false,
        "codec": "",
        "call_transfer_type": 0,
        "call_authority": 4,
        "enable_hotline": 0,
        "user_id": 9,
        "forced_insert": 0,
        "hotline_type": "",
        "hotline_number": "",
        "enable_cb_onbusy": 0,
        "enable_extn_time_recurrences": 0,
        "ringback": "",
        "type": "SIP",
        "forced_breakdown": 0,
        "auto_record": 0,
        "intercepted": 0,
        "intercepted_group_name": "",
        "enable_t38": 0,
        "sync_enabled": 0,
        "vm_password": "",
        "cid_number": "",
        "name": "修改信息",
        "ha1": "213c6ec9297d8bb9e59bd84f2a72c16e",
        "force_insert": 0,
        "disabled": 0,
        "connect_phone": "",
        "display_order": "0",
        "extn": "10010",
        "call_limit": 1,
        "group_name": "",
        "eavesdrop": 0,
        "called_limit": 1,
        "domain": "xswitch.cn",
        "ha1b": "40cd157c2a318ed61163dc193175880a"
    },
    "message": "success",
    "code": 200
}

更新指定分机留言状态

  • 请求 URL/api/extensions/:id
  • 请求方式PUT
  • 消息头Content-Type: application/json
  • Body 信息
{
  "action": "read"
}

{
  "action": "unread"
}

其中read表示将留言状态设置为已读,unread表示将留言状态设置为未读。

  • curl 示例
curl -XPUT -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" \
-H "Content-Type: application/json" \
-d '{"action":"read"}' "192.168.1.100:8081/api/extensions/1"
  • 返回值
{
  "message": "success",
  "code": 200,
  "data": "1002"
}

清空指定分机留言

  • 请求 URL/api/extensions/:id:
  • 请求方式PUT
  • 消息头Content-Type: application/json
  • Body 信息
{
  "action": "delete"
}
  • curl 示例
curl -XPUT -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" \
-H "Content-Type: application/json" \
-d '{"action":"delete"}' "192.168.1.100:8081/api/extensions/1"
  • 返回值
{
  "message": "success",
  "code": 200,
  "data": "1002"
}

删除分机

  • 请求 URL/api/extensions/:id
  • 请求方式DELETE
  • Body 信息:无
  • 返回值
{
  "code": 200,
  "message": "success",
  "data": "3"
}

示例

curl -0 -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" -XDELETE 192.168.1.100:8081/api/extensions/3

导出分机信息

  • 请求 URL/api/extensions/download
  • 请求方式GET
  • 消息头: 无
  • 返回值
    分机ID,号码,名称,密码,呼叫源,主叫名称,主叫号码,,类型
    1,admin,Admin,1234!@#$,,,,192.168.3.70,SIP
    2,1001,1001,1234!@#$,context-1,,,192.168.3.70,SIP
    3,1002,1002,1234!@#$,context-1,,,192.168.3.70,SIP
    4,1003,1003,1234!@#$,context-1,,,192.168.3.70,SIP
    5,1004,1004,1234!@#$,context-1,,,192.168.3.70,SIP
    6,1005,1005,1234!@#$,context-1,,,192.168.3.70,SIP
    7,1006,1006,1234!@#$,context-1,,,192.168.3.70,SIP
    8,1007,1007,1234!@#$,context-1,,,192.168.3.70,SIP
  • curl 示例
curl -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" 192.168.1.100:8081/api/extensions/download

按照分机号码筛选分机

  • 请求 URL/api/extensions?page=1&page_size=500&hpack=false&extn=:extn

  • 请求方式GET

  • 消息头: 无

  • 返回值

  • 示例

GET /api/extensions?page=1&page_size=500&hpack=false&extn=10008

  • 返回值
{
    "pageCount": 1,
    "hpack": false,
    "rowCount": 1,
    "page": 1,
    "data": [
        {
            "eavesdrop": "0",
            "sync_enabled": "0",
            "extn": "10008",
            "codec": "PCMA,PCMU,G722,opus,G729,vp8,H264",
            "id": "7",
            "description": "",
            "called_limit": "1",
            "domain": "xswitch.cn",
            "force_insert": "0",
            "secretary_extn": "",
            "voicemail": "0",
            "auto_record": "0",
            "updated_at": "2024-03-25 01:23:32",
            "status": "offline",
            "enable_t38": "0",
            "forced_breakdown": "0",
            "context": "context-1",
            "enable_extn_time_recurrences": "0",
            "enable_srtp": "0",
            "weblogin_disabled": "0",
            "enable_ringback": "0",
            "boss_extn": "f",
            "intercepted": "0",
            "dtmf_type": "0",
            "priority": "99",
            "tmf_type": "0",
            "vm_password": "",
            "deleted_at": "",
            "enable_hotline": "0",
            "name": "10008",
            "created_at": "2024-03-21 02:16:01",
            "call_limit": "1",
            "forced_insert": "0",
            "hotline_number": "",
            "user_id": "7",
            "enable_cb_onbusy": "0",
            "mac_address": "",
            "intercepted_group_name": "",
            "timeout": "",
            "caller_display": "1",
            "hotline_type": "",
            "cid_name": "",
            "connect_phone": "",
            "display_order": "0",
            "force_breakdown": "0",
            "eavesdropped": "0",
            "intercept": "0",
            "call_authority": "3",
            "disabled": "0",
            "group_name": "",
            "extn_cidr": "",
            "ringback": "",
            "type": "SIP",
            "call_transfer_type": "0",
            "cid_number": "",
            "hotline_address": ""
        }
    ]
}
  • curl 示例
curl -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" "192.168.1.100:8081/api/extensions?page=1&page_size=500&hpack=false&extn=10008"

按照分机名称筛选分机

  • 请求 URL/api/extensions?page=1&page_size=500&hpack=false&name=:name

  • 请求方式GET

  • 消息头: 无

  • 返回值

  • 示例

GET api/extensions?page=1&page_size=500&hpack=false&name=10006

  • 返回值
{
    "rowCount": 1,
    "data": [
        {
            "user_id": "5",
            "hotline_address": "",
            "name": "10006",
            "disabled": "0",
            "priority": "99",
            "force_insert": "0",
            "intercepted_group_name": "",
            "status": "offline",
            "tmf_type": "0",
            "cid_number": "",
            "eavesdrop": "1",
            "weblogin_disabled": "0",
            "description": "",
            "called_limit": "1",
            "boss_extn": "f",
            "ringback": "",
            "enable_cb_onbusy": "0",
            "dtmf_type": "0",
            "enable_t38": "0",
            "domain": "xswitch.cn",
            "call_limit": "1",
            "codec": "",
            "enable_ringback": "0",
            "deleted_at": "",
            "group_name": "",
            "extn_cidr": "",
            "created_at": "2024-03-21 02:16:01",
            "secretary_extn": "",
            "hotline_type": "",
            "enable_hotline": "0",
            "vm_password": "",
            "hotline_number": "",
            "call_authority": "4",
            "call_transfer_type": "0",
            "eavesdropped": "0",
            "caller_display": "1",
            "context": "context-1",
            "cid_name": "",
            "enable_srtp": "0",
            "id": "5",
            "force_breakdown": "0",
            "intercepted": "0",
            "forced_breakdown": "0",
            "forced_insert": "0",
            "mac_address": "",
            "connect_phone": "",
            "auto_record": "0",
            "extn": "10006",
            "sync_enabled": "0",
            "intercept": "0",
            "display_order": "0",
            "timeout": "",
            "type": "SIP",
            "voicemail": "0",
            "updated_at": "2024-04-07 07:15:45",
            "enable_extn_time_recurrences": "0"
        }
    ],
    "page": 1,
    "pageCount": 1,
    "hpack": false
}
  • curl 示例
curl -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" "192.168.1.100:8081/api/extensions?page=1&page_size=500&hpack=false&name=10006"

按照分机在线状态筛选分机

  • 请求 URL/api/extensions?page=1&page_size=500&hpack=false&status=:status

  • 请求方式GET

  • 消息头: 无

  • 返回值

  • 示例

GET /api/extensions?page=1&page_size=500&hpack=false&status=online

  • 返回值
{
    "rowCount": 1,
    "pageCount": 1,
    "data": [
        {
            "id": 2,
            "enable_ringback": 0,
            "domain": "xswitch.cn",
            "call_transfer_type": 0,
            "boss_extn": false,
            "secretary_extn": "",
            "call_limit": 1,
            "disabled": 0,
            "created_at": "2024-03-18 02:06:40",
            "call_authority": 4,
            "extn": "1000",
            "user_id": 2,
            "status": "online",
            "vm_password": "",
            "force_breakdown": 1,
            "enable_t38": 1,
            "enable_extn_time_recurrences": 0,
            "cid_number": "1000",
            "enable_srtp": 1,
            "voicemail": 1,
            "enable_hotline": 0,
            "dtmf_type": 2,
            "tmf_type": 0,
            "display_order": "0",
            "codec": "",
            "sync_enabled": 0,
            "called_limit": 1,
            "eavesdrop": 1,
            "type": "SIP",
            "deleted_at": "",
            "intercepted": 2,
            "weblogin_disabled": 0,
            "group_name": "",
            "priority": "99",
            "cid_name": "",
            "hotline_address": "",
            "hotline_type": "",
            "hotline_number": "",
            "caller_display": 1,
            "enable_cb_onbusy": 0,
            "mac_address": "",
            "intercepted_group_name": "",
            "connect_phone": "",
            "updated_at": "2024-05-11 07:54:01",
            "eavesdropped": 1,
            "intercept": 2,
            "ringback": "",
            "forced_insert": 1,
            "description": "",
            "force_insert": 1,
            "extn_cidr": "",
            "forced_breakdown": 1,
            "name": "1000",
            "auto_record": 0,
            "timeout": "",
            "context": "context-1"
        }
    ],
    "hpack": false,
    "page": 1
}
  • curl 示例
curl -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" "192.168.1.100:8081/api/extensions?page=1&page_size=500&hpack=false&status=online

批量设置分机

  • 请求 URL/api/extensions
  • 请求方式PUT
  • 消息头: 无
  • 返回值

GET /api/extensions

Body:

{
   "context": "context-1",
   "type": "SIP+WebRTC",
   "call_limit": "1",
   "eavesdrop": "1",
   "call_authority": "4",
   "force_insert": "1",
   "force_breakdown": "1",
   "intercept": "2",
   "called_limit": "1",
   "caller_display": "1",
   "Voicemail": "0",
   "forced_insert": "1",
   "forced_breakdown": "1",
   "eavesdropped": "1",
   "intercepted": "2",
   "codec": [
       "PCMA",
       "PCMU"
   ],
   "timeout": "60",
   "extns": [
       "2527",
       "2526"
   ],
   "dods": {
       "line_number": "122334455678",
       "type": "GATEWAY",
       "ref_id": "3",
       "name": "demo"
   }
}
  • 返回值
{
   "data": [],
   "message": "update rows 2",
   "code": 200
}
  • curl 示例
curl --location --request PUT 'http://192.168.0.101:8081/api/extensions' \
--header 'token: 01906d5e-28a0-7495-aa9f-0fdeb7212878' \
--header 'Content-Type: application/json' \
--header 'Cookie: freeswitch_xtra_session_id=01906d5e-28a0-7495-aa9f-0fdeb7212878' \
--data '{
    "context": "context-1",
    "type": "SIP+WebRTC",
    "call_limit": "1",
    "eavesdrop": "1",
    "call_authority": "4",
    "force_insert": "1",
    "force_breakdown": "1",
    "intercept": "2",
    "called_limit": "1",
    "caller_display": "1",
    "Voicemail": "0",
    "forced_insert": "1",
    "forced_breakdown": "1",
    "eavesdropped": "1",
    "intercepted": "2",
    "codec": [
        "PCMA",
        "PCMU"
    ],
    "timeout": "60",
    "extns": [
        "2527",
        "2526"
    ],
    "dods": {
        "line_number": "122334455678",
        "type": "GATEWAY",
        "ref_id": "3",
        "name": "demo"
    }
}'

分组管理

查看所有分组

  • 请求 URL/api/groups
  • 请求方式GET
  • Body 信息:无
  • 返回值
{
  "pageCount": 1,
  "data": [
    {
      "name": "All Extensions",
      "value": "1",
      "group_type": "1",
      "id": "1",
      "group_id": "",
      "realm": "xswitch.cn"
    },
    {
      "name": "All Users",
      "value": "0",
      "group_type": "0",
      "id": "0",
      "group_id": "",
      "realm": "xswitch.cn"
    }
  ],
  "rowCount": 2,
  "page": 1
}

查看用户分组名

  • 请求 URL/api/groups/build_group_options_tree
  • 请求方式GET
  • Body 信息:无
  • 返回值
[
  {
    "id": "0",
    "name": "All Users",
    "realm": "xswitch.cn",
    "value": "0"
  }
]

查看除某个分组外的其他分组

  • 请求 URL/api/groups/build_group_options_tree/:id
  • 请求方式GET
  • Body 信息:无
  • 返回值
[
  {
    "value": 0,
    "name": "All Users"
  },
  {
    "value": 1,
    "name": "All Extensions"
  }
]

查看未加入某分组的用户成员

  • 请求 URL/api/groups/:id/remain_members
  • 请求方式GET
  • Body 信息:无
  • 返回值
{
    "page": 1,
    "rowCount": 1,
    "pageCount": 1,
    "data": [
        {
            "call_authority": "4",
            "voicemail": "0",
            "password": "XSwitch.cn/6753997",
            "forced_insert": "0",
            "call_transfer_type": "0",
            "group_name": "",
            "eavesdropped": "0",
            "caller_display": "1",
            "hotline_type": "",
            "description": "",
            "ha1": "1311b40ac665838273f5702e790a152a",
            "timeout": "",
            "enable_ringback": "0",
            "mac_address": "",
            "enable_t38": "0",
            "call_limit": "1",
            "enable_extn_time_recurrences": "0",
            "ringback": "",
            "created_at": "2024-06-27 02:22:04",
            "force_breakdown": "0",
            "cid_name": "",
            "hotline_address": "",
            "auto_record": "0",
            "tmf_type": "0",
            "forced_breakdown": "0",
            "dtmf_type": "0",
            "updated_at": "2024-06-27 02:22:04",
            "connect_phone": "",
            "type": "SIP",
            "enable_srtp": "0",
            "intercepted_group_name": "",
            "intercept": "0",
            "disabled": "0",
            "priority": "99",
            "user_id": "3",
            "boss_extn": "f",
            "enable_hotline": "0",
            "secretary_extn": "",
            "domain": "xswitch.cn",
            "enable_cb_onbusy": "0",
            "context": "context-1",
            "codec": "",
            "called_limit": "1",
            "sync_enabled": "0",
            "intercepted": "0",
            "weblogin_disabled": "0",
            "force_insert": "0",
            "deleted_at": "",
            "eavesdrop": "0",
            "id": "2568",
            "extn_cidr": "",
            "name": "test",
            "display_order": "0",
            "vm_password": "",
            "hotline_number": "",
            "cid_number": "",
            "ha1b": "3e769018cc2e719ef680c07f66ddfe88",
            "extn": "489748156"
        }
    ]
}

查看加入某分组的用户成员

  • 请求 URL/api/groups/:id/members
  • 请求方式GET
  • Body 信息:无
  • 返回值
[
  {
    "group_id": "0",
    "user_id": "31",
    "id": "32",
    "domain": "demo.xswitch.cn",
    "sort": "32",
    "name": "1029",
    "extn": "1029"
  }
]

查看加入某分组的分机成员

  • 请求 URL/api/groups/:id/users/extn
  • 请求方式GET
  • Body 信息:无
  • 返回值
{
    "pageCount": 1,
    "page": 1,
    "data": [
        {
            "enable_srtp": "1",
            "id": "2",
            "eavesdrop": "1",
            "weblogin_disabled": "0",
            "voicemail": "0",
            "forced_breakdown": "1",
            "enable_t38": "0",
            "cid_number": "1000",
            "cid_name": "",
            "ha1b": "bea49893ddb6706b5d86075a7eabd0b9",
            "enable_extn_time_recurrences": "0",
            "priority": "99",
            "caller_display": "1",
            "ringback": "",
            "call_limit": "1",
            "ha1": "27ad917ae8d0d77bbede5d8f122e017c",
            "deleted_at": "",
            "extn": "1000",
            "call_transfer_type": "0",
            "secretary_extn": "",
            "enable_ringback": "0",
            "tmf_type": "0",
            "call_authority": "4",
            "created_at": "2024-03-18 02:06:40",
            "user_id": "2",
            "intercept": "2",
            "boss_extn": "f",
            "display_order": "0",
            "updated_at": "2024-06-27 01:18:18",
            "hotline_address": "",
            "password": "XSwitch.cn/6753997",
            "connect_phone": "",
            "force_breakdown": "1",
            "intercepted_group_name": "",
            "description": "",
            "hotline_type": "",
            "context": "context-1",
            "mac_address": "",
            "forced_insert": "1",
            "force_insert": "1",
            "timeout": "",
            "sync_enabled": "0",
            "hotline_number": "",
            "group_name": "",
            "vm_password": "",
            "dtmf_type": "2",
            "enable_cb_onbusy": "0",
            "codec": "",
            "called_limit": "1",
            "domain": "xswitch.cn",
            "auto_record": "0",
            "enable_hotline": "0",
            "disabled": "0",
            "extn_cidr": "",
            "type": "SIP",
            "name": "1000",
            "intercepted": "2",
            "eavesdropped": "1"
        }
    ],
    "rowCount": 1
}

查看加入某分组的用户成员的详细信息

  • 请求 URL/api/groups/3/members
  • 请求方式GET
  • Body 信息:无
  • 返回值
[
    {
        "sort": "1",
        "domain": "xswitch.cn",
        "id": "4609",
        "group_id": "3",
        "name": "1001",
        "user_id": "3",
        "extn": "489748156"
    }
]

查看所有的可分组用户

  • 请求 URL/api/groups/group_users
  • 请求方式GET
  • Body 信息:无
  • 返回值
[
  {
    "groupName": "All Users",
    "userID": "5",
    "userDomain": "demo.xswitch.cn",
    "userExten": "1003",
    "groupID": "0",
    "userName": "1003"
  },
  {
    "groupName": "All Users",
    "userID": "6",
    "userDomain": "demo.xswitch.cn",
    "userExten": "1004",
    "groupID": "0",
    "userName": "1004"
  },
  {
    "groupName": "All Users",
    "userID": "7",
    "userDomain": "demo.xswitch.cn",
    "userExten": "1005",
    "groupID": "0",
    "userName": "1005"
  }
]

查看指定分组的信息

  • 请求 URL/api/groups/:id
  • 请求方式GET
  • Body 信息:无
  • 返回值
{
    "created_at": "2024-07-02 09:34:42",
    "name": "test",
    "realm": "xswitch.cn",
    "description": "本地分机",
    "sort": 1,
    "deleted_at": "",
    "id": 4,
    "updated_at": "2024-07-02 09:34:42",
    "level": 0,
    "group_type": 1
}

修改指定分组的信息

  • 请求 URL/api/groups/:id
  • 请求方式PUT
  • Body 信息
{
  "description": "",
  "id": "3",
  "name": "test-1",
  "realm": "demo.xswitch.cn"
}
  • 返回值
{
    "data": "4",
    "message": "success",
    "code": 200
}

新增组

  • 请求 URL/api/groups
  • 请求方式POST
  • Body 信息
{
    "name": "test1122",
    "description": "test1122",
    "group_type": 0
}
  • 返回值
{
  "code": 200,
  "message": "success",
  "data": "3"
}

新增组内用户(组类型需要为用户)

  • 请求 URL/api/groups/member
  • 请求方式POST
  • Body 信息
[
    {
        "group_id": 5,
        "user_id": "4"
    }
]
  • 返回值
{
    "message": "success",
    "data": [
        {
            "user_id": "4",
            "sort": 1,
            "group_id": 5
        }
    ],
    "code": 200
}

新增组内分机(组类型需要为分机)

  • 请求 URL/api/groups/extns
  • 请求方式POST
  • Body 信息
[
    {
        "group_id": 4,
        "extn_id": "2513"
    }
]
  • 返回值
{
    "code": 200,
    "message": "success",
    "data": [
        {
            "extn_id": "2513",
            "group_id": 4,
            "sort": 1
        }
    ]
}

删除分组

  • 请求 URL/api/groups/:id
  • 请求方式DELETE
  • Body 信息:无
  • 返回值
{
  "data": "3",
  "message": "success",
  "code": 200
}

删除分组的所有成员

  • 请求 URL/api/groups/members/:group_id
  • 请求方式DELETE
  • Body 信息:无
  • 返回值
{
  "code": 200,
  "message": "success",
  "data": "2"
}

删除分组的某个用户

  • 请求 URL/api/groups/members/:group_id/:member_id
  • 请求方式DELETE
  • Body 信息:无
  • 返回值
{
  "data": "30",
  "message": "success",
  "code": 200
}

删除分组的某个分机

  • 请求 URL/api/groups/extns/:group_id/:extn_id
  • 请求方式DELETE
  • Body 信息:无
  • 返回值
{
    "data": "2517",
    "message": "success",
    "code": 200
}

新建二级组

  • 请求 URL/api/groups
  • 请求方式POST
  • Body 信息
{
    "name": "二级组",
    "description": "本地分机",
    "group_type": 0,
    "group_id": "2"
}
  • 返回值
{
    "message": "success",
    "code": 200,
    "data": 7
}

角色权限

获取所有系统角色

  • 请求 URL/api/system_roles

  • 请求方式GET

  • Body 信息:无

  • 返回值

{
    "page": 1,
    "data": [
        {
            "updated_at": "2024-03-18 02:06:41",
            "created_by": "system",
            "role_type": 1,
            "created_at": "2024-03-18 02:06:41",
            "name": "超级管理员",
            "description": "",
            "id": 1
        },
        {
            "updated_at": "2024-03-18 02:06:41",
            "created_by": "system",
            "role_type": 1,
            "created_at": "2024-03-18 02:06:41",
            "name": "高级管理员",
            "description": "",
            "id": 2
        },
        {
            "updated_at": "2024-03-18 02:06:41",
            "created_by": "system",
            "role_type": 1,
            "created_at": "2024-03-18 02:06:41",
            "name": "只读管理员",
            "description": "",
            "id": 3
        }
    ],
    "rowCount": 3,
    "pageCount": 1
}

获取可添加角色的用户(即未分配角色的用户)

  • 请求 URL/api/system_roles/:id/users?remain=1

  • 请求方式GET

  • Body 信息:无

  • 返回值

{
  "rowCount": 50,
  "page": 1,
  "data": [
    {
      "id": "0",
      "name": "SYSTEM"
    },
    {
      "id": "3",
      "name": "1001"
    },
    {
      "id": "4",
      "name": "1002"
    },
    {
      "id": "5",
      "name": "1003"
    },
    {
      "id": "6",
      "name": "1004"
    },
    {
      "id": "7",
      "name": "1005"
    },
    {
      "id": "8",
      "name": "1006"
    },
    {
      "id": "9",
      "name": "1007"
    },
    {
      "id": "2",
      "name": "1000"
    },
    {
      "id": "1",
      "name": "Admin"
    },
    {
      "id": "10",
      "name": "1008"
    },
    {
      "id": "11",
      "name": "1009"
    },
    {
      "id": "12",
      "name": "1010"
    },
    {
      "id": "13",
      "name": "1011"
    },
    {
      "id": "14",
      "name": "1012"
    },
    {
      "id": "15",
      "name": "1013"
    },
    {
      "id": "16",
      "name": "1014"
    },
    {
      "id": "17",
      "name": "1015"
    },
    {
      "id": "18",
      "name": "1016"
    },
    {
      "id": "19",
      "name": "1017"
    },
    {
      "id": "20",
      "name": "1018"
    },
    {
      "id": "21",
      "name": "1019"
    },
    {
      "id": "22",
      "name": "1020"
    },
    {
      "id": "23",
      "name": "1021"
    },
    {
      "id": "24",
      "name": "1022"
    },
    {
      "id": "25",
      "name": "1023"
    },
    {
      "id": "26",
      "name": "1024"
    },
    {
      "id": "27",
      "name": "1025"
    },
    {
      "id": "28",
      "name": "1026"
    },
    {
      "id": "29",
      "name": "1027"
    },
    {
      "id": "30",
      "name": "1028"
    },
    {
      "id": "31",
      "name": "1029"
    },
    {
      "id": "32",
      "name": "3232"
    },
    {
      "id": "33",
      "name": "2222"
    },
    {
      "id": "36",
      "name": "2"
    },
    {
      "id": "34",
      "name": "t"
    },
    {
      "id": "38",
      "name": "20"
    },
    {
      "id": "39",
      "name": "70"
    },
    {
      "id": "40",
      "name": "71"
    },
    {
      "id": "41",
      "name": "72"
    },
    {
      "id": "42",
      "name": "小樱桃"
    },
    {
      "id": "43",
      "name": "小樱桃1"
    },
    {
      "id": "44",
      "name": "3"
    },
    {
      "id": "46",
      "name": "小樱桃2"
    },
    {
      "id": "52",
      "name": "54"
    },
    {
      "id": "53",
      "name": "55"
    },
    {
      "id": "50",
      "name": "37"
    },
    {
      "id": "54",
      "name": "6767"
    },
    {
      "id": "55",
      "name": "9999"
    },
    {
      "id": "60",
      "name": "1234"
    }
  ],
  "pageCount": 1
}

获取某角色下的用户列表

  • 请求 URL/api/system_roles/:id/users?page=1&perPage=50

  • 请求方式GET

  • Body 信息:无

  • 返回值

{
  "data": [
    {
      "name": "ew",
      "id": "35"
    },
    {
      "name": "666",
      "id": "61"
    }
  ],
  "pageCount": 1,
  "rowCount": 2,
  "page": 1
}

删除某个角色下的一个用户

  • 请求 URL/api/system_roles/:id/users/35

  • 请求方式DELETE

  • Body 信息:无

  • 返回值

{
  "message": "success",
  "code": 200,
  "data": "35"
}

给某个角色添加一个用户

  • 请求 URL/api/system_roles/:id/users
  • 请求方式POST
  • Body 信息
[
  {
    "user_id": "46",
    "role_id": 1
  }
]
  • 返回值
{
  "code": 200,
  "data": [
    {
      "id": "38"
    }
  ],
  "message": "success"
}

给某个角色添加多个用户

  • 请求 URL/api/system_roles/:id/users
  • 请求方式POST
  • Body 信息
[
  {
    "user_id": "3",
    "role_id": "5"
  },
  {
    "user_id": "4",
    "role_id": "5"
  },
  {
    "user_id": "5",
    "role_id": "5"
  }
]
  • 返回值
{
  "code": 200,
  "data": [
    {
      "id": "39"
    },
    {
      "id": "40"
    },
    {
      "id": "41"
    }
  ],
  "message": "success"
}

给某个角色添加一个用户组

  • 请求 URL/api/system_roles/:id/group_users
  • 请求方式POST
  • Body 信息
[
  {
    "group_id": "0"
  }
]
  • 返回值
{
  "data": [],
  "code": 200,
  "message": "success"
}

给某个角色添加多个用户组

  • 请求 URL/api/system_roles/:id/group_users
  • 请求方式POST
  • Body 信息
[
  {
    "group_id": "5"
  },
  {
    "group_id": "0"
  }
]
  • 返回值
{
  "code": 200,
  "message": "success",
  "data": []
}

新建系统角色

  • 请求 URL/api/system_roles
  • 请求方式POST
  • Body 信息
{
    "name": "test",
    "description": "测试"
}
  • 返回值
{
    "data": {
        "updated_at": "2024-07-03 07:58:25",
        "created_by": "system",
        "id": 4,
        "name": "test",
        "created_at": "2024-07-03 07:58:25",
        "description": "测试"
    },
    "message": "success",
    "code": 200
}

获取分组列表

  • 请求 URL/api/role_privileges/build_role_groups/:id

  • 请求方式GET

  • Body 信息:无

  • 返回值

[
  {
    "group_id": "",
    "created_at": "2022-09-20 14:40:38",
    "name": "All Users",
    "checked": true,
    "level": "0",
    "deleted_at": "",
    "realm": "xswitch.cn",
    "updated_at": "2022-09-20 14:40:38",
    "id": "0",
    "group_type": "0",
    "sort": "",
    "description": ""
  },
  {
    "group_id": "",
    "created_at": "2022-09-20 14:40:38",
    "name": "test-1",
    "checked": true,
    "level": "0",
    "deleted_at": "",
    "realm": "demo.xswitch.cn",
    "updated_at": "2022-11-04 15:07:32",
    "id": "1",
    "group_type": "1",
    "sort": "",
    "description": ""
  },
  {
    "group_id": "",
    "created_at": "2022-11-04 15:13:19",
    "name": "xxx",
    "checked": false,
    "level": "0",
    "deleted_at": "",
    "realm": "xswitch.cn",
    "updated_at": "2022-11-04 15:13:19",
    "id": "2",
    "group_type": "",
    "sort": "1",
    "description": ""
  }
]

为某个角色添加组权限

  • 请求 URL/api/role_privileges/groups
  • 请求方式GET
  • Body 信息
{
  "data": [
    {
      "group_id": "2"
    }
  ],
  "role_id": "5"
}
  • 返回值
{
  "code": 200,
  "text": "Success"
}

为某个分组添加菜单控制

  • 请求 URL/api/role_privileges
  • 请求方式PUT
  • Body 信息
{
  "data": [
    {
      "resource_id": "15",
      "resource_type": 3,
      "check": 1
    }
  ],
  "role_id": "2"
}
  • 返回值
{
  "message": "ok"
}

获取某个角色的菜单控制列表

  • 请求 URL/api/role_privileges/build_role_privileges/:id

  • 请求方式GET

  • Body 信息:无

  • 返回值

[
  {
    "level": "0",
    "leaf_flag": "1",
    "module_no": "3",
    "sort": "1",
    "icon": "UserOutlined",
    "checked": true,
    "menus": [
      {
        "status_flag": "1",
        "sort": "1",
        "url": "/settings/users",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit User",
            "id": "4",
            "menu_id": "29",
            "button_no": "users_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete User",
            "id": "6",
            "menu_id": "29",
            "button_no": "users_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Extn",
            "id": "7",
            "menu_id": "29",
            "button_no": "users_new_extn",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New User Dev Key",
            "id": "8",
            "menu_id": "29",
            "button_no": "users_devkey_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit User Dev Key",
            "id": "9",
            "menu_id": "29",
            "button_no": "users_devkey_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete User Dev Key",
            "id": "10",
            "menu_id": "29",
            "button_no": "users_devkey_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New User",
            "id": "1",
            "menu_id": "29",
            "button_no": "users_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Import User",
            "id": "2",
            "menu_id": "29",
            "button_no": "users_import",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Export User",
            "id": "3",
            "menu_id": "29",
            "button_no": "users_export",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Change User Password",
            "id": "5",
            "menu_id": "29",
            "button_no": "users_change_password",
            "description": ""
          }
        ],
        "k": "Users",
        "module_id": "3",
        "description": "",
        "id": "29"
      },
      {
        "status_flag": "1",
        "sort": "2",
        "url": "/settings/extensions",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "New",
            "id": "11",
            "menu_id": "30",
            "button_no": "extensions_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete",
            "id": "16",
            "menu_id": "30",
            "button_no": "extensions_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Advanced Settings",
            "id": "15",
            "menu_id": "30",
            "button_no": "extensions_advanced_settings_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit",
            "id": "14",
            "menu_id": "30",
            "button_no": "extensions_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Export",
            "id": "13",
            "menu_id": "30",
            "button_no": "extensions_export",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Import",
            "id": "12",
            "menu_id": "30",
            "button_no": "extensions_import",
            "description": ""
          }
        ],
        "k": "Extensions",
        "module_id": "3",
        "description": "",
        "id": "30"
      },
      {
        "status_flag": "1",
        "sort": "3",
        "url": "/settings/groups",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Group",
            "id": "18",
            "menu_id": "31",
            "button_no": "groups_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Group",
            "id": "19",
            "menu_id": "31",
            "button_no": "groups_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Add Group Member(s)",
            "id": "20",
            "menu_id": "31",
            "button_no": "group_add_member",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Remove All Group Member(s)",
            "id": "21",
            "menu_id": "31",
            "button_no": "group_delete_all",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Group Member",
            "id": "22",
            "menu_id": "31",
            "button_no": "group_delete_member",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Group",
            "id": "17",
            "menu_id": "31",
            "button_no": "groups_new",
            "description": ""
          }
        ],
        "k": "Groups",
        "module_id": "3",
        "description": "",
        "id": "31"
      },
      {
        "status_flag": "1",
        "sort": "4",
        "url": "/settings/system_roles",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Member",
            "id": "24",
            "menu_id": "32",
            "button_no": "roles_new_members",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New",
            "id": "23",
            "menu_id": "32",
            "button_no": "roles_new",
            "description": ""
          }
        ],
        "k": "Roles & Perms",
        "module_id": "3",
        "description": "",
        "id": "32"
      },
      {
        "status_flag": "1",
        "sort": "5",
        "url": "/settings/contacts",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Export Contact",
            "id": "298",
            "menu_id": "33",
            "button_no": "contacts_export",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Contact",
            "id": "300",
            "menu_id": "33",
            "button_no": "contacts_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Contact",
            "id": "296",
            "menu_id": "33",
            "button_no": "contacts_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Import Contact",
            "id": "297",
            "menu_id": "33",
            "button_no": "contacts_import",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Contact",
            "id": "299",
            "menu_id": "33",
            "button_no": "contacts_edit",
            "description": ""
          }
        ],
        "k": "Contacts",
        "module_id": "3",
        "description": "",
        "id": "33"
      }
    ],
    "k": "User",
    "module_id": "",
    "description": "",
    "id": "3",
    "v": "SMENUS_USERS"
  },
  {
    "level": "0",
    "leaf_flag": "1",
    "module_no": "4",
    "sort": "2",
    "icon": "PhoneOutlined",
    "checked": true,
    "menus": [
      {
        "status_flag": "1",
        "sort": "1",
        "url": "/settings/routes",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Route",
            "id": "25",
            "menu_id": "7",
            "button_no": "routes_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Control Route Profile",
            "id": "34",
            "menu_id": "7",
            "button_no": "routes_control",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Route Application",
            "id": "33",
            "menu_id": "7",
            "button_no": "routes_delete_applications",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Route Application",
            "id": "32",
            "menu_id": "7",
            "button_no": "routes_edit_applications",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Route Application",
            "id": "31",
            "menu_id": "7",
            "button_no": "routes_new_applications",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Reload Route",
            "id": "30",
            "menu_id": "7",
            "button_no": "routes_reload",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Route",
            "id": "29",
            "menu_id": "7",
            "button_no": "routes_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Route",
            "id": "28",
            "menu_id": "7",
            "button_no": "routes_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Export Route",
            "id": "27",
            "menu_id": "7",
            "button_no": "routes_export",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Import Route",
            "id": "26",
            "menu_id": "7",
            "button_no": "routes_import",
            "description": ""
          }
        ],
        "k": "Routes",
        "module_id": "4",
        "description": "",
        "id": "7"
      },
      {
        "status_flag": "1",
        "sort": "2",
        "url": "/settings/contexts",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Context",
            "id": "275",
            "menu_id": "8",
            "button_no": "context_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Context",
            "id": "273",
            "menu_id": "8",
            "button_no": "context_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Context",
            "id": "274",
            "menu_id": "8",
            "button_no": "context_edit",
            "description": ""
          }
        ],
        "k": "Contexts",
        "module_id": "4",
        "description": "",
        "id": "8"
      },
      {
        "status_flag": "1",
        "sort": "3",
        "url": "/settings/blacklist",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Blacklist",
            "id": "60",
            "menu_id": "9",
            "button_no": "blacklist_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Export Blacklist",
            "id": "61",
            "menu_id": "9",
            "button_no": "blacklist_export",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Import Blacklist Number",
            "id": "62",
            "menu_id": "9",
            "button_no": "blacklist_num_import",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Blacklist Number",
            "id": "63",
            "menu_id": "9",
            "button_no": "blacklist_num_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Blacklist Number",
            "id": "65",
            "menu_id": "9",
            "button_no": "blacklist_num_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Blacklist Number",
            "id": "64",
            "menu_id": "9",
            "button_no": "blacklist_num_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Blacklist",
            "id": "59",
            "menu_id": "9",
            "button_no": "blacklist_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Blacklist",
            "id": "58",
            "menu_id": "9",
            "button_no": "blacklist_new",
            "description": ""
          }
        ],
        "k": "Black-White-List",
        "module_id": "4",
        "description": "",
        "id": "9"
      },
      {
        "status_flag": "1",
        "sort": "4",
        "url": "/settings/ivrs",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete IVR",
            "id": "37",
            "menu_id": "10",
            "button_no": "ivrs_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New IVR",
            "id": "35",
            "menu_id": "10",
            "button_no": "ivrs_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit IVR",
            "id": "36",
            "menu_id": "10",
            "button_no": "ivrs_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New IVR Action",
            "id": "38",
            "menu_id": "10",
            "button_no": "ivrs_new_actions",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit IVR Action",
            "id": "39",
            "menu_id": "10",
            "button_no": "ivrs_edit_actions",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete IVR Action",
            "id": "40",
            "menu_id": "10",
            "button_no": "ivrs_delete_actions",
            "description": ""
          }
        ],
        "k": "IVRs",
        "module_id": "4",
        "description": "",
        "id": "10"
      },
      {
        "status_flag": "1",
        "sort": "5",
        "url": "/settings/blocks",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Export SVG Block",
            "id": "72",
            "menu_id": "11",
            "button_no": "blocks_export_png",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Export Lua Block",
            "id": "73",
            "menu_id": "11",
            "button_no": "blocks_export_lua",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Save Block",
            "id": "74",
            "menu_id": "11",
            "button_no": "blocks_save",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Import Block",
            "id": "75",
            "menu_id": "11",
            "button_no": "blocks_import",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Block",
            "id": "66",
            "menu_id": "11",
            "button_no": "blocks_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Block",
            "id": "68",
            "menu_id": "11",
            "button_no": "blocks_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Block",
            "id": "67",
            "menu_id": "11",
            "button_no": "blocks_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Export JSON Block",
            "id": "69",
            "menu_id": "11",
            "button_no": "blocks_export_json",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Export XML Block",
            "id": "70",
            "menu_id": "11",
            "button_no": "blocks_export_xml",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Export SVG Block",
            "id": "71",
            "menu_id": "11",
            "button_no": "blocks_export_svg",
            "description": ""
          }
        ],
        "k": "Blocks",
        "module_id": "4",
        "description": "",
        "id": "11"
      },
      {
        "status_flag": "1",
        "sort": "6",
        "url": "/settings/hotlines",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "New DID",
            "id": "276",
            "menu_id": "12",
            "button_no": "hotline_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Batch Operation",
            "id": "279",
            "menu_id": "12",
            "button_no": "batch_operation",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete DID",
            "id": "278",
            "menu_id": "12",
            "button_no": "hotline_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit DID",
            "id": "277",
            "menu_id": "12",
            "button_no": "hotline_edit",
            "description": ""
          }
        ],
        "k": "DIDs",
        "module_id": "4",
        "description": "",
        "id": "12"
      },
      {
        "status_flag": "1",
        "sort": "7",
        "url": "/settings/dods",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit DOD",
            "id": "281",
            "menu_id": "13",
            "button_no": "dod_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete DOD",
            "id": "282",
            "menu_id": "13",
            "button_no": "dod_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New DOD",
            "id": "280",
            "menu_id": "13",
            "button_no": "dod_new",
            "description": ""
          }
        ],
        "k": "DODs",
        "module_id": "4",
        "description": "",
        "id": "13"
      },
      {
        "status_flag": "1",
        "sort": "8",
        "url": "/settings/gateways",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Gateway Param",
            "id": "52",
            "menu_id": "14",
            "button_no": "gateways_params_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Gateway",
            "id": "48",
            "menu_id": "14",
            "button_no": "gateways_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Gateway Variable",
            "id": "57",
            "menu_id": "14",
            "button_no": "gateways_variables_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Gateway Param",
            "id": "53",
            "menu_id": "14",
            "button_no": "gateways_params_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Gateway Variable",
            "id": "56",
            "menu_id": "14",
            "button_no": "gateways_variables_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Gateway Control",
            "id": "49",
            "menu_id": "14",
            "button_no": "gateways_control",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Gateway",
            "id": "50",
            "menu_id": "14",
            "button_no": "gateways_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Gateway",
            "id": "51",
            "menu_id": "14",
            "button_no": "gateways_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Gateway Param",
            "id": "54",
            "menu_id": "14",
            "button_no": "gateways_params_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Gateway Variable",
            "id": "55",
            "menu_id": "14",
            "button_no": "gateways_variables_new",
            "description": ""
          }
        ],
        "k": "Gateways",
        "module_id": "4",
        "description": "",
        "id": "14"
      },
      {
        "status_flag": "1",
        "sort": "9",
        "url": "/settings/trunks",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete",
            "id": "84",
            "menu_id": "15",
            "button_no": "trunks_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Export",
            "id": "85",
            "menu_id": "15",
            "button_no": "trunks_export",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New",
            "id": "82",
            "menu_id": "15",
            "button_no": "trunks_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit",
            "id": "83",
            "menu_id": "15",
            "button_no": "trunks_edit",
            "description": ""
          }
        ],
        "k": "Trunks",
        "module_id": "4",
        "description": "",
        "id": "15"
      },
      {
        "status_flag": "1",
        "sort": "10",
        "url": "/settings/trunk_groups",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Trunk Group",
            "id": "87",
            "menu_id": "16",
            "button_no": "trunk_groups_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Group Trunk",
            "id": "92",
            "menu_id": "16",
            "button_no": "trunk_groups_delete_trunk",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Remove All Group Trunk(s)",
            "id": "91",
            "menu_id": "16",
            "button_no": "trunk_groups_delete_all_trunks",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Add Group Trunk(s)",
            "id": "90",
            "menu_id": "16",
            "button_no": "trunk_groups_add_trunk",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Reload Trunk Group",
            "id": "89",
            "menu_id": "16",
            "button_no": "trunk_groups_reload",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Trunk Group",
            "id": "86",
            "menu_id": "16",
            "button_no": "trunk_groups_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Trunk Group",
            "id": "88",
            "menu_id": "16",
            "button_no": "trunk_groups_delete",
            "description": ""
          }
        ],
        "k": "Trunk Groups",
        "module_id": "4",
        "description": "",
        "id": "16"
      },
      {
        "status_flag": "1",
        "sort": "11",
        "url": "/settings/routes_trunk_code",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Routes Trunk Code",
            "id": "94",
            "menu_id": "17",
            "button_no": "routes_trunk_code_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Routes Trunk Code",
            "id": "95",
            "menu_id": "17",
            "button_no": "routes_trunk_code_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Routes Trunk Code",
            "id": "93",
            "menu_id": "17",
            "button_no": "routes_trunk_code_new",
            "description": ""
          }
        ],
        "k": "Route Codes",
        "module_id": "4",
        "description": "",
        "id": "17"
      },
      {
        "status_flag": "1",
        "sort": "12",
        "url": "/settings/time_management",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Time Management",
            "id": "42",
            "menu_id": "18",
            "button_no": "time_management_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Time Management Work Time",
            "id": "47",
            "menu_id": "18",
            "button_no": "time_management_worktime_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Time Management Offday",
            "id": "46",
            "menu_id": "18",
            "button_no": "time_management_offday_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Time Management Offday",
            "id": "45",
            "menu_id": "18",
            "button_no": "time_management_offday_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Time Management Offday",
            "id": "44",
            "menu_id": "18",
            "button_no": "time_management_offday_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Time Management",
            "id": "43",
            "menu_id": "18",
            "button_no": "time_management_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Time Management",
            "id": "41",
            "menu_id": "18",
            "button_no": "time_management_new",
            "description": ""
          }
        ],
        "k": "Time Management",
        "module_id": "4",
        "description": "",
        "id": "18"
      }
    ],
    "k": "Call",
    "module_id": "",
    "description": "",
    "id": "4",
    "v": "SMENUS_CALL"
  },
  {
    "level": "0",
    "leaf_flag": "1",
    "module_no": "5",
    "sort": "3",
    "icon": "ConferenceOutlined",
    "checked": true,
    "menus": [
      {
        "status_flag": "1",
        "sort": "1",
        "url": "/settings/conferences",
        "checked": true,
        "buttons": [],
        "k": "Conference control",
        "module_id": "5",
        "description": "",
        "id": "19"
      },
      {
        "status_flag": "1",
        "sort": "3",
        "url": "/settings/meetings",
        "checked": true,
        "buttons": [],
        "k": "Meetings",
        "module_id": "5",
        "description": "",
        "id": "20"
      },
      {
        "status_flag": "1",
        "sort": "4",
        "url": "/settings/conference_profiles",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Conference Profile",
            "id": "105",
            "menu_id": "21",
            "button_no": "conference_profiles_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Conference Profile",
            "id": "104",
            "menu_id": "21",
            "button_no": "conference_profiles_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Conference Profile",
            "id": "106",
            "menu_id": "21",
            "button_no": "conference_profiles_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Conference Profile Param",
            "id": "107",
            "menu_id": "21",
            "button_no": "conference_profiles_params_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Conference Profile Param",
            "id": "108",
            "menu_id": "21",
            "button_no": "conference_profiles_params_edit",
            "description": ""
          }
        ],
        "k": "Profiles",
        "module_id": "5",
        "description": "",
        "id": "21"
      },
      {
        "status_flag": "1",
        "sort": "5",
        "url": "/settings/conference_controls",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Conference Control",
            "id": "111",
            "menu_id": "22",
            "button_no": "conference_controls_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Conference Control",
            "id": "109",
            "menu_id": "22",
            "button_no": "conference_controls_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Conference Control",
            "id": "110",
            "menu_id": "22",
            "button_no": "conference_controls_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Conference Control Param",
            "id": "114",
            "menu_id": "22",
            "button_no": "conference_controls_params_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Conference Control Param",
            "id": "112",
            "menu_id": "22",
            "button_no": "conference_controls_params_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Conference Control Param",
            "id": "113",
            "menu_id": "22",
            "button_no": "conference_controls_params_edit",
            "description": ""
          }
        ],
        "k": "DTMF Controls",
        "module_id": "5",
        "description": "",
        "id": "22"
      },
      {
        "status_flag": "1",
        "sort": "6",
        "url": "/settings/number_pools",
        "checked": true,
        "buttons": [],
        "k": "Meeting Number Pool",
        "module_id": "5",
        "description": "",
        "id": "23"
      },
      {
        "status_flag": "1",
        "sort": "7",
        "url": "/settings/conference_cdrs",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Search",
            "id": "185",
            "menu_id": "24",
            "button_no": "conference_cdrs_search",
            "description": ""
          }
        ],
        "k": "Conference CDRs",
        "module_id": "5",
        "description": "",
        "id": "24"
      }
    ],
    "k": "Conference",
    "module_id": "",
    "description": "",
    "id": "5",
    "v": "SMENUS_CONFERENCE"
  },
  {
    "level": "0",
    "leaf_flag": "1",
    "module_no": "6",
    "sort": "4",
    "icon": "CallCenterOutlined",
    "checked": true,
    "menus": [
      {
        "status_flag": "1",
        "sort": "1",
        "url": "/settings/agents",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Agent",
            "id": "115",
            "menu_id": "25",
            "button_no": "agents_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Agent",
            "id": "116",
            "menu_id": "25",
            "button_no": "agents_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Agent",
            "id": "117",
            "menu_id": "25",
            "button_no": "agents_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Login All Agents",
            "id": "118",
            "menu_id": "25",
            "button_no": "agents_login_all",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Logout All Agents",
            "id": "119",
            "menu_id": "25",
            "button_no": "agents_logout_all",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Change Agent Password",
            "id": "120",
            "menu_id": "25",
            "button_no": "agents_change_password",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Agent Extension",
            "id": "121",
            "menu_id": "25",
            "button_no": "agents_extensions_new",
            "description": ""
          }
        ],
        "k": "Agents",
        "module_id": "6",
        "description": "",
        "id": "25"
      },
      {
        "status_flag": "1",
        "sort": "2",
        "url": "/settings/queues",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Queue Param",
            "id": "125",
            "menu_id": "26",
            "button_no": "queues_params_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Queue",
            "id": "124",
            "menu_id": "26",
            "button_no": "queues_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Queue",
            "id": "123",
            "menu_id": "26",
            "button_no": "queues_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Queue",
            "id": "122",
            "menu_id": "26",
            "button_no": "queues_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Queue Agent",
            "id": "129",
            "menu_id": "26",
            "button_no": "queues_agent_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New Queue Agent",
            "id": "128",
            "menu_id": "26",
            "button_no": "queues_agent_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete Queue Param",
            "id": "127",
            "menu_id": "26",
            "button_no": "queues_params_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit Queue Param",
            "id": "126",
            "menu_id": "26",
            "button_no": "queues_params_edit",
            "description": ""
          }
        ],
        "k": "Queues",
        "module_id": "6",
        "description": "",
        "id": "26"
      },
      {
        "status_flag": "1",
        "sort": "3",
        "url": "/settings/fifo_cdrs",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Search",
            "id": "186",
            "menu_id": "27",
            "button_no": "fifo_cdrs_search",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Export",
            "id": "187",
            "menu_id": "27",
            "button_no": "fifo_cdrs_export",
            "description": ""
          }
        ],
        "k": "FIFO CDRs",
        "module_id": "6",
        "description": "",
        "id": "27"
      },
      {
        "status_flag": "1",
        "sort": "4",
        "url": "/settings/callcenter_cdrs",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Export",
            "id": "189",
            "menu_id": "28",
            "button_no": "callcenter_cdrs_export",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Search",
            "id": "188",
            "menu_id": "28",
            "button_no": "callcenter_cdrs_search",
            "description": ""
          }
        ],
        "k": "Callcenter CDRs",
        "module_id": "6",
        "description": "",
        "id": "28"
      }
    ],
    "k": "Callcenter",
    "module_id": "",
    "description": "",
    "id": "6",
    "v": "SMENUS_CALLCENTER"
  },
  {
    "level": "0",
    "leaf_flag": "1",
    "module_no": "7",
    "sort": "5",
    "icon": "CDROutlined",
    "checked": true,
    "menus": [
      {
        "status_flag": "1",
        "sort": "1",
        "url": "/settings/cdrs",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Export",
            "id": "184",
            "menu_id": "34",
            "button_no": "cdrs_export",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Search",
            "id": "183",
            "menu_id": "34",
            "button_no": "cdrs_search",
            "description": ""
          }
        ],
        "k": "CDRs",
        "module_id": "7",
        "description": "",
        "id": "34"
      },
      {
        "status_flag": "1",
        "sort": "2",
        "url": "/settings/odbc_cdrs",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete ODBC CDR",
            "id": "303",
            "menu_id": "35",
            "button_no": "odbc_cdrs_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit ODBC CDR",
            "id": "302",
            "menu_id": "35",
            "button_no": "odbc_cdrs_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New ODBC CDR",
            "id": "301",
            "menu_id": "35",
            "button_no": "odbc_cdrs_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "ODBC CDR Reload",
            "id": "307",
            "menu_id": "35",
            "button_no": "odbc_cdrs_reload",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete ODBC CDR Param",
            "id": "306",
            "menu_id": "35",
            "button_no": "odbc_cdrs_params_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit ODBC CDR Param",
            "id": "305",
            "menu_id": "35",
            "button_no": "odbc_cdrs_params_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New ODBC CDR Param",
            "id": "304",
            "menu_id": "35",
            "button_no": "odbc_cdrs_params_new",
            "description": ""
          }
        ],
        "k": "ODBC CDR",
        "module_id": "7",
        "description": "",
        "id": "35"
      }
    ],
    "k": "CDR",
    "module_id": "",
    "description": "",
    "id": "7",
    "v": "SMENUS_CDRS"
  },
  {
    "level": "0",
    "leaf_flag": "0",
    "module_no": "8",
    "sort": "6",
    "icon": "ToolOutlined",
    "modules": [
      {
        "level": "1",
        "leaf_flag": "1",
        "module_no": "8-9",
        "sort": "1",
        "icon": "ProfileOutlined",
        "checked": false,
        "menus": [
          {
            "status_flag": "1",
            "sort": "1",
            "url": "/settings/term",
            "checked": false,
            "buttons": [],
            "k": "Terminal",
            "module_id": "9",
            "description": "",
            "id": "41"
          },
          {
            "status_flag": "1",
            "sort": "2",
            "url": "/settings/devices_provisioning",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "New",
                "id": "199",
                "menu_id": "42",
                "button_no": "devecis_provisioning_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Import",
                "id": "201",
                "menu_id": "42",
                "button_no": "devecis_provisioning_import",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete",
                "id": "200",
                "menu_id": "42",
                "button_no": "devecis_provisioning_delete",
                "description": ""
              }
            ],
            "k": "Devices Provisioning",
            "module_id": "9",
            "description": "",
            "id": "42"
          },
          {
            "status_flag": "1",
            "sort": "3",
            "url": "/settings/media_files",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete",
                "id": "206",
                "menu_id": "43",
                "button_no": "media_files_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Batch Delete",
                "id": "207",
                "menu_id": "43",
                "button_no": "media_files_batch_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Batch Download",
                "id": "208",
                "menu_id": "43",
                "button_no": "media_files_batch_download",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Search",
                "id": "209",
                "menu_id": "43",
                "button_no": "media_files_search",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Record",
                "id": "204",
                "menu_id": "43",
                "button_no": "media_files_record",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Upload",
                "id": "202",
                "menu_id": "43",
                "button_no": "media_files_upload",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit",
                "id": "205",
                "menu_id": "43",
                "button_no": "media_files_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "TTS",
                "id": "203",
                "menu_id": "43",
                "button_no": "media_files_tts",
                "description": ""
              }
            ],
            "k": "Media Files",
            "module_id": "9",
            "description": "",
            "id": "43"
          },
          {
            "status_flag": "1",
            "sort": "5",
            "url": "/settings/logs",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "Refresh",
                "id": "210",
                "menu_id": "44",
                "button_no": "logs_refresh",
                "description": ""
              }
            ],
            "k": "Logs",
            "module_id": "9",
            "description": "",
            "id": "44"
          },
          {
            "status_flag": "1",
            "sort": "6",
            "url": "/settings/system",
            "checked": false,
            "buttons": [],
            "k": "Systems",
            "module_id": "9",
            "description": "",
            "id": "45"
          }
        ],
        "k": "Function",
        "module_id": "8",
        "description": "",
        "id": "9",
        "v": "SMENUS_EXPAND_FUNCTION"
      },
      {
        "level": "1",
        "leaf_flag": "1",
        "module_no": "",
        "sort": "2",
        "icon": "ProfileOutlined",
        "checked": false,
        "menus": [
          {
            "status_flag": "1",
            "sort": "1",
            "url": "/settings/acls",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit Acl",
                "id": "232",
                "menu_id": "46",
                "button_no": "acls_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete Acl Node",
                "id": "237",
                "menu_id": "46",
                "button_no": "acls_nodes_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit Acl Node",
                "id": "236",
                "menu_id": "46",
                "button_no": "acls_nodes_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New Acl Node",
                "id": "235",
                "menu_id": "46",
                "button_no": "acls_nodes_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Reload Acl",
                "id": "234",
                "menu_id": "46",
                "button_no": "acls_reload",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete Acl",
                "id": "233",
                "menu_id": "46",
                "button_no": "acls_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New Acl",
                "id": "231",
                "menu_id": "46",
                "button_no": "acls_new",
                "description": ""
              }
            ],
            "k": "ACLs",
            "module_id": "10",
            "description": "",
            "id": "46"
          },
          {
            "status_flag": "1",
            "sort": "2",
            "url": "/settings/globals",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "Show Details",
                "id": "242",
                "menu_id": "47",
                "button_no": "globals_show_details",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New",
                "id": "238",
                "menu_id": "47",
                "button_no": "globals_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit",
                "id": "239",
                "menu_id": "47",
                "button_no": "globals_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete",
                "id": "240",
                "menu_id": "47",
                "button_no": "globals_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Reload",
                "id": "241",
                "menu_id": "47",
                "button_no": "globals_reload",
                "description": ""
              }
            ],
            "k": "Globals",
            "module_id": "10",
            "description": "",
            "id": "47"
          },
          {
            "status_flag": "1",
            "sort": "3",
            "url": "/settings/module_params",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete",
                "id": "251",
                "menu_id": "48",
                "button_no": "module_params_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New",
                "id": "249",
                "menu_id": "48",
                "button_no": "module_params_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit",
                "id": "250",
                "menu_id": "48",
                "button_no": "module_params_edit",
                "description": ""
              }
            ],
            "k": "Params",
            "module_id": "10",
            "description": "",
            "id": "48"
          },
          {
            "status_flag": "1",
            "sort": "4",
            "url": "/settings/distributors",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete Distributor",
                "id": "78",
                "menu_id": "49",
                "button_no": "distributors_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New Distributor Node",
                "id": "79",
                "menu_id": "49",
                "button_no": "distributors_node_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit Distributor Node",
                "id": "80",
                "menu_id": "49",
                "button_no": "distributors_node_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete Distributor Node",
                "id": "81",
                "menu_id": "49",
                "button_no": "distributors_node_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit Distributor",
                "id": "77",
                "menu_id": "49",
                "button_no": "distributors_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New Distributor",
                "id": "76",
                "menu_id": "49",
                "button_no": "distributors_new",
                "description": ""
              }
            ],
            "k": "Distributors",
            "module_id": "10",
            "description": "",
            "id": "49"
          },
          {
            "status_flag": "1",
            "sort": "5",
            "url": "/settings/dicts",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit",
                "id": "191",
                "menu_id": "50",
                "button_no": "dicts_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete",
                "id": "192",
                "menu_id": "50",
                "button_no": "dicts_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New",
                "id": "190",
                "menu_id": "50",
                "button_no": "dicts_new",
                "description": ""
              }
            ],
            "k": "Dicts",
            "module_id": "10",
            "description": "",
            "id": "50"
          }
        ],
        "k": "System",
        "module_id": "8",
        "description": "",
        "id": "10",
        "v": "SMENUS_SYSTEM_SETTINGS"
      },
      {
        "level": "1",
        "leaf_flag": "1",
        "module_no": "8-11",
        "sort": "3",
        "icon": "DatabaseOutlined",
        "checked": false,
        "menus": [
          {
            "status_flag": "1",
            "sort": "2",
            "url": "/settings/system_modules",
            "checked": false,
            "buttons": [],
            "k": "System Module",
            "module_id": "11",
            "description": "",
            "id": "57"
          },
          {
            "status_flag": "1",
            "sort": "3",
            "url": "/settings/system_menus",
            "checked": false,
            "buttons": [],
            "k": "Menus",
            "module_id": "11",
            "description": "",
            "id": "58"
          }
        ],
        "k": "Menu",
        "module_id": "8",
        "description": "",
        "id": "11",
        "v": "SMENUS_AUTHORITY"
      },
      {
        "level": "1",
        "leaf_flag": "1",
        "module_no": "12",
        "sort": "4",
        "icon": "MoneyCollectOutlined",
        "checked": false,
        "menus": [
          {
            "status_flag": "1",
            "sort": "1",
            "url": "/settings/bill_account",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "Recharge",
                "id": "289",
                "menu_id": "36",
                "button_no": "bill_account_recharge",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New",
                "id": "287",
                "menu_id": "36",
                "button_no": "bill_account_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Import",
                "id": "288",
                "menu_id": "36",
                "button_no": "bill_account_create_multi",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete",
                "id": "290",
                "menu_id": "36",
                "button_no": "bill_account_delete",
                "description": ""
              }
            ],
            "k": "Billing Accounts",
            "module_id": "12",
            "description": "",
            "id": "36"
          },
          {
            "status_flag": "1",
            "sort": "2",
            "url": "/settings/bills",
            "checked": false,
            "buttons": [],
            "k": "Bills",
            "module_id": "12",
            "description": "",
            "id": "37"
          },
          {
            "status_flag": "1",
            "sort": "3",
            "url": "/settings/bill_rates",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit Bill Rates",
                "id": "285",
                "menu_id": "38",
                "button_no": "bill_rates_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New Bill Rates",
                "id": "284",
                "menu_id": "38",
                "button_no": "bill_rates_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete Bill Rates",
                "id": "286",
                "menu_id": "38",
                "button_no": "bill_rates_delete",
                "description": ""
              }
            ],
            "k": "Rates",
            "module_id": "12",
            "description": "",
            "id": "38"
          }
        ],
        "k": "Billing",
        "module_id": "8",
        "description": "",
        "id": "12",
        "v": "SMENUS_BILL"
      },
      {
        "level": "1",
        "leaf_flag": "1",
        "module_no": "13",
        "sort": "5",
        "icon": "AIOutlined",
        "checked": false,
        "menus": [
          {
            "status_flag": "1",
            "sort": "1",
            "url": "/settings/ai",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "New AI Settings Param",
                "id": "138",
                "menu_id": "59",
                "button_no": "ai_settings_params_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete AI Settings Param",
                "id": "137",
                "menu_id": "59",
                "button_no": "ai_settings_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit AI Settings Param",
                "id": "136",
                "menu_id": "59",
                "button_no": "ai_settings_params_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "AI Reload",
                "id": "135",
                "menu_id": "59",
                "button_no": "ai_reload",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit AI App",
                "id": "134",
                "menu_id": "59",
                "button_no": "ai_app_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New AI App",
                "id": "133",
                "menu_id": "59",
                "button_no": "ai_app_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete AI",
                "id": "132",
                "menu_id": "59",
                "button_no": "ai_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit AI",
                "id": "131",
                "menu_id": "59",
                "button_no": "ai_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New AI",
                "id": "130",
                "menu_id": "59",
                "button_no": "ai_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete AI App",
                "id": "142",
                "menu_id": "59",
                "button_no": "ai_app_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete AI Bindings",
                "id": "143",
                "menu_id": "59",
                "button_no": "ai_bindings_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New AI Bindings",
                "id": "144",
                "menu_id": "59",
                "button_no": "ai_bindings_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit AI Bindings",
                "id": "145",
                "menu_id": "59",
                "button_no": "ai_bindings_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit AI Profiles Param",
                "id": "141",
                "menu_id": "59",
                "button_no": "ai_profiles_params_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit AI Profiles Param",
                "id": "140",
                "menu_id": "59",
                "button_no": "ai_profiles_params_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New AI Profile",
                "id": "139",
                "menu_id": "59",
                "button_no": "ai_profiles_params_new",
                "description": ""
              }
            ],
            "k": "AIs",
            "module_id": "13",
            "description": "",
            "id": "59"
          },
          {
            "status_flag": "1",
            "sort": "2",
            "url": "/settings/baidu",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete Baidu",
                "id": "148",
                "menu_id": "60",
                "button_no": "baidu_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Baidu Reload",
                "id": "153",
                "menu_id": "60",
                "button_no": "baidu_reload",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "DELETE Baidu TTS",
                "id": "152",
                "menu_id": "60",
                "button_no": "baidu_asr_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "DELETE Baidu TTS",
                "id": "151",
                "menu_id": "60",
                "button_no": "baidu_tts_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit Baidu TTS",
                "id": "150",
                "menu_id": "60",
                "button_no": "baidu_tts_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New Baidu TTS",
                "id": "149",
                "menu_id": "60",
                "button_no": "baidu_tts_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit Baidu",
                "id": "147",
                "menu_id": "60",
                "button_no": "baidu_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New Baidu",
                "id": "146",
                "menu_id": "60",
                "button_no": "baidu_new",
                "description": ""
              }
            ],
            "k": "Baidu",
            "module_id": "13",
            "description": "",
            "id": "60"
          },
          {
            "status_flag": "1",
            "sort": "3",
            "url": "/settings/ali",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete Ali TTS",
                "id": "166",
                "menu_id": "61",
                "button_no": "table_columns_settings_arr_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit Ali TTS",
                "id": "164",
                "menu_id": "61",
                "button_no": "ali_tts_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New Ali TTS",
                "id": "163",
                "menu_id": "61",
                "button_no": "ali_tts_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete Ali",
                "id": "162",
                "menu_id": "61",
                "button_no": "ali_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Ali Reload",
                "id": "167",
                "menu_id": "61",
                "button_no": "ali_reload",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit Ali",
                "id": "161",
                "menu_id": "61",
                "button_no": "ali_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New Ali",
                "id": "160",
                "menu_id": "61",
                "button_no": "ali_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete Ali TTS",
                "id": "165",
                "menu_id": "61",
                "button_no": "ali_tts_delete",
                "description": ""
              }
            ],
            "k": "Ali",
            "module_id": "13",
            "description": "",
            "id": "61"
          },
          {
            "status_flag": "1",
            "sort": "4",
            "url": "/settings/huawei",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit Huawei",
                "id": "169",
                "menu_id": "62",
                "button_no": "huawei_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Huawei Reload",
                "id": "174",
                "menu_id": "62",
                "button_no": "huawei_reload",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete Huawei Params",
                "id": "173",
                "menu_id": "62",
                "button_no": "huawei_params_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New Huawei",
                "id": "168",
                "menu_id": "62",
                "button_no": "huawei_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New Huawei Params",
                "id": "171",
                "menu_id": "62",
                "button_no": "huawei_params_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit Huawei Params",
                "id": "172",
                "menu_id": "62",
                "button_no": "huawei_params_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete Huawei",
                "id": "170",
                "menu_id": "62",
                "button_no": "huawei_delete",
                "description": ""
              }
            ],
            "k": "Huawei",
            "module_id": "13",
            "description": "",
            "id": "62"
          },
          {
            "status_flag": "1",
            "sort": "5",
            "url": "/settings/xunfei",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete Xunfei Params",
                "id": "181",
                "menu_id": "63",
                "button_no": "xunfei_params_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New Xunfei Params",
                "id": "179",
                "menu_id": "63",
                "button_no": "xunfei_params_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete Xunfei Setting",
                "id": "178",
                "menu_id": "63",
                "button_no": "xunfei_setting_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete Xunfei",
                "id": "177",
                "menu_id": "63",
                "button_no": "xunfei_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit Xunfei",
                "id": "176",
                "menu_id": "63",
                "button_no": "xunfei_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New Xunfei",
                "id": "175",
                "menu_id": "63",
                "button_no": "xunfei_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Xunfei Reload",
                "id": "182",
                "menu_id": "63",
                "button_no": "xunfei_reload",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit Xunfei Params",
                "id": "180",
                "menu_id": "63",
                "button_no": "xunfei_params_edit",
                "description": ""
              }
            ],
            "k": "iFly",
            "module_id": "13",
            "description": "",
            "id": "63"
          }
        ],
        "k": "AI",
        "module_id": "8",
        "description": "",
        "id": "13",
        "v": "SMENUS_AI"
      },
      {
        "level": "1",
        "leaf_flag": "1",
        "module_no": "",
        "sort": "6",
        "icon": "DatabaseOutlined",
        "checked": false,
        "menus": [
          {
            "status_flag": "1",
            "sort": "1",
            "url": "/settings/module",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "New",
                "id": "246",
                "menu_id": "51",
                "button_no": "module_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete",
                "id": "247",
                "menu_id": "51",
                "button_no": "module_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Control",
                "id": "248",
                "menu_id": "51",
                "button_no": "module_control",
                "description": ""
              }
            ],
            "k": "Modules",
            "module_id": "14",
            "description": "",
            "id": "51"
          },
          {
            "status_flag": "1",
            "sort": "2",
            "url": "/settings/xcc",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete XCC Param",
                "id": "258",
                "menu_id": "52",
                "button_no": "xcc_params_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete XCC",
                "id": "255",
                "menu_id": "52",
                "button_no": "xcc_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New XCC Param",
                "id": "256",
                "menu_id": "52",
                "button_no": "xcc_params_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit XCC Param",
                "id": "257",
                "menu_id": "52",
                "button_no": "xcc_params_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Reload XCC",
                "id": "253",
                "menu_id": "52",
                "button_no": "xcc_reload",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New XCC",
                "id": "252",
                "menu_id": "52",
                "button_no": "xcc_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit XCC",
                "id": "254",
                "menu_id": "52",
                "button_no": "xcc_edit",
                "description": ""
              }
            ],
            "k": "XCC",
            "module_id": "14",
            "description": "",
            "id": "52"
          },
          {
            "status_flag": "1",
            "sort": "3",
            "url": "/settings/xcc_rtc",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit XCC Param",
                "id": "264",
                "menu_id": "53",
                "button_no": "xcc_rtc_params_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New XCC",
                "id": "259",
                "menu_id": "53",
                "button_no": "xcc_rtc_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit XCC",
                "id": "261",
                "menu_id": "53",
                "button_no": "xcc_rtc_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete XCC",
                "id": "262",
                "menu_id": "53",
                "button_no": "xcc_rtc_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New XCC Param",
                "id": "263",
                "menu_id": "53",
                "button_no": "xcc_rtc_params_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete XCC Param",
                "id": "265",
                "menu_id": "53",
                "button_no": "xcc_rtc_params_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Reload XCC",
                "id": "260",
                "menu_id": "53",
                "button_no": "xcc_rtc_reload",
                "description": ""
              }
            ],
            "k": "XCC-RTC",
            "module_id": "14",
            "description": "",
            "id": "53"
          },
          {
            "status_flag": "1",
            "sort": "4",
            "url": "/settings/wxapp",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "New Wxapp",
                "id": "291",
                "menu_id": "54",
                "button_no": "wxapp_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit Wxapp",
                "id": "292",
                "menu_id": "54",
                "button_no": "wxapp_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete Wxapp",
                "id": "293",
                "menu_id": "54",
                "button_no": "wxapp_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit Wxapp Params",
                "id": "294",
                "menu_id": "54",
                "button_no": "wxapp_params_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Reload Wxapp",
                "id": "295",
                "menu_id": "54",
                "button_no": "wxapp_reload",
                "description": ""
              }
            ],
            "k": "WX App",
            "module_id": "14",
            "description": "",
            "id": "54"
          },
          {
            "status_flag": "1",
            "sort": "5",
            "url": "/settings/xui_profile",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "Mod XUI Reload",
                "id": "272",
                "menu_id": "55",
                "button_no": "xui_reload",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New Mod XUI",
                "id": "266",
                "menu_id": "55",
                "button_no": "xui_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit Mod XUI",
                "id": "267",
                "menu_id": "55",
                "button_no": "xui_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete Mod XUI",
                "id": "268",
                "menu_id": "55",
                "button_no": "xui_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "New Mod XUI Params",
                "id": "269",
                "menu_id": "55",
                "button_no": "xui_params_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit Mod XUI Params",
                "id": "270",
                "menu_id": "55",
                "button_no": "xui_params_edit",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete Mod XUI Params",
                "id": "271",
                "menu_id": "55",
                "button_no": "xui_params_delete",
                "description": ""
              }
            ],
            "k": "XUI",
            "module_id": "14",
            "description": "",
            "id": "55"
          },
          {
            "status_flag": "1",
            "sort": "6",
            "url": "/settings/eventsocket",
            "checked": false,
            "buttons": [
              {
                "status_flag": "1",
                "checked": false,
                "k": "New",
                "id": "243",
                "menu_id": "56",
                "button_no": "eventsocket_new",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Delete",
                "id": "245",
                "menu_id": "56",
                "button_no": "eventsocket_delete",
                "description": ""
              },
              {
                "status_flag": "1",
                "checked": false,
                "k": "Edit",
                "id": "244",
                "menu_id": "56",
                "button_no": "eventsocket_edit",
                "description": ""
              }
            ],
            "k": "EventSocket",
            "module_id": "14",
            "description": "",
            "id": "56"
          }
        ],
        "k": "Modules Configuration",
        "module_id": "8",
        "description": "",
        "id": "14",
        "v": "SMENUS_Modules"
      }
    ],
    "checked": true,
    "menus": [
      {
        "status_flag": "1",
        "sort": "1",
        "url": "/settings/sip_profiles",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit SIP Profile Param",
            "id": "226",
            "menu_id": "39",
            "button_no": "sip_profiles_params_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New SIP Profile Param",
            "id": "225",
            "menu_id": "39",
            "button_no": "sip_profiles_params_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Control SIP Profile",
            "id": "224",
            "menu_id": "39",
            "button_no": "sip_profiles_control",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete SIP Module Param",
            "id": "230",
            "menu_id": "39",
            "button_no": "sip_module_params_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New SIP Module Param",
            "id": "228",
            "menu_id": "39",
            "button_no": "sip_module_params_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit SIP Module Param",
            "id": "229",
            "menu_id": "39",
            "button_no": "sip_module_params_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete SIP Profile",
            "id": "223",
            "menu_id": "39",
            "button_no": "sip_profiles_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit SIP Profile",
            "id": "222",
            "menu_id": "39",
            "button_no": "sip_profiles_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New SIP Profile",
            "id": "221",
            "menu_id": "39",
            "button_no": "sip_profiles_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete SIP Profile Param",
            "id": "227",
            "menu_id": "39",
            "button_no": "sip_profiles_params_delete",
            "description": ""
          }
        ],
        "k": "SIP",
        "module_id": "8",
        "description": "",
        "id": "39"
      },
      {
        "status_flag": "1",
        "sort": "2",
        "url": "/settings/license",
        "checked": true,
        "buttons": [
          {
            "status_flag": "1",
            "checked": true,
            "k": "Create JSON",
            "id": "220",
            "menu_id": "40",
            "button_no": "license_create_json",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Upload New License",
            "id": "218",
            "menu_id": "40",
            "button_no": "license_upload",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Download req",
            "id": "217",
            "menu_id": "40",
            "button_no": "license_download_req",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Apply License",
            "id": "216",
            "menu_id": "40",
            "button_no": "license_apply",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit License Param",
            "id": "215",
            "menu_id": "40",
            "button_no": "license_params_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New License Param",
            "id": "214",
            "menu_id": "40",
            "button_no": "license_params_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Edit License",
            "id": "213",
            "menu_id": "40",
            "button_no": "license_edit",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Delete License",
            "id": "212",
            "menu_id": "40",
            "button_no": "license_delete",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "New License",
            "id": "211",
            "menu_id": "40",
            "button_no": "license_new",
            "description": ""
          },
          {
            "status_flag": "1",
            "checked": true,
            "k": "Apply New License",
            "id": "219",
            "menu_id": "40",
            "button_no": "license_apply_new",
            "description": ""
          }
        ],
        "k": "License",
        "module_id": "8",
        "description": "",
        "id": "40"
      }
    ],
    "k": "Advanced",
    "module_id": "",
    "description": "",
    "id": "8",
    "v": "SMENUS_ADVANCE"
  },
  {
    "level": "0",
    "leaf_flag": "1",
    "module_no": "15",
    "sort": "9",
    "icon": "ProfileOutlined",
    "checked": true,
    "menus": [
      {
        "status_flag": "1",
        "sort": "2",
        "url": "/settings/calls",
        "checked": true,
        "buttons": [],
        "k": "Calls",
        "module_id": "15",
        "description": "",
        "id": "64"
      },
      {
        "status_flag": "1",
        "sort": "3",
        "url": "/settings/channels",
        "checked": true,
        "buttons": [],
        "k": "Channels",
        "module_id": "15",
        "description": "",
        "id": "65"
      },
      {
        "status_flag": "1",
        "sort": "4",
        "url": "/settings/registrations",
        "checked": true,
        "buttons": [],
        "k": "Registrations",
        "module_id": "15",
        "description": "",
        "id": "66"
      },
      {
        "status_flag": "1",
        "sort": "5",
        "url": "/settings/fsusers",
        "checked": true,
        "buttons": [],
        "k": "Users",
        "module_id": "15",
        "description": "",
        "id": "67"
      },
      {
        "status_flag": "1",
        "sort": "6",
        "url": "/settings/fsagents",
        "checked": true,
        "buttons": [],
        "k": "Agents",
        "module_id": "15",
        "description": "",
        "id": "68"
      },
      {
        "status_flag": "1",
        "sort": "7",
        "url": "/settings/sofia",
        "checked": true,
        "buttons": [],
        "k": "SIP Status",
        "module_id": "15",
        "description": "",
        "id": "69"
      },
      {
        "status_flag": "1",
        "sort": "8",
        "url": "/settings/show",
        "checked": true,
        "buttons": [],
        "k": "Show",
        "module_id": "15",
        "description": "",
        "id": "70"
      },
      {
        "status_flag": "1",
        "sort": "9",
        "url": "/settings/monitor",
        "checked": true,
        "buttons": [],
        "k": "Monitor",
        "module_id": "15",
        "description": "",
        "id": "71"
      }
    ],
    "k": "Status",
    "module_id": "",
    "description": "",
    "id": "15",
    "v": "SMENUS_SYSTEM_STATUS"
  },
  {
    "level": "0",
    "leaf_flag": "1",
    "module_no": "",
    "sort": "10",
    "icon": "PhoneOutlined",
    "checked": false,
    "menus": [
      {
        "status_flag": "1",
        "sort": "1",
        "url": "/settings/auto_calls",
        "checked": false,
        "buttons": [],
        "k": "Auto Dial",
        "module_id": "1",
        "description": "",
        "id": "1"
      }
    ],
    "k": "Auto Calls",
    "module_id": "",
    "description": "",
    "id": "1",
    "v": "SMENUS_AUTO_DIAL"
  },
  {
    "level": "0",
    "leaf_flag": "1",
    "module_no": "",
    "sort": "11",
    "icon": "CallCenterOutlined",
    "checked": false,
    "menus": [
      {
        "status_flag": "1",
        "sort": "1",
        "url": "/settings/auto_answer",
        "checked": false,
        "buttons": [],
        "k": "Auto Answer",
        "module_id": "2",
        "description": "",
        "id": "5"
      },
      {
        "status_flag": "1",
        "sort": "1",
        "url": "/settings/call_forwarding",
        "checked": false,
        "buttons": [],
        "k": "Call Forwarding",
        "module_id": "2",
        "description": "",
        "id": "6"
      },
      {
        "status_flag": "1",
        "sort": "1",
        "url": "/settings/call_block",
        "checked": false,
        "buttons": [],
        "k": "Call Block",
        "module_id": "2",
        "description": "",
        "id": "2"
      },
      {
        "status_flag": "1",
        "sort": "1",
        "url": "/settings/media_scramble",
        "checked": false,
        "buttons": [],
        "k": "Media Scramble",
        "module_id": "2",
        "description": "",
        "id": "3"
      },
      {
        "status_flag": "1",
        "sort": "1",
        "url": "/settings/call_recording",
        "checked": false,
        "buttons": [],
        "k": "Call Recording",
        "module_id": "2",
        "description": "",
        "id": "4"
      }
    ],
    "k": "Call Management",
    "module_id": "",
    "description": "",
    "id": "2",
    "v": "SMENUS_CALL_MANAGEMENT"
  }
]

联系人

新增联系人

  • 请求 URL/api/contacts
  • 请求方式POST
  • Body 信息
{
  "name": "我在测试1",
  "phone": "12345678910",
  "sex": "female",
  "email": "hello@xx.com",
  "qq": "123456",
  "birth_day": "2022-01-01",
  "authority_flag": "0"
}
  • 返回值
{
  "message": "success",
  "data": "4",
  "code": 200
}

获取所有联系人

  • 请求 URL/api/contacts?page=1&perPage=500&

  • 请求方式GET

  • Body 信息:无

  • 返回值

{
  "page": 1,
  "rowCount": 4,
  "data": [
    {
      "address": "",
      "id": 1,
      "deleted_at": "",
      "phone": "1111111",
      "authority_flag": 0,
      "user_id": 1,
      "birth_day": "2022-10-25",
      "company": "",
      "description": "",
      "email": "test@gmail.com",
      "created_at": "2022-11-11 15:34:41",
      "updated_at": "2022-11-11 15:34:41",
      "qq": "111111",
      "name": "我在测试",
      "sex": "female"
    },
    {
      "address": "",
      "id": 2,
      "deleted_at": "",
      "phone": "22222222",
      "authority_flag": 0,
      "user_id": 1,
      "birth_day": "2022-02-20",
      "company": "",
      "description": "",
      "email": "2536209658@qq.com",
      "created_at": "2022-11-11 15:36:20",
      "updated_at": "2022-11-11 15:36:20",
      "qq": "11111",
      "name": "admin",
      "sex": "female"
    },
    {
      "address": "",
      "id": 3,
      "deleted_at": "",
      "phone": "33333",
      "authority_flag": 0,
      "user_id": 1,
      "birth_day": "2022-09-07",
      "company": "",
      "description": "",
      "email": "2536209658@qq.com",
      "created_at": "2022-11-11 15:36:42",
      "updated_at": "2022-11-11 15:36:42",
      "qq": "wwww",
      "name": "admin",
      "sex": "male"
    },
    {
      "address": "",
      "id": 4,
      "deleted_at": "",
      "phone": "12345678910",
      "authority_flag": 0,
      "user_id": 1,
      "birth_day": "2022-01-01",
      "company": "",
      "description": "",
      "email": "hello@xx.com",
      "created_at": "2022-11-14 16:33:39",
      "updated_at": "2022-11-14 16:33:39",
      "qq": "123456",
      "name": "我在测试1",
      "sex": "female"
    }
  ],
  "pageCount": 1
}

删除联系人

  • 请求 URL/api/contacts/:id

  • 请求方式DELETE

  • Body 信息:无

  • 返回值

{
  "data": "3",
  "message": "success",
  "code": 200
}

根据电话查询

  • 请求 URL/api/contacts?page=1&perPage=500&&searchField=phone&searchKey=123

  • 请求方式GET

  • Body 信息:无

  • 返回值

{
  "page": 1,
  "data": [
    {
      "name": "我在测试1",
      "user_id": "1",
      "sex": "female",
      "authority_flag": "0",
      "deleted_at": "",
      "qq": "123456",
      "phone": "12345678910",
      "id": "4",
      "description": "",
      "created_at": "2022-11-14 16:33:39",
      "address": "",
      "company": "",
      "birth_day": "2022-01-01",
      "email": "hello@xx.com",
      "updated_at": "2022-11-14 16:33:39"
    }
  ],
  "rowCount": 1,
  "pageCount": 1
}

根据姓名查询

  • 请求 URL/api/contacts?page=1&perPage=500&&searchField=name&searchKey=%E6%B5%8B%E8%AF%95

  • 请求方式GET

  • Body 信息:无

  • 返回值

{
  "rowCount": 2,
  "data": [
    {
      "qq": "111111",
      "deleted_at": "",
      "name": "我在测试",
      "address": "",
      "company": "",
      "updated_at": "2022-11-11 15:34:41",
      "phone": "1111111",
      "created_at": "2022-11-11 15:34:41",
      "birth_day": "2022-10-25",
      "user_id": "1",
      "authority_flag": "0",
      "email": "test@gmail.com",
      "description": "",
      "id": "1",
      "sex": "female"
    },
    {
      "qq": "123456",
      "deleted_at": "",
      "name": "我在测试1",
      "address": "",
      "company": "",
      "updated_at": "2022-11-14 16:33:39",
      "phone": "12345678910",
      "created_at": "2022-11-14 16:33:39",
      "birth_day": "2022-01-01",
      "user_id": "1",
      "authority_flag": "0",
      "email": "hello@xx.com",
      "description": "",
      "id": "4",
      "sex": "female"
    }
  ],
  "page": 1,
  "pageCount": 1
}

获取联系人详情

  • 请求 URL/api/contacts/1

  • 请求方式GET

  • Body 信息:无

  • 返回值

{
  "phone": "1111111",
  "email": "test@gmail.com",
  "user_id": 1,
  "updated_at": "2022-11-11 15:34:41",
  "name": "我在测试",
  "company": "",
  "created_at": "2022-11-11 15:34:41",
  "authority_flag": 0,
  "id": 1,
  "deleted_at": "",
  "description": "",
  "birth_day": "2022-10-25",
  "sex": "female",
  "qq": "111111",
  "address": ""
}

编辑联系人

  • 请求 URL/api/contacts/1
  • 请求方式PUT
  • Body 信息
{
  "name": "我在测试",
  "phone": "1111111",
  "sex": "female",
  "email": "test@gmail.com",
  "qq": "111111",
  "birth_day": "2022-10-25",
  "authority_flag": "1",
  "id": 1
}
  • 返回值
{
  "code": 200,
  "data": "1",
  "message": "success"
}
数据字典