所有api接口都需要鉴权规则,具体详情前往新平台鉴权规则查看

目录

号码池管理

获取号码池

接口说明

提供查询账户下SIP,外显号,服务号列表的接口,不需要传递参数,直接返回三种号码的列表

请求示例

curl --location --request POST 'http://v7openapi.7moor.com/openapi/v1/call/query/number' \
--header 'm7-appkey: 2000103' \
--header 'm7-nonce: 909455' \
--header 'm7-sign: Bxg/hPidTlWcK9JGHJiI6YCkOVQ0GEQSqx4FhI0Yfrw=' \
--header 'm7-timestamp: 1608719083769' \
--header 'content-type: application/json' \
--data-raw ''

返回结果

displayNumberList: 外显号

serviceNumberList: 服务号

字段名称 字段类型 字段描述
_id string 号码
number string 号码
callAbility string 1,3(服务号) 2(外显号) 3(服务号/外显号)
line string 线路编号
account string 账户编号
status string 号码状态 enable(启用)/disable(停用)
resourceType string 号码来源 trunkNumber(固话)/xNumber(小号)
concurrency string concurrency 并发数
createTime string 创建时间
updateTime string 更新时间
createUser strinig 创建人
updateUser string 更新人
ivrId string 号码所绑定的语音导航id 默认为空字符串
group object[] 号码所属分组 _id(分组id),name(分组名称)

sipNumberList: SIP号列表

字段名称 字段类型 字段描述
_id string 主键
busyReplayCode string sip忙时响应状态码 默认486
clientUrl string sip用户端注册地址
serverUrl string sip服务器注册地址
status number 是否启用 0(未启用)/1(已启用)
isDel number 是否删除 0(未删除)/1(已删除)
registerDevice string 注册设备
registerTime string 注册时间
uid string 应用座席
registerStatus number 注册状态 0(未注册/1(已注册))
codingFormat string[] 语音编码
number string SIP号码
password string SIP号密码
isNAT string 是否NAT
account string 账户编号
createTime string 创建时间
updateTime string 更新时间
createUser strinig 创建人
updateUser string 更新人
isWebRtc string 是否webrtc号码

返回示例

{
    "success": true,
    "code": "200",
    "message": "requestSuccess",
    "data": {
        "displayNumberList": [
            {
                "_id": "9813",
                "__v": 0,
                "number": "9813",
                "callAbility": 3,
                "line": "R00002",
                "account": "2000113",
                "status": "enable",
                "resourceType": "trunkNumber",
                "concurrency": 1,
                "createTime": "2020-12-08 16:48:26",
                "updateTime": "2020-12-25 20:06:54",
                "createUser": "system",
                "updateUser": "5fce1a69eabace555a6fe899",
                "ivrId": "5fc9d5419740472c53b6099e",
                "name": "111",
                "group": [
                    {
                        "_id": "5fe5d170c5d23f6117477723",
                        "name": "555"
                    },
                    {
                        "_id": "5fe5cecac5d23f6117477722",
                        "name": "888"
                    }
                ]
            }
        ],
        "serviceNumberList": [
            {
                "_id": "9804",
                "__v": 0,
                "number": "9804",
                "callAbility": 3,
                "line": "R00002",
                "account": "2000063",
                "status": "enable",
                "resourceType": "trunkNumber",
                "concurrency": 2,
                "createTime": "2020-12-14 15:48:24",
                "updateTime": "2020-12-14 15:48:24",
                "createUser": "system",
                "updateUser": "system",
                "ivrId": ""
            }
        ],
        "sipNumberList": [
            {
                "_id": "5fbf752eb7d53e5edee01af0",
                "busyReplayCode": "486",
                "clientUrl": "127.0.0.1:9998",
                "serverUrl": "127.0.0.1:9999",
                "status": 1,
                "isDel": 0,
                "registerDevice": "apple ar",
                "registerTime": "2020-10-29 16:24:06",
                "uid": "5fbf752eb7d53e5edee01aeb",
                "registerStatus": 1,
                "codingFormat": [
                    "G711A",
                    "G711U"
                ],
                "number": "2000",
                "password": "123456Aa",
                "isNAT": false,
                "account": "2000063",
                "createTime": "2020-11-26 17:28:14",
                "updateTime": "2020-12-21 15:58:23",
                "createUser": "system",
                "updateUser": "5fbf752eb7d53e5edee01ae9",
                "__v": 0,
                "isWebRtc": false
            }
        ]
    },
    "requestInfo": {
        "requestId": "bd0c1440451411eb947e47d186ad6c8e",
        "url": "/openapi/v1/call/query/number",
        "proxyUrl": "http://localhost:6100/call/openapi/v1/call/query/number",
        "body": {},
        "headers": {
            "m7-appkey": "2000063",
            "m7-nonce": "333333",
            "m7-sign": "Bxg/hPidTlWcK9JGHJiI6YCkOVQ0GEQSqx4FhI0Yfrw=",
            "m7-timestamp": "1606826517228",
            "content-type": "application/json",
            "user-agent": "PostmanRuntime/7.26.8",
            "accept": "*/*",
            "cache-control": "no-cache",
            "postman-token": "c2a00ff2-c296-4ed0-9569-d2cf8e7e4fc9",
            "host": "152.136.72.209:5100",
            "accept-encoding": "gzip, deflate, br",
            "connection": "keep-alive",
            "content-length": "0",
            "traceId": "bd0c1440451411eb947e47d186ad6c8e",
            "accountId": "2000063"
        },
        "span": {
            "requestStartTime": 1608724093828,
            "proxyStartTime": 1608724093832,
            "proxyEndTime": 1608724093893,
            "reqEndTime": 1608724093894,
            "bizSpan": "61ms",
            "latency": "5ms"
        }
    }
}

