#Cant make voicecall works (openai straming + twilio)

1 messages · Page 1 of 1 (latest)

worldly forum
#

I configured Twilio + OpenAI streaming. It's ringing, there's a silence after answering, and then, after a few seconds, it hangs up.

"voice-call": {
        "enabled": true,
        "config": {
          "allowFrom": [
            "+9725022yy"
          ],
          "enabled": true,
          "fromNumber": "+0000",
          "inboundPolicy": "allowlist",
          "outbound": {
            "defaultMode": "conversation"
          },
          "provider": "twilio",
          "skipSignatureVerification": true,
          "streaming": {
            "enabled": true,
            "streamPath": "/voice/stream",
            "openaiApiKey": "sk-proj-yy-xx"
          },
          "tailscale": {
            "mode": "funnel"
          },
          "twilio": {
            "authToken": "a",
            "accountSid": "bb"
          },
          "serve": {
            "path": "/voice/webhook"
          },
          "tts": {
            "openai": {
              "apiKey": "sk-proj-yy-xx"
            },
            "elevenlabs": {
              "apiKey": "sk_xxx"
            },
            "modelOverrides": {
              "allowVoice": false
            }
          }
        }
      },

# Funnel on:
#     - https://anakin.tail33f954.ts.net

https://anakin.tail33f954.ts.net (Funnel on)
|-- /              proxy http://127.0.0.1:18789
|-- /voice/stream  proxy http://127.0.0.1:3334/voice/stream
|-- /voice/webhook proxy http://127.0.0.1:3334/voice/webhook```

Any hints?

also- how can i look at the voicecall's console logs??
#

@hoary blaze can u help?

hoary blazeBOT
# worldly forum <@1457407575476801641> can u help?

⚠️ Agent failed before reply: No API key found for provider "anthropic". Auth store: /srv/clawdbot/state/agents/main/agent/auth-profiles.json (agentDir: /srv/clawdbot/state/agents/main/agent). Configure auth for this agent (clawdbot agents add <id>) or copy auth-profiles.json from the main agentDir.
Logs: clawdbot logs --follow

worldly forum
#

@hoary blaze ?

hoary blazeBOT
# worldly forum <@1457407575476801641> ?

⚠️ Agent failed before reply: No API key found for provider "anthropic". Auth store: /srv/clawdbot/state/agents/main/agent/auth-profiles.json (agentDir: /srv/clawdbot/state/agents/main/agent). Configure auth for this agent (clawdbot agents add <id>) or copy auth-profiles.json from the main agentDir.
Logs: clawdbot logs --follow

worldly forum
#

@hoary blaze

hoary blazeBOT
# worldly forum <@1457407575476801641>

⚠️ Agent failed before reply: No API key found for provider "anthropic". Auth store: /srv/clawdbot/state/agents/main/agent/auth-profiles.json (agentDir: /srv/clawdbot/state/agents/main/agent). Configure auth for this agent (clawdbot agents add <id>) or copy auth-profiles.json from the main agentDir.
Logs: clawdbot logs --follow

worldly forum
#

@hoary blaze ?

hoary blazeBOT
# worldly forum <@1457407575476801641> ?

For Twilio + media streaming, the call flow is:

  1. Twilio hits your webhook (/voice/webhook) to get TwiML
  2. That TwiML tells Twilio to open a WebSocket media stream to wss://…/voice/stream?...
  3. If Twilio can’t reach /voice/stream (or the WS upgrade is rejected), you get silence and Twilio typically hangs up shortly after.

1) Double-check you’re exposing both paths publicly

The plugin’s tailscale.mode:"funnel" exposure only covers serve.path (usually /voice/webhook). You also need a funnel mapping for the stream path.

These are the two you want (conceptually):

  • /voice/webhook → http://127.0.0.1:3334/voice/webhook
  • /voice/stream → http://127.0.0.1:3334/voice/stream (important: keep /voice/stream on the target, because Tailscale strips the mount prefix)

