-
Notifications
You must be signed in to change notification settings - Fork 6
wa calling enable
GiuFLim edited this page Sep 25, 2025
·
15 revisions
使用此接口启用商户号码的calling能力。
- URL:
https://api2.nxcloud.com/api/wa/calling/enable
- Method:
POST
- Content-Type:
application/json
- 需要鉴权:
是
鉴权规则请参考地址:API接口调用约定
参数名 | 类型 | 必选 | 示例值 | 说明 |
---|---|---|---|---|
accessKey | String | 是 | fme2na3kdi3ki | 用户身份标识 |
ts | String | 是 | 1655710885431 | 当前请求的时间戳(单位是毫秒),牛信服务端允许用户端请求最大时间误差为60秒 |
bizType | String | 是 | 2 | WhatsApp业务类型,取固定值"2" |
action | String | 是 | mt | WhatsApp业务操作,取固定值"mt" |
sign | String | 是 | 6e9506557d1f289501d333ee2c365826 | API入参参数签名,签名算法 |
参数名 | 类型 | 必选 | 示例值 | 说明 |
---|---|---|---|---|
appkey | String | 是 | pem28kje | 应用appkey |
business_phone | String | 是 | 86133xxx | 商户的WhatsApp号码,需要带国码。如86158xxxx1795 |
region | String | 是 | SG | 语音服务器的国家/地区 sip region |
icon_status | Integer | 是 | 1 | 是否显示通话图标 1=显示 0=隐藏 |
permission_status | Integer | 是 | 1 | 是否提示呼叫权限请求 1启用, 0禁用 |
recording_status | Integer | 是 | 0 | 是否启用录音 1启用, 0禁用 |
hours_status | Integer | 是 | 0 | 是否定制业务时间 1启用 0禁用 |
hours_customize | Object | 否 | 定制业务时间 hours_status=1的情况下 必须有值,结构如下 | |
customer_sip_addr | Array[Object] | 是 | [{"host":"34.56.78.90","port":8080,"type":1}] | 客户SIP servers信息 |
参数名 | 类型 | 必选 | 示例值 | 说明 |
---|---|---|---|---|
host | String | 是 | 4.4.4.4 | 服务器ip地址/域名地址【目前只支持ip地址】 |
port | Integer | 否 | 8080 | ip地址时必须指明端口 |
type | Integer | 是 | 1 | 1=呼入&呼出 2=呼入 3=呼出 |
定制业务时间 hours_status=1的情况下 必须有值,结构如下
参数名 | 类型 | 必选 | 示例值 | 说明 |
---|---|---|---|---|
status | String | 是 | ENABLED | 固定值 ENABLED(启用) DISABLED(禁用) |
timezone_id | String | 是 | Etc/GMT-8 | meta文档中支持的时区 |
weekly_operating_hours | Array[Object] | 是 | [{"day_of_week":"MONDAY","open_time":"0400","close_time":"1020"}] | 自定义周一至周日可接听时间段 |
holiday_schedule | Array[Object] | 否 | 自定义假期不可接听时间段 |
自定义周一至周日可接听时间段
- Maximum of 2 entries allowed per day of week
-
open_time
must be beforeclose_time
- Overlapping entries not allowed
参数名 | 类型 | 必选 | 示例值 | 说明 |
---|---|---|---|---|
day_of_week | String | 是 | MONDAY | The day of the week. Can take one of seven values: "MONDAY" , "TUESDAY" , "WEDNESDAY" , "THURSDAY" , "FRIDAY" , "SATURDAY" , "SUNDAY"
|
open_time | String | 是 | 0400 | Times represented in 24 hour format, e.g. "1130" = 11:30AM |
close_time | String | 是 | 1020 | Times represented in 24 hour format, e.g. "1130" = 11:30AM |
自定义假期不可接听时间段
An optional override to the weekly schedule.
Up to 20 overrides can be specified.
Note: If holiday_schedule
is not passed in the request, then the existing holiday_schedule
will be deleted and replaced with an empty schedule.
参数名 | 类型 | 必选 | 示例值 | 说明 |
---|---|---|---|---|
date | String | 是 | 2025-02-10 | Date for which you want to specify the override.YYYY-MM-DD format. |
start_time | String | 是 | 0400 | Times represented in 24 hour format, e.g. "1130" = 11:30AM |
end_time | String | 是 | 1020 | Times represented in 24 hour format, e.g. "1130" = 11:30AM |
{
"appkey": "xxx",
"business_phone": "xxx",
"region": "SG",
"icon_status": 1,
"hours_status": 0,
"permission_status": 0,
"recording_status": 1,
"customer_sip_addr": [
{
"host": "34.56.78.90",
"port": 8080,
"type": 1
},
{
"host": "4.4.4.4",
"port": 3390,
"type": 2
}
]
}
{
"appkey": "XXX",
"business_phone": "XXX",
"region":"SG",
"icon_status": 1,
"hours_status": 1,
"hours_customize": {
"status": "ENABLED",
"timezone_id": "Etc/GMT-8",
"weekly_operating_hours": [
{
"day_of_week": "MONDAY",
"open_time": "0400",
"close_time": "1020"
},
{
"day_of_week": "TUESDAY",
"open_time": "0108",
"close_time": "1020"
},
{
"day_of_week": "THURSDAY",
"open_time": "0108",
"close_time": "1020"
}
],
"holiday_schedule": [
{
"date": "2025-10-01",
"start_time": "0000",
"end_time": "0259"
},
{
"date": "2025-10-02",
"start_time": "0400",
"end_time": "0559"
},
{
"date": "2025-10-03",
"start_time": "0800",
"end_time": "1759"
},
{
"date": "2025-10-04",
"start_time": "2000",
"end_time": "2359"
}
]
},
"permission_status": 1,
"recording_status": 1,
"customer_sip_addr": [
{
"host": "34.56.78.90",
"port": 8080,
"type": 1
},
{
"host": "4.4.4.4",
"port": 3390,
"type": 2
}
]
}
参数名 | 类型 | 示例值 | 说明 |
---|---|---|---|
code | String | 0 | |
message | String | Success | |
data | Object |
参数名 | 类型 | 示例值 | 说明 |
---|---|---|---|
nx_sip_addr | Array[Object] | nx sip对接信息 |
参数名 | 类型 | 示例值 | 说明 |
---|---|---|---|
ip_list | Array[String] | ["34.92.169.217:6030","34.92.169.218:6030"] | IP地址列表 |
fqdn | Array[String] | ["ivp-cli-cluster.nxcloud.com"] | FQDN列表 |
region | String | SG | 语音站点 |
{
"code": 0,
"message": "Success",
"data": {
"nx_sip_addr": [
{
"region": "SG",
"fqdn": [
"cli-ivp-cluster.nxcloud.com"
],
"ip_list": [
"34.92.169.217:6030",
"35.198.204.114:6030"
]
}
],
"business_phone": "xxx"
},
"traceId": "a0b14631a417400fa2895547d3474779"
}
{
"code": 10015,
"message": "permission_status not in (0, 1)",
"traceId": "33904fce3e5744e8bc842906967c202b"
}
{
"code": 10012,
"message": "Wa calling setting fail (#10) Business initiated calls are not supported for the phone number country. Disable callback permission status if you want to enable only user initiated calls",
"traceId": "2527e891748e4ff694e700a4aed6f2fe"
}
code | message | 含义/解决办法 |
---|---|---|
0 | Success | |
-1 | Failure | 请联系技术人员排除问题 |
1000~100X | Authentication failed | 详情查看API鉴权部分 |
1100 | Customer does not exist / Status is unavailable | 账号状态异常,联系业务人员处理账号问题 |
1102 | Insufficient balance | 账号余额不足,请联系业务人员充值 |
9000 | Request parameter error | 参数缺失,请检查必须的参数 |
9001 | System business error | 系统业务错误,请联系技术人员排除问题 |
9002 | Phone number error | 非法号码,请检查号码正确性 |
9003 | Customer APP does not exist / Status is unavailable | 应用状态异常(不存在/禁用),联系业务人员处理云平台应用创建/禁用问题 |
10003 | WhatsApp business phone is not bind app | 该whatsapp号码未绑定应用,请联系业务人员处理应用和手机号绑定操作 |
10009 | Calling line setting not exist | calling线路配置出现异常 |
10010 | Business phone no calling quotation | 商户号未配置calling报价 |
10011 | Get business phone sip password fail | 获取商户号sip信息异常 |
10012 | Calling setting fail {0} | Calling配置出现异常 |
10013 | Calling setting not exist | Calling配置不存在 |
10015 | {0} not in (0, 1) | 参数不正确 |
10016 | {0} has error | 参数不合法 |
简介
短信
语音
- 上传语音录音文件
- 上传语音录音文件_v1
- 已上传录音文件查询
- 发送语音群呼
- 发送语音通知
- 发送语音验证码
- 语音验证码回填上报
- 语音回执回调
- 语音记录查询
- 上传语音录音文件-旧版本已废弃
- 发送语音群呼‐旧版已废弃
- 发送语音通知‐旧版已废弃
- 发送语音验证码‐旧版已废弃
- 语音回执回调‐旧版已废弃
云呼叫中心(NXLink)
- Web SDK
- Iframe集成
- 手动拨号通话记录查询
- 通过orderId查询
- 手动拨号记录回调
- 坐席信息查询
- 坐席状态查询
- 坐席状态信息查询
- 坐席组查询
- 坐席可用主叫查询
- 坐席组成员查询
- 坐席组更新成员
- 坐席效率统计
- 创建AICC外呼任务
- Webhook-手动外呼
云呼叫中心(AI自动外呼)
- Callbot API概述
- Callbot API鉴权
- Callbot 接口探活
- 创建自动拨号任务
- 批量添加拨打名单
- 创建自动拨号任务并添加拨打名单
- 任务控制(启动/暂停)
- 更新任务
- 获取通话列表
- 获取任务列表
- 获取拨打订单列表
- 停止订单拨打
- 查询订单维度拨打详情
- 通话维度回调
- 订单维度拨打回调
- 任务状态回调
- 批次-导出最新批次数据
- 批次-导入最新批次数据
Flash Call
短链
邮件验证码
DID号码
- DID号码进行短信下行V2
- DID短信结果回调(加签)
- DID短信结果回调(无加签)
- DID号码短信记录查询(新接口,未启用)
- DID号码通话记录查询
- DID呼出并转接到Amazon坐席
- DID呼出前与Connect号码绑定
通用
号码检测
- 发送消息
- 发送otp消息
- webhook
- 标记入站消息已读
- 上传媒体文件
- 获取媒体文件
- 删除媒体文件
- 查询号码信息
- 查询消息模板
- 创建消息模板
- 异步创建消息模板
- 编辑消息模板
- 删除消息模板
- 上传模板示例文件
- 嵌入式页面登录
- 创建客户应用
- 客户应用的号码列表
- 获取验证码
- 核验验证码
- flows-创建流
- flows-更新流
- flows-根据流ID查询流信息
- flows-根据whatsapp号码查询流列表
- flows-根据流ID查询流预览地址
- flows-查询流JSON
- flows-发布流
- flows-删除流草稿
- flows-废弃已发布的流
- flows-更新流JSON
- flows-上传业务公钥
- ads-根据公共主页ID查询绑定的数据集列表
- ads-根据数据集ID上报CAPI广告数据
- 封锁用户
- 业务主页
- 查询消息记录
- 查询calling配置
- 查询calling通话记录
- 禁用calling配置
- 启用calling配置
Viber
Zalo ZNS
Super Message API
隐私号(旧)
PNS
坐席(旧版)
- NXphone PC 使用说明
- NXphone Android 使用说明
- NXphone Android SDK 接入文档
- 呼叫挂断原因解释
- 话单CDR查询接口
- 话单CDR回调接口说明(V1.0)
- 坐席API调用接口说明(V1.0)
- 根据orderid查询话单CDR接口
- 坐席系统sip链接调用方式(推荐)
- 号码脱敏处理
- 修改话机密码接口
- 查询审批单
- 查询话机
- WebRTC SDK使用说明
AI Agent