外显号组

查询外显号组

接口说明

查询账户下外显号分组 在外呼时指定外显号分组id 使用组策略

请求示例

curl --location --request POST 'http://v7openapi.7moor.com/openapi/v1/call/query/group' \
--header 'm7-appkey: 2000103' \
--header 'm7-nonce: 909455' \
--header 'm7-sign: Bxg/hPidTlWcK9JGHJiI6YCkOVQ0GEQSqx4FhI0Yfrw=' \
--header 'm7-timestamp: 1608719083769' \
--header 'content-type: application/json' \

返回结果

字段名称 字段类型 字段描述
_id string 主键 分组id
name string 分组名称

返回示例

{
    "success": true,
    "code": "200",
    "message": "requestSuccess",
    "data": [
        {
            "_id": "5ff7c305ba185200117836f8",
            "name": "客服号码组"
        }
    ],
    "requestInfo": {
        "requestId": "4631c73053dc11eb9c8c232e928ae9fe",
        "url": "/openapi/v1/call/query/group",
        "proxyUrl": "http://v7openapi.7moor.com/openapi/v1/call/query/group",
        "body": {},
        "headers": {
            "host": "http://v7openapi.7moor.com",
            "x-request-id": "d7dca47d06227fb917fe701d44641349",
            "x-real-ip": "111.202.78.82",
            "x-forwarded-for": "111.202.78.82",
            "x-forwarded-proto": "http",
            "x-forwarded-host": "http://v7openapi.7moor.com",
            "x-forwarded-port": "80",
            "x-scheme": "http",
            "x-original-forwarded-for": "111.202.78.82",
            "content-length": "0",
            "x-stgw-time": "1610349110.050",
            "x-client-proto": "https",
            "x-client-proto-ver": "HTTP/1.1",
            "m7-appkey": "2100029",
            "m7-nonce": "333333",
            "m7-sign": "Bxg/hPidTlWcK9JGHJiI6YCkOVQ0GEQSqx4FhI0Yfrw=",
            "m7-timestamp": "1610349047",
            "content-type": "application/json",
            "user-agent": "PostmanRuntime/7.26.8",
            "accept": "*/*",
            "cache-control": "no-cache",
            "postman-token": "f1d24fb7-dc9e-40e8-a685-78867e630a70",
            "accept-encoding": "gzip, deflate, br",
            "traceId": "4631c73053dc11eb9c8c232e928ae9fe",
            "accountId": "2100029"
        },
        "span": {
            "requestStartTime": 1610349110052,
            "proxyStartTime": 1610349110056,
            "proxyEndTime": 1610349110077,
            "reqEndTime": 1610349110078,
            "bizSpan": "21ms",
            "latency": "5ms"
        }
    }
}

接口限流说明

为防止接口调用请求过频带来的风险,接口请求具有限流机制 账户限流:20次/分