CLI 命令

语音通话

openclaw voicecall

voicecall 是由插件提供的命令。它仅在 voice-call 插件已安装并启用时出现。

当 Gateway 网关正在运行时,操作命令(callstartcontinuespeakdtmfendstatus)会路由到该 Gateway 网关的 voice-call 运行时。如果无法连接到 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"        # dry runopenclaw voicecall smoke --to "+15555550123" --yes  # live notify call

通话生命周期

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?