Repository navigation
fix(voice-call): preserve Twilio greetings and resume listening after silence - #193137
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR combines Twilio conversation playback and listening, then renews speech collection after silence. Example: A Twilio conversation with streaming disabled plays “Hello, this is a test,” then the caller stays silent.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored draft open: it repairs a current Twilio conversation failure, and source review found no definite introduced correctness or security bug. Priority: P1 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Voice Call manager sends playback and listening operations to the Twilio provider, which produces TwiML and processes signed carrier callbacks into call events. flowchart TD
A[Call manager] --> B[Twilio provider]
B --> C[Say and Gather]
C --> D[Signed webhook]
D --> E[Speech event]
E --> A
D --> F[Silence renewal]
F --> C
Technical reviewBest possible solution: Complete this provider-owned repair while preserving notification playback, streaming, explicit-turn correlation, and the existing call-duration cap. Do we have a high-confidence way to reproduce the issue? The released report and current-main source establish a concrete reproduction: call in Twilio conversation mode with streaming disabled, answer, and pause after a reply; no target code or live call was executed during this review. Is this the best way to solve the issue? The patch repairs the existing manager/provider boundary with one Gather renderer, removes the competing Twilio update, and preserves the shipped direct-speech and streaming paths without adding another state owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ffbbb514ba3b. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +41, Tests +311, Docs +1, Other +2. Total +355 across 10 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 4, 2026, 10:29 PM ET / November 5, 2026, 03:29 UTC. |
89c3b16 to
8eedb6a
Compare
…ations Keep fallback playback and token-scoped speech collection in one TwiML update. Renew the gather through the signed webhook after silence without replaying the greeting or treating identical later silence callbacks as webhook replays. Preserve direct-speech and notification behavior owned by the separate notify fix. Co-authored-by: Cestercian <[email protected]>
8eedb6a to
92c7f88
Compare
|
Merged via squash.
|
… silence (#193137) Preserve the Twilio Say fallback greeting by sending playback and listening in one conversation update. Renew a longer Gather through signed webhook silence redirects, retaining explicit turn correlation. Keep the direct and notify paths unchanged. Add regression coverage through the actual signed voice-call webhook handler using synthetic carrier transport. Allocate 310 net test lines for that boundary regression and independent TwiML contracts. Real Twilio call playback and timeout timing remain unverified. Supersedes #158357, thanks @cestercian Fixes #158262 Co-authored-by: Cestercian <[email protected]> Backport-source: 486a0bd Backport-scope: Carry turnToken; let Say own following Gather; signed listen callbacks rearm without fake answered events. Preserve realtime, non-Twilio, notify-only and webhook checks. Adapted production backport for release/2026.11.2. Upstream validation descriptions refer to source history; candidate regression coverage and remote qualification are tracked separately. Co-authored-by: RomneyDa <[email protected]>
… silence (openclaw#193137) Preserve the Twilio Say fallback greeting by sending playback and listening in one conversation update. Renew a longer Gather through signed webhook silence redirects, retaining explicit turn correlation. Keep the direct and notify paths unchanged. Add regression coverage through the actual signed voice-call webhook handler using synthetic carrier transport. Allocate 310 net test lines for that boundary regression and independent TwiML contracts. Real Twilio call playback and timeout timing remain unverified. Supersedes openclaw#158357, thanks @cestercian Fixes openclaw#158262 Co-authored-by: Cestercian <[email protected]>
What Problem This Solves
Twilio conversation calls without media streams lose their Say greeting when a second live TwiML update replaces it, then disconnect after roughly five seconds of silence following a reply.
Supersedes #158357, thanks @cestercian
Fixes #158262
Result
Send Say followed by Gather in one conversation update. Gather waits up to 120 seconds and redirects silence to the signed webhook, which renews listening without replaying the greeting or resetting the existing call-duration limit. Distinct callback identities preserve repeated silence callbacks, and explicit conversation turns retain their token. Signature verification is unchanged.
#191264 owns the notification tail; this replacement leaves it alone. Direct-speech TwiML and streaming behavior are preserved.
The shared Gather builder removes duplicate rendering. Production remains +65/-24 (net +41) because webhook renewal and explicit-turn correlation require new flow code. Tests are +312/-2 (net +310); the exact 310-line allocation covers the signed-webhook boundary regression and independent TwiML contracts.
Proof
893166e08e4d0237d6fce0bf9ee8056bafad8d56. Node and Bun fail the intended greeting-count and Gather-timeout assertions. Direct-speech preservation passes.92c7f88a8e2bc0fa52c7e0515c719baeb2f6d193. Job 127167828896 passes the 35-file/404-test voice-call groups on the current Bun plan, including all four signed-webhook scenarios and provider/manager/notify/streaming consumers. Production/test types, lint, source contracts, ratchet and repaired Windows partition shard pass. Darwin tooling run 42004275087 also succeeds. All attached Actions jobs were verified success/skipped before native submission.5389c2a105cfa1d96b7c65691f5341abb3d2aab8to the exact head above, with intact webhook/signature/replay/manager/provider context. No code or tests executed by the reviewer.Live-Twilio gap: no actual carrier call, audio playback observation, carrier timeout trace or real model response has been verified. Synthetic signed-webhook proof establishes the in-process call flow, not live carrier timing. Local test runs were not used because their compiled-worker preparation exceeds this production host's allowance.