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

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Jina AI
Jina AI
博客园 - Franky
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
阮一峰的网络日志
阮一峰的网络日志
量子位
雷峰网
雷峰网
宝玉的分享
宝玉的分享
V
Visual Studio Blog
博客园_首页
小众软件
小众软件
The Cloudflare Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
博客园 - 聂微东
S
SegmentFault 最新的问题
博客园 - 【当耐特】
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
人人都是产品经理
人人都是产品经理
WordPress大学
WordPress大学

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: honor meet preconnect twiml · openclaw/openclaw@ec1b96c
steipete · 2026-05-01 · via Recent Commits to openclaw:main

@@ -679,6 +679,71 @@ describe("VoiceCallWebhookServer replay handling", () => {

679679

},

680680

);

681681682+

it("serves initial provider TwiML before the realtime shortcut", async () => {

683+

const parseWebhookEvent = vi.fn(() => ({ events: [], statusCode: 200 }));

684+

const consumeInitialTwiML = vi.fn(

685+

() =>

686+

'<Response><Play digits="ww123456#" /><Redirect method="POST">https://example.test</Redirect></Response>',

687+

);

688+

const buildTwiMLPayload = vi.fn(() => ({

689+

statusCode: 200,

690+

headers: { "Content-Type": "text/xml" },

691+

body: '<Response><Connect><Stream url="wss://example.test/voice/stream/realtime/token" /></Connect></Response>',

692+

}));

693+

const twilioProvider: VoiceCallProvider = {

694+

...provider,

695+

name: "twilio",

696+

verifyWebhook: () => ({ ok: true, verifiedRequestKey: "twilio:req:rt-stored" }),

697+

parseWebhookEvent,

698+

consumeInitialTwiML,

699+

};

700+

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

701+

const config = createConfig({

702+

provider: "twilio",

703+

inboundPolicy: "disabled",

704+

realtime: {

705+

enabled: true,

706+

streamPath: "/voice/stream/realtime",

707+

instructions: "Be helpful.",

708+

toolPolicy: "safe-read-only",

709+

tools: [],

710+

providers: {},

711+

},

712+

});

713+

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

714+

server.setRealtimeHandler({

715+

buildTwiMLPayload,

716+

getStreamPathPattern: () => "/voice/stream/realtime",

717+

handleWebSocketUpgrade: () => {},

718+

registerToolHandler: () => {},

719+

setPublicUrl: () => {},

720+

} as unknown as RealtimeCallHandler);

721+722+

try {

723+

const baseUrl = await server.start();

724+

const requestUrl = requireBoundRequestUrl(server, baseUrl);

725+

requestUrl.searchParams.set("callId", "call-1");

726+

const response = await fetch(requestUrl.toString(), {

727+

method: "POST",

728+

headers: {

729+

"content-type": "application/x-www-form-urlencoded",

730+

"x-twilio-signature": "sig",

731+

},

732+

body: "CallSid=CA123&Direction=outbound-api&CallStatus=in-progress&From=%2B15550001111&To=%2B15550002222",

733+

});

734+735+

expect(response.status).toBe(200);

736+

const body = await response.text();

737+

expect(body).toContain('<Play digits="ww123456#"');

738+

expect(consumeInitialTwiML).toHaveBeenCalledTimes(1);

739+

expect(buildTwiMLPayload).not.toHaveBeenCalled();

740+

expect(parseWebhookEvent).not.toHaveBeenCalled();

741+

expect(processEvent).not.toHaveBeenCalled();

742+

} finally {

743+

await server.stop();

744+

}

745+

});

746+682747

it("rejects non-allowlisted inbound realtime calls before creating a stream token", async () => {

683748

const buildTwiMLPayload = vi.fn(() => ({

684749

statusCode: 200,