Your tailscale funnel status output looks correct on that front.

2) How to see voice-call logs

#

You’ve got two useful log views:

A) Gateway/plugin console logs (you’ll see [voice-call] … + [RealtimeSTT] …):

openclaw logs --follow

Docs: https://docs.openclaw.ai/cli/logs

B) Voice-call’s persisted call log (state machine + transcripts):

openclaw voicecall tail

This tails the call store (defaults under ~/.openclaw/voice-calls/calls.jsonl).

3) What to look for (this will pinpoint the failure)

While you place/answer a call, run openclaw logs --follow and check if you see:

#
  • [voice-call] WebSocket upgrade for media stream
  • [voice-call] Media stream connected: <CallSid> -> <StreamSid>

If you don’t see those, Twilio isn’t successfully connecting to your wss://…/voice/stream endpoint (network/path/funnel/ws issue).

If you do see the stream connect, but still silence, then the next suspects are:

  • OpenAI Realtime STT connection errors ([RealtimeSTT] WebSocket error/close)
  • TTS init warnings ([voice-call] Telephony TTS unavailable; streaming TTS disabled)

4) Twilio-side: grab the exact error

In Twilio Console, check Monitor → Logs → Debugger and/or the specific call’s Request Inspector. If webhook fetch is failing you’ll usually see 11200/11205-style errors, and if the stream fails you’ll see Media Streams connect errors.

5) Two quick things to paste here so we can diagnose fast

  1. openclaw --version
  2. The relevant snippet from openclaw logs --follow covering the moment you answer (from “Webhook server listening…” through any stream connect / errors)

Also: make sure your config block is actually under plugins.entries["voice-call"] (docs expect plugins.entries.voice-call.enabled/config). Docs: https://docs.openclaw.ai/plugins/voice-call

worldly forum
#

.

hoary blazeBOT
# worldly forum .

That symptom (answer → silence → hang up) is usually either:

  1. Twilio can’t fetch your webhook / the webhook returns non‑TwiML / times out, or
  2. Twilio reaches /voice/webhook, but the Media Stream (/voice/stream) or TTS path fails, so the call gets terminated shortly after.

1) How to see voice-call logs (the important bit)

You’ve got two good log surfaces:

A) Plugin call/event tail (best signal)

openclaw voicecall tail

B) Gateway logs (everything, including Twilio + stream errors)

openclaw logs --follow
#

Per docs, inbound policy defaults to disabled, and when you enable inbound calls you typically want a greeting:

inboundGreeting: "Hello! How can I help?"

Docs section: https://docs.openclaw.ai/plugins/voice-call#inbound-calls

Without a greeting, it may just sit there waiting, and depending on provider/stream health it can end quickly.

B) TTS config shape: make sure you set a provider (and not Edge)

Voice calls use core messages.tts (or the plugin override), and Edge TTS is ignored for calls. In your snippet, I only see API keys under tts.openai / tts.elevenlabs, but no provider.

Make sure you have either core:

messages: {
  tts: {
    provider: "openai",
#
    openai: { apiKey: "...", model: "gpt-4o-mini-tts", voice: "alloy" },
  },
}

or a plugin override with the same shape:

plugins: {
  entries: {
    "voice-call": {
      config: {
        tts: {
          provider: "openai",
          openai: { apiKey: "...", model: "gpt-4o-mini-tts", voice: "alloy" },
        },
      },
#
    },
  },
}

TTS docs: https://docs.openclaw.ai/tts
Voice-call note about TTS: https://docs.openclaw.ai/plugins/voice-call#tts-for-calls


3) What I’d check next (fast)

  1. Twilio Console → Call logs / Debugger for the failed call. If you see “HTTP Retrieval Failure / 11200” or similar, it’s webhook reachability/response.
  2. While placing a call, run:
    • openclaw voicecall tail
    • openclaw logs --follow
      and confirm you see: