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

推荐订阅源

MongoDB | Blog
MongoDB | Blog
B
Blog RSS Feed
MyScale Blog
MyScale Blog
M
MIT News - Artificial intelligence
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
U
Unit 42
Blog — PlanetScale
Blog — PlanetScale
L
LangChain Blog
C
Check Point Blog
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
T
Tailwind CSS Blog
Vercel News
Vercel News
腾讯CDC
GbyAI
GbyAI
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
H
Help Net Security
博客园 - 三生石上(FineUI控件)
D
DataBreaches.Net
Microsoft Security Blog
Microsoft Security Blog
小众软件
小众软件

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): handle Telnyx callback payloads · opencl...
steipete · 2026-04-24 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

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

2727
2828

### Fixes

2929
30+

- Voice-call/Telnyx: preserve inbound/outbound callback metadata and read transcription text from Telnyx's current `transcription_data` payload.

3031

- Codex harness: route native `request_user_input` prompts back to the originating chat, preserve queued follow-up answers, and honor newer app-server command approval amendment decisions.

3132

- Codex status: report Codex CLI OAuth as `oauth (codex-cli)` for native `codex/*` sessions instead of showing unknown auth. Fixes #70688. Thanks @jb510.

3233

- Codex harness/context-engine: redact context-engine assembly failures before logging, so fallback warnings do not serialize raw error objects. (#70809) Thanks @jalehman.

Original file line numberDiff line numberDiff line change

@@ -185,4 +185,74 @@ describe("TelnyxProvider.parseWebhookEvent", () => {

185185

}

186186

expect(event.dedupeKey).toBe("telnyx:req:abc");

187187

});

188+
189+

it("maps call direction and phone numbers from Call Control callbacks", () => {

190+

const provider = new TelnyxProvider({

191+

apiKey: "KEY123",

192+

connectionId: "CONN456",

193+

publicKey: undefined,

194+

});

195+

const result = provider.parseWebhookEvent(

196+

createCtx({

197+

rawBody: JSON.stringify({

198+

data: {

199+

id: "evt-inbound",

200+

event_type: "call.initiated",

201+

payload: {

202+

call_control_id: "call-1",

203+

direction: "incoming",

204+

from: "+15551111111",

205+

to: "+15550000000",

206+

},

207+

},

208+

}),

209+

}),

210+

);

211+
212+

expect(result.events).toHaveLength(1);

213+

expect(result.events[0]).toEqual(

214+

expect.objectContaining({

215+

type: "call.initiated",

216+

direction: "inbound",

217+

from: "+15551111111",

218+

to: "+15550000000",

219+

}),

220+

);

221+

});

222+
223+

it("reads transcription text from Telnyx transcription_data payloads", () => {

224+

const provider = new TelnyxProvider({

225+

apiKey: "KEY123",

226+

connectionId: "CONN456",

227+

publicKey: undefined,

228+

});

229+

const result = provider.parseWebhookEvent(

230+

createCtx({

231+

rawBody: JSON.stringify({

232+

data: {

233+

id: "evt-transcription",

234+

event_type: "call.transcription",

235+

payload: {

236+

call_control_id: "call-1",

237+

transcription_data: {

238+

transcript: "hello this is a test speech",

239+

is_final: false,

240+

confidence: 0.977219,

241+

},

242+

},

243+

},

244+

}),

245+

}),

246+

);

247+
248+

expect(result.events).toHaveLength(1);

249+

expect(result.events[0]).toEqual(

250+

expect.objectContaining({

251+

type: "call.speech",

252+

transcript: "hello this is a test speech",

253+

isFinal: false,

254+

confidence: 0.977219,

255+

}),

256+

);

257+

});

188258

});

Original file line numberDiff line numberDiff line change

@@ -31,6 +31,21 @@ export interface TelnyxProviderOptions {

3131

skipVerification?: boolean;

3232

}

3333
34+

function normalizeTelnyxDirection(

35+

direction: string | undefined,

36+

): "inbound" | "outbound" | undefined {

37+

switch (direction) {

38+

case "incoming":

39+

case "inbound":

40+

return "inbound";

41+

case "outgoing":

42+

case "outbound":

43+

return "outbound";

44+

default:

45+

return undefined;

46+

}

47+

}

48+
3449

export class TelnyxProvider implements VoiceCallProvider {

3550

readonly name = "telnyx" as const;

3651

@@ -143,6 +158,9 @@ export class TelnyxProvider implements VoiceCallProvider {

143158

callId,

144159

providerCallId: data.payload?.call_control_id,

145160

timestamp: Date.now(),

161+

direction: normalizeTelnyxDirection(data.payload?.direction),

162+

from: data.payload?.from,

163+

to: data.payload?.to,

146164

};

147165
148166

switch (data.event_type) {

@@ -169,9 +187,10 @@ export class TelnyxProvider implements VoiceCallProvider {

169187

return {

170188

...baseEvent,

171189

type: "call.speech",

172-

transcript: data.payload?.transcription || "",

173-

isFinal: data.payload?.is_final ?? true,

174-

confidence: data.payload?.confidence,

190+

transcript:

191+

data.payload?.transcription_data?.transcript ?? data.payload?.transcription ?? "",

192+

isFinal: data.payload?.transcription_data?.is_final ?? data.payload?.is_final ?? true,

193+

confidence: data.payload?.transcription_data?.confidence ?? data.payload?.confidence,

175194

};

176195
177196

case "call.hangup":

@@ -336,10 +355,18 @@ interface TelnyxEvent {

336355

payload?: {

337356

call_control_id?: string;

338357

client_state?: string;

358+

direction?: string;

359+

from?: string;

360+

to?: string;

339361

text?: string;

340362

transcription?: string;

341363

is_final?: boolean;

342364

confidence?: number;

365+

transcription_data?: {

366+

transcript?: string;

367+

is_final?: boolean;

368+

confidence?: number;

369+

};

343370

hangup_cause?: string;

344371

digit?: string;

345372

[key: string]: unknown;