dSIPRouter API 管理:SIP 代理控制 - Openclaw Skills
作者:互联网
2026-04-14
什么是 dSIPRouter API 管理?
此技能提供了一个与 dSIPRouter REST API 交互的全面界面,是管理 SIP 代理和 Kamailio 节点的必备工具。通过使用专门的辅助 CLI,它将复杂的原始 HTTP 请求抽象为易于管理的 VoIP 基础设施子命令。将其集成到 Openclaw Skills 生态系统中,开发人员可以自动配置端点组、运营商映射以及实时 SIP 统计数据的检索。
下载入口:https://github.com/openclaw/skills/tree/main/skills/mackhendricks/dsiprouter-skill
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install dsiprouter-skill
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 dsiprouter-skill。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
dSIPRouter API 管理 应用场景
- 自动化 SIP 端点组的创建和删除。
- 更新路由配置后触发 Kamailio 服务重载。
- 获取并分析通话详细记录 (CDR) 以进行计费或故障排除。
- 管理入站 DID 映射和运营商组分配。
- 监控实时 SIP 代理性能和通话统计数据。
- 技能通过从环境中读取 dSIPRouter 主机地址和 API 持票者令牌进行初始化。
- 它利用捆绑的 shell 脚本 dsiprouter.sh,该脚本充当本地化 curl 命令的包装器。
- 使用安全调用约定,确保所有 API 交互都包含正确的标头、超时和错误处理。
- 当发出命令时,该技能会将请求的操作映射到相应的 dSIPRouter REST 端点。
- 使用 jq 处理原始 JSON 响应,为用户或代理提供干净、可操作的数据。
dSIPRouter API 管理 配置指南
要在 Openclaw Skills 框架中使用此 dSIPRouter 集成,请配置环境变量并确保满足依赖项:
# 安装所需依赖项
# 确保系统中已安装 curl 和 jq
# 配置连接详细信息
export DSIP_ADDR="your.dsiprouter.ip"
export DSIP_TOKEN="your_api_bearer_token"
# 可选:允许自签名证书
export DSIP_INSECURE=1
# 测试辅助脚本
./bin/dsiprouter.sh help
dSIPRouter API 管理 数据架构与分类体系
该技能通过 dSIPRouter API 与多个主要数据模型进行交互。下表重点介绍了关键数据实体:
| 资源 | 属性 | 描述 |
|---|---|---|
| 端点组 | ID, 名称, 服务器 | SIP 端点集群的配置。 |
| 入站映射 | DID, 服务器, 名称 | 呼入号码到特定服务器的映射。 |
| Kamailio 统计 | 运行时间, 活动通话 | 代理的实时性能指标。 |
| CDR | 端点, 类型, 过滤器 | 用于流量分析的通话详细记录。 |
| 认证 | 用户, 密码, ID | API 和系统用户凭据的管理。 |
name: dsiprouter
description: Call the dSIPRouter REST API using the Postman collection (curl + jq).
metadata: {"openclaw":{"emoji":"??","requires":{"bins":["curl","jq"],"env":["DSIP_ADDR","DSIP_TOKEN"]}}}
dSIPRouter API skill
This skill is generated from the Postman collection and provides:
- a safe
curlcalling convention - a
bin/dsiprouter.shhelper CLI with subcommands for the collection’s requests - example payloads (where present in Postman)
Required environment
DSIP_ADDR— hostname/IP of your dSIPRouter node (no scheme)DSIP_TOKEN— API bearer token- Optional:
DSIP_INSECURE=1to allow self-signed TLS (adds-k)
Base URL:
https://$DSIP_ADDR:5000/api/v1
Auth header:
Authorization: Bearer $DSIP_TOKEN
Safe calling convention
dsip_api() {
local method="$1"; shift
local path="$1"; shift
local insecure=()
if [ "${DSIP_INSECURE:-}" = "1" ]; then insecure=(-k); fi
curl "${insecure[@]}" --silent --show-error --fail-with-body r
--connect-timeout 5 --max-time 30 r
-H "Authorization: Bearer ${DSIP_TOKEN}" r
-H "Content-Type: application/json" r
-X "${method}" "https://${DSIP_ADDR}:5000${path}" r
"$@"
}
Preferred usage: the bundled helper CLI
# list subcommands
dsiprouter.sh help
# list endpoint groups
dsiprouter.sh endpointgroups:list | jq .
# create inbound mapping with your own JSON payload
dsiprouter.sh inboundmapping:create '{"did":"13132222223","servers":["#22"],"name":"Taste Pizzabar"}' | jq .
# or send the Postman sample body
dsiprouter.sh inboundmapping:create --sample | jq .
Kamailio
dsiprouter.sh kamailio:stats | jq .
dsiprouter.sh kamailio:reload | jq .
Endpoint catalog (from Postman)
endpointgroups
endpointgroups:list→ GET/api/v1/endpointgroupsendpointgroups:get→ GET/api/v1/endpointgroups/9— Get a single endpointgroupendpointgroups:create→ POST/api/v1/endpointgroups— Create an endpointgroupendpointgroups:create_1→ POST/api/v1/endpointgroups— Create an endpointgroupendpointgroups:create_2→ POST/api/v1/endpointgroups— Create an endpointgroupendpointgroups:create_3→ POST/api/v1/endpointgroups— Create an endpointgroupendpointgroups:delete→ DELETE/api/v1/endpointgroups/53— Delete endpointgroupendpointgroups:update→ PUT/api/v1/endpointgroups/34— Update an endpointgroup
kamailio
kamailio:reload→ POST/api/v1/reload/kamailio— Trigger a reload of Kamailio. This is needed after changes are madekamailio:list→ GET/api/v1/kamailio/stats— Obtain call statistics
inboundmapping
inboundmapping:list→ GET/api/v1/inboundmapping— Get a list of inboundmappingsinboundmapping:create→ POST/api/v1/inboundmapping— Create new inboundmappinginboundmapping:update→ PUT/api/v1/inboundmapping?did=13132222223— Create new inboundmappinginboundmapping:delete→ DELETE/api/v1/inboundmapping?did=13132222223— Create new inboundmapping
leases
leases:list→ GET/api/v1/lease/endpoint?email=mack@goflyball.com&ttl=5m— Get a single endpointgroupleases:list_1→ GET/api/v1/lease/endpoint?email=mack@goflyball.com&ttl=1m&type=ip&auth_ip=172.145.24.2— Get a single endpointgroupleases:revoke→ DELETE/api/v1/lease/endpoint/34/revoke— Get a single endpointgroup
carriergroups
carriergroups:list→ GET/api/v1/carriergroupscarriergroups:create→ POST/api/v1/carriergroups
auth
auth:create→ POST/api/v1/auth/userauth:update→ PUT/api/v1/auth/user/2auth:delete→ DELETE/api/v1/auth/user/2auth:list→ GET/api/v1/auth/userauth:login→ POST/api/v1/auth/login
cdr
cdr:get→ GET/api/v1/cdrs/endpointgroups/17?type=csv&dtfilter=2022-09-14&email=Truecdr:get_1→ GET/api/v1/cdrs/endpoint/54
Included files
bin/dsiprouter.sh
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
HealthClaw 牙科:AI 驱动的牙科诊所管理 - Openclaw Skills
ERPClaw 销售:AI 订单到现金全生命周期管理 - Openclaw Skills
ERPClaw 欧盟区域合规:增值税、OSS 和电子发票 - Openclaw Skills
ERPClaw 人事:AI 人力资源与美国薪酬管理 - Openclaw Skills
erpclaw-journals:安全且AI原生的簿记系统 - Openclaw Skills
ERPClaw Growth:AI CRM 与业务分析 - Openclaw Skills
ERPClaw Billing:基于用量与计量的计费 - Openclaw Skills
educlaw: AI 原生教育与 SIS 管理 - Openclaw Skills
EduClaw K-12 扩展组件:学生管理与合规 - Openclaw Skills
AuditClaw AWS:自动化 AWS 合规证据收集 - Openclaw Skills
AI精选
