概述

Voice Call 插件为 OpenClaw 提供语音通话能力,支持出站通知、多轮对话、全双工实时语音、流式转录和入站呼叫。运行在 Gateway 进程内部,需要公开可访问的 Webhook URL。

当前支持的提供商:twilio(Programmable Voice + Media Streams)、telnyx(Call Control v2)、plivo(Voice API)、mock(开发/无网络)

核心功能

  • 双音频模式:realtime(全双工实时语音,支持 Google Gemini Live 和 OpenAI)或 streaming(流式转录,支持 Deepgram/ElevenLabs/Mistral/OpenAI/xAI),两者互斥
  • 实时语音:openclaw_agent_consult 工具让实时模型在需要深度推理时调用完整 OpenClaw Agent
  • Agent 语音上下文:realtime.agentContext 在会话创建时注入 Agent 身份/系统提示/工作区文件,无 per-turn 延迟
  • 入站策略:默认 disabled,allowlist 模式按来电号码过滤(注意:这是 caller-ID 过滤,非强身份验证)
  • 按号码路由:numbers 字段为不同号码配置不同问候语、Agent、TTS 声音
  • 会话范围:per-phone(同号码保持对话记忆)或 per-call(每次通话独立上下文)
  • TTS:使用核心 messages.tts 配置,可在插件级覆盖

配置/使用

最小配置:

{
  plugins: {
    entries: {
      "voice-call": {
        enabled: true,
        config: {
          provider: "twilio",
          fromNumber: "+15550001234",
          twilio: { accountSid: "ACxx", authToken: "..." },
          publicUrl: "https://voice.example.com/voice/webhook"
        }
      }
    }
  }
}

工具策略(realtime.toolPolicy):

  • safe-read-only:仅 read/web_search/memory_search 等只读工具
  • owner:完整 Agent 工具策略
  • none:不暴露 consult 工具

CLI:openclaw voicecall call/continue/speak/dtmf/end/status/tail/latency

Agent 工具:voice_call,操作:initiate_call、continue_call、speak_to_user、send_dtmf、end_call、get_status

相关页面

  • concepts/plugin-google-meet — Google Meet 插件(使用 Voice Call 进行 Twilio 拨入)
  • concepts/tool-tts — 文本转语音
  • streaming — 流式输出机制