Skip to main content

openclaw voicecall

voicecall 是一个由插件提供的命令。它只会在语音呼叫插件已安装并启用时出现。 当 Gateway 正在运行时,操作命令(callstartcontinuespeakdtmfendstatus)会路由到该 Gateway 的语音呼叫运行时。如果找不到可访问的 Gateway,则会回退到独立的 CLI 运行时。

子命令

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发起一通外呼语音电话。
startcall 的别名,要求提供 --to--message 可选。
continue说出一条消息并等待下一次响应。
speak说出一条消息而不等待响应。
dtmf向一通活动呼叫发送 DTMF 按键。
end挂断一通活动呼叫。
status检查活动呼叫(或通过 --call-id 指定某一通)。
tail跟踪 calls.jsonl(在提供方测试期间很有用)。
latency汇总 calls.jsonl 中的轮次延迟指标。
expose切换 webhook 端点的 Tailscale serve/funnel。

设置与 smoke

setup

默认打印人类可读的就绪检查结果。脚本可使用 --json
openclaw voicecall setup
openclaw voicecall setup --json

smoke

运行相同的就绪检查。除非同时提供 --to--yes,否则不会拨打真实电话。
FlagDefaultDescription
-t, --to <phone>(none)用于真实 smoke 测试的电话号码。
--message <text>OpenClaw voice call smoke test.smoke 呼叫期间要播报的消息。
--mode <mode>notify呼叫模式:notifyconversation
--yesfalse实际发起真实外呼。
--jsonfalse输出机器可读的 JSON。
openclaw voicecall smoke
openclaw voicecall smoke --to "+15555550123"        # 干运行
openclaw voicecall smoke --to "+15555550123" --yes  # 真实 notify 呼叫
对于外部提供方(twiliotelnyxplivo),setupsmoke 需要来自 publicUrl、隧道或 Tailscale 暴露的公共 webhook URL。由于运营商无法访问回环地址或私有的 serve 回退,因此会被拒绝。

呼叫生命周期

call

发起一通外呼语音电话。
FlagRequiredDefaultDescription
-m, --message <text>yes(none)电话接通时要播报的消息。
-t, --to <phone>noconfig toNumber要拨打的 E.164 电话号码。
--mode <mode>noconversation呼叫模式:notify(播报后挂断)或 conversation(保持接通)。
openclaw voicecall call --to "+15555550123" --message "Hello"
openclaw voicecall call -m "Heads up" --mode notify

start

call 的别名,默认参数形式不同。
FlagRequiredDefaultDescription
--to <phone>yes(none)要拨打的电话号码。
--message <text>no(none)电话接通时要播报的消息。
--mode <mode>noconversation呼叫模式:notifyconversation

continue

说出一条消息并等待响应。
FlagRequiredDescription
--call-id <id>yes呼叫 ID。
--message <text>yes要播报的消息。

speak

说出一条消息而不等待响应。
FlagRequiredDescription
--call-id <id>yes呼叫 ID。
--message <text>yes要播报的消息。

dtmf

向一通活动呼叫发送 DTMF 按键。
FlagRequiredDescription
--call-id <id>yes呼叫 ID。
--digits <digits>yesDTMF 按键(例如用于等待的 ww123456#)。

end

挂断一通活动呼叫。
FlagRequiredDescription
--call-id <id>yes呼叫 ID。

status

检查活动呼叫。
FlagDefaultDescription
--call-id <id>(none)限制输出为单个呼叫。
--jsonfalse输出机器可读的 JSON。
openclaw voicecall status
openclaw voicecall status --json
openclaw voicecall status --call-id <id>

日志与指标

tail

跟踪语音呼叫 JSONL 日志。启动时先打印 --since 指定的最后若干行,然后在写入新行时继续流式输出。
FlagDefaultDescription
--file <path>resolved from plugin storecalls.jsonl 的路径。
--since <n>25开始跟踪前打印的行数。
--poll <ms>250 (minimum 50)轮询间隔,单位为毫秒。

latency

汇总 calls.jsonl 中的轮次延迟和等待收听指标。输出为 JSON,包含 recordsScannedturnLatencylistenWait 的汇总。
FlagDefaultDescription
--file <path>resolved from plugin storecalls.jsonl 的路径。
--last <n>200 (minimum 1)要分析的最近记录数量。

暴露 webhooks

expose

启用、禁用或更改语音 webhook 的 Tailscale serve/funnel 配置。
FlagDefaultDescription
--mode <mode>funneloffserve(tailnet)或 funnel(公共)。
--path <path>config tailscale.path or --serve-path要暴露的 Tailscale 路径。
--port <port>config serve.port or 3334本地 webhook 端口。
--serve-path <path>config serve.path or /voice/webhook本地 webhook 路径。
openclaw voicecall expose --mode serve
openclaw voicecall expose --mode funnel
openclaw voicecall expose --mode off
只应将 webhook 端点暴露给你信任的网络。尽可能优先使用 Tailscale Serve,而不是 Funnel。

相关