惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Vercel News
Vercel News
F
Fortinet All Blogs
月光博客
月光博客
G
Google Developers Blog
博客园 - Franky
GbyAI
GbyAI
The Cloudflare Blog
I
InfoQ
雷峰网
雷峰网
WordPress大学
WordPress大学
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
T
The Blog of Author Tim Ferriss
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
小众软件
小众软件
腾讯CDC
B
Blog
量子位
V
V2EX
S
SegmentFault 最新的问题
Google DeepMind News
Google DeepMind News

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(voice-call): reap stale pre-answer calls · openclaw/o...
steipete · 2026-04-25 · via Recent Commits to openclaw:main

File tree

  • extensions/voice-call/src

    • webhook

Original file line numberDiff line numberDiff line change

@@ -73,7 +73,7 @@ Docs: https://docs.openclaw.ai

7373

- Config/doctor: reject legacy `secretref-env:<ENV_VAR>` marker strings on SecretRef credential paths and migrate valid markers to structured env SecretRefs with `openclaw doctor --fix`. Fixes #51794. Thanks @halointellicore.

7474

- Providers/OpenAI: separate API-key and Codex sign-in onboarding groups, and avoid replaying stale OpenAI Responses reasoning blocks after a model route switch.

7575

- Providers/ElevenLabs: omit the MP3-only `Accept` header for PCM telephony synthesis, so Voice Call requests for `pcm_22050` no longer receive MP3 audio. Fixes #67340. Thanks @marcchabot.

76-

- Plugins/Voice Call: honor configured TTS timeouts for Twilio media-stream playback and fail empty telephony audio instead of completing as silence. Fixes #42071; supersedes #60957. Thanks @Ryce and @sliekens.

76+

- Plugins/Voice Call: reap stale pre-answer calls by default, honor configured TTS timeouts for Twilio media-stream playback, and fail empty telephony audio instead of completing as silence. Fixes #42071; supersedes #60957. Thanks @Ryce and @sliekens.

7777

- Skills: honor legacy `metadata.clawdbot` requirements and installer hints when `metadata.openclaw` is absent, so older skills no longer appear ready when required binaries are missing. Fixes #71323. Thanks @chen-zhang-cs-code.

7878

- Browser/config: expand `~` in `browser.executablePath` before Chromium launch, so home-relative custom browser paths no longer fail with `ENOENT`. Fixes #67264. Thanks @Quratulain-bilal.

7979

- Telegram/streaming: hide tool-progress status updates by default while keeping explicit `streaming.preview.toolProgress` opt-in support for edited preview messages. Fixes #71320. Thanks @neeravmakwana.

Original file line numberDiff line numberDiff line change

@@ -226,6 +226,14 @@ describe("validateProviderConfig", () => {

226226

});

227227

});

228228
229+

describe("resolveVoiceCallConfig", () => {

230+

it("enables the pre-answer stale call reaper by default", () => {

231+

const config = resolveVoiceCallConfig({ enabled: true, provider: "mock" });

232+
233+

expect(config.staleCallReaperSeconds).toBe(120);

234+

});

235+

});

236+
229237

describe("normalizeVoiceCallConfig", () => {

230238

it("fills nested runtime defaults from a partial config boundary", () => {

231239

const normalized = normalizeVoiceCallConfig({

Original file line numberDiff line numberDiff line change

@@ -331,11 +331,10 @@ export const VoiceCallConfigSchema = z

331331
332332

/**

333333

* Maximum age of a call in seconds before it is automatically reaped.

334-

* Catches calls stuck in unexpected states (e.g., notify-mode calls that

335-

* never receive a terminal webhook). Set to 0 to disable.

336-

* Default: 0 (disabled). Recommended: 120-300 for production.

334+

* Catches calls stuck before answer (for example, local mock calls that

335+

* never receive provider webhooks). Set to 0 to disable.

337336

*/

338-

staleCallReaperSeconds: z.number().int().nonnegative().default(0),

337+

staleCallReaperSeconds: z.number().int().nonnegative().default(120),

339338
340339

/** Silence timeout for end-of-speech detection (ms) */

341340

silenceTimeoutMs: z.number().int().positive().default(800),

Original file line numberDiff line numberDiff line change

@@ -353,11 +353,12 @@ async function runStaleCallReaperCase(params: {

353353

callAgeMs: number;

354354

staleCallReaperSeconds: number;

355355

advanceMs: number;

356+

callOverrides?: Partial<CallRecord>;

356357

}) {

357358

const now = new Date("2026-02-16T00:00:00Z");

358359

vi.setSystemTime(now);

359360
360-

const call = createCall(now.getTime() - params.callAgeMs);

361+

const call = { ...createCall(now.getTime() - params.callAgeMs), ...params.callOverrides };

361362

const { manager, endCall } = createManager([call]);

362363

const config = createConfig({ staleCallReaperSeconds: params.staleCallReaperSeconds });

363364

const server = new VoiceCallWebhookServer(config, manager, provider);

@@ -485,6 +486,19 @@ describe("VoiceCallWebhookServer stale call reaper", () => {

485486

await server.stop();

486487

}

487488

});

489+
490+

it("does not reap calls that reached the answered state", async () => {

491+

const { endCall } = await runStaleCallReaperCase({

492+

callAgeMs: 120_000,

493+

staleCallReaperSeconds: 60,

494+

advanceMs: 30_000,

495+

callOverrides: {

496+

state: "answered",

497+

answeredAt: new Date("2026-02-15T23:58:30Z").getTime(),

498+

},

499+

});

500+

expect(endCall).not.toHaveBeenCalled();

501+

});

488502

});

489503
490504

describe("VoiceCallWebhookServer path matching", () => {

Original file line numberDiff line numberDiff line change

@@ -1,4 +1,5 @@

11

import type { CallManager } from "../manager.js";

2+

import { TerminalStates } from "../types.js";

23
34

const CHECK_INTERVAL_MS = 30_000;

45

@@ -15,6 +16,10 @@ export function startStaleCallReaper(params: {

1516

const interval = setInterval(() => {

1617

const now = Date.now();

1718

for (const call of params.manager.getActiveCalls()) {

19+

if (call.answeredAt || TerminalStates.has(call.state)) {

20+

continue;

21+

}

22+
1823

const age = now - call.startedAt;

1924

if (age > maxAgeMs) {

2025

console.log(