CLI 命令

语音通话

openclaw voicecall

voicecall 是由插件提供的命令。仅当语音通话插件已安装并启用时,此命令才会出现。

当 Gateway 网关运行时,操作命令(callstartcontinuespeakdtmfendstatus)会路由到该 Gateway 网关的语音通话运行时。如果无法连接到任何 Gateway 网关,则会回退到独立的 CLI 运行时。

子命令

bash
openclaw voicecall setup    [--json]openclaw voicecall smoke    [-t <phone>] [--message <text>] [--mode <m>] [--yes] [--json]openclaw voicecall call     -m <text> [-t <phone>] [--mode <m>]openclaw voicecall start    --to <phone> [--message <text>] [--mode <m>]openclaw voicecall continue --call-id <id> --message <text>openclaw voicecall speak    --call-id <id> --message <text>openclaw voicecall dtmf     --call-id <id> --digits <digits>openclaw voicecall end      --call-id <id>openclaw voicecall status   [--call-id <id>] [--json]openclaw voicecall tail     [--file <path>] [--since <n>] [--poll <ms>]openclaw voicecall latency  [--file <path>] [--last <n>]openclaw voicecall expose   [--mode <m>] [--path <p>] [--port <port>] [--serve-path <p>]
子命令 说明
setup 显示提供商和 webhook 就绪检查。
smoke 运行就绪检查;仅在使用 --yes 时拨打实时测试电话。
call 发起出站语音通话。
start call 的别名,要求提供 --to--message 可选。
continue 播放一条消息并等待下一次响应。
speak 播放一条消息,不等待响应。
dtmf 向正在进行的通话发送 DTMF 数字。
end 挂断正在进行的通话。
status 检查正在进行的通话(或通过 --call-id 检查一通电话)。
tail 持续查看 calls.jsonl(在提供商测试期间很有用)。
latency 汇总 calls.jsonl 中的轮次延迟指标。
expose 为 webhook 端点切换 Tailscale Serve/Funnel。

设置和冒烟测试

setup

默认输出易于阅读的就绪检查结果。脚本中请传入 --json

bash
openclaw voicecall setupopenclaw voicecall setup --json

smoke

运行相同的就绪检查。仅当同时提供 --to--yes 时,才会实际拨打电话。

标志 默认值 说明
-t, --to <phone> (无) 实时冒烟测试要拨打的电话号码。
--message <text> OpenClaw voice call smoke test. 冒烟测试通话期间要播放的消息。
--mode <mode> notify 通话模式:notifyconversation
--yes false 实际拨打实时出站电话。
--json false 输出机器可读的 JSON。
bash
openclaw voicecall smokeopenclaw voicecall smoke --to "+15555550123"        # 试运行openclaw voicecall smoke --to "+15555550123" --yes  # 实时通知通话

通话生命周期

call

发起出站语音通话。

标志 必需 默认值 说明
-m, --message <text> (无) 通话接通时要播放的消息。
-t, --to <phone> 配置中的 toNumber 要拨打的 E.164 电话号码。
--mode <mode> conversation 通话模式:notify(播放消息后挂断)或 conversation(保持通话)。
bash
openclaw voicecall call --to "+15555550123" --message "Hello"openclaw voicecall call -m "Heads up" --mode notify

start

call 的别名,使用不同的默认标志形式。

标志 必需 默认值 说明
--to <phone> (无) 要拨打的电话号码。
--message <text> (无) 通话接通时要播放的消息。
--mode <mode> conversation 通话模式:notifyconversation

continue

播放一条消息并等待响应。

标志 必需 说明
--call-id <id> 通话 ID。
--message <text> 要播放的消息。

speak

播放一条消息,不等待响应。

标志 必需 说明
--call-id <id> 通话 ID。
--message <text> 要播放的消息。

dtmf

向正在进行的通话发送 DTMF 数字。

标志 必需 说明
--call-id <id> 通话 ID。
--digits <digits> DTMF 数字(例如使用 ww123456# 表示等待)。

end

挂断正在进行的通话。

标志 必需 说明
--call-id <id> 通话 ID。

status

检查正在进行的通话。

标志 默认值 说明
--call-id <id> (无) 将输出限制为一通电话。
--json false 输出机器可读的 JSON。
bash
openclaw voicecall statusopenclaw voicecall status --jsonopenclaw voicecall status --call-id <id>

日志和指标

tail

持续查看语音通话 JSONL 日志。启动时输出最后 --since 行,然后在写入新行时持续输出。

标志 默认值 说明
--file <path> 从插件存储中解析 calls.jsonl 的路径。
--since <n> 25 开始持续查看前要输出的行数。
--poll <ms> 250(最小值为 50) 轮询间隔,单位为毫秒。

latency

汇总 calls.jsonl 中的轮次延迟和监听等待指标。输出为 JSON,其中包含 recordsScannedturnLatencylistenWait 的汇总信息。

标志 默认值 说明
--file <path> 从插件存储中解析 calls.jsonl 的路径。
--last <n> 200(最小值为 1) 要分析的近期记录数量。

暴露 webhook

expose

启用、禁用或更改语音 webhook 的 Tailscale Serve/Funnel 配置。

标志 默认值 说明
--mode <mode> funnel offserve(tailnet)或 funnel(公开)。
--path <path> 配置中的 tailscale.path--serve-path 要暴露的 Tailscale 路径。
--port <port> 配置中的 serve.port3334 本地 webhook 端口。
--serve-path <path> 配置中的 serve.path/voice/webhook 本地 webhook 路径。
bash
openclaw voicecall expose --mode serveopenclaw voicecall expose --mode funnelopenclaw voicecall expose --mode off

相关内容

Was this useful?
On this page

On this page