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

推荐订阅源

V
V2EX
aimingoo的专栏
aimingoo的专栏
S
SegmentFault 最新的问题
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
博客园 - 【当耐特】
月光博客
月光博客
C
Check Point Blog
T
The Blog of Author Tim Ferriss
罗磊的独立博客
博客园 - Franky
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
Microsoft Security Blog
Microsoft Security Blog
B
Blog
阮一峰的网络日志
阮一峰的网络日志
腾讯CDC
美团技术团队
N
Netflix TechBlog - Medium
Stack Overflow Blog
Stack Overflow Blog
Y
Y Combinator Blog
L
LangChain Blog
The Cloudflare 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
feat(voice-call): improve realtime Meet voice agent · ope...
scoootscooob · 2026-05-06 · via Recent Commits to openclaw:main

@@ -1,3 +1,4 @@

1+

import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";

12

import {

23

GatewayClient,

34

startGatewayClientWhenEventLoopReady,

@@ -18,11 +19,6 @@ type VoiceCallSpeakResult = {

1819

error?: string;

1920

};

202121-

type VoiceCallDtmfResult = {

22-

success?: boolean;

23-

error?: string;

24-

};

25-2622

type VoiceCallMeetJoinResult = {

2723

callId: string;

2824

dtmfSent: boolean;

@@ -87,19 +83,24 @@ export async function joinMeetViaVoiceCallGateway(params: {

8783

dtmfSequence?: string;

8884

logger?: RuntimeLogger;

8985

message?: string;

86+

requesterSessionKey?: string;

87+

sessionKey?: string;

9088

}): Promise<VoiceCallMeetJoinResult> {

9189

let client: VoiceCallGatewayClient | undefined;

92909391

try {

9492

client = await createConnectedGatewayClient(params.config);

9593

params.logger?.info(

96-

`[google-meet] Delegating Twilio join to Voice Call (dtmf=${params.dtmfSequence ? "post-connect" : "none"}, intro=${params.message ? "delayed" : "none"})`,

94+

`[google-meet] Delegating Twilio join to Voice Call (dtmf=${params.dtmfSequence ? "pre-connect" : "none"}, intro=${params.message ? "delayed" : "none"})`,

9795

);

9896

const start = (await client.request(

9997

"voicecall.start",

10098

{

10199

to: params.dialInNumber,

102100

mode: "conversation",

101+

...(params.dtmfSequence ? { dtmfSequence: params.dtmfSequence } : {}),

102+

...(params.requesterSessionKey ? { requesterSessionKey: params.requesterSessionKey } : {}),

103+

...(params.sessionKey ? { sessionKey: params.sessionKey } : {}),

103104

},

104105

{ timeoutMs: params.config.voiceCall.requestTimeoutMs },

105106

)) as VoiceCallStartResult;

@@ -109,27 +110,10 @@ export async function joinMeetViaVoiceCallGateway(params: {

109110

params.logger?.info(

110111

`[google-meet] Voice Call Twilio phone leg started: callId=${start.callId}`,

111112

);

112-

let dtmfSent = false;

113-

if (params.dtmfSequence) {

114-

const delayMs = params.config.voiceCall.dtmfDelayMs;

115-

params.logger?.info(

116-

`[google-meet] Waiting ${delayMs}ms before sending Meet DTMF for callId=${start.callId}`,

117-

);

118-

await sleep(delayMs);

119-

const dtmf = (await client.request(

120-

"voicecall.dtmf",

121-

{

122-

callId: start.callId,

123-

digits: params.dtmfSequence,

124-

},

125-

{ timeoutMs: params.config.voiceCall.requestTimeoutMs },

126-

)) as VoiceCallDtmfResult;

127-

if (dtmf.success === false) {

128-

throw new Error(dtmf.error || "voicecall.dtmf failed");

129-

}

130-

dtmfSent = true;

113+

const dtmfSent = Boolean(params.dtmfSequence);

114+

if (dtmfSent) {

131115

params.logger?.info(

132-

`[google-meet] Meet DTMF sent after phone leg connected: callId=${start.callId} digits=${params.dtmfSequence.length}`,

116+

`[google-meet] Meet DTMF queued before realtime connect: callId=${start.callId} digits=${params.dtmfSequence?.length ?? 0}`,

133117

);

134118

}

135119

let introSent = false;

@@ -141,15 +125,23 @@ export async function joinMeetViaVoiceCallGateway(params: {

141125

);

142126

await sleep(delayMs);

143127

}

144-

const spoken = (await client.request(

145-

"voicecall.speak",

146-

{

147-

callId: start.callId,

148-

allowTwimlFallback: false,

149-

message: params.message,

150-

},

151-

{ timeoutMs: params.config.voiceCall.requestTimeoutMs },

152-

)) as VoiceCallSpeakResult;

128+

let spoken: VoiceCallSpeakResult;

129+

try {

130+

spoken = (await client.request(

131+

"voicecall.speak",

132+

{

133+

callId: start.callId,

134+

allowTwimlFallback: false,

135+

message: params.message,

136+

},

137+

{ timeoutMs: params.config.voiceCall.requestTimeoutMs },

138+

)) as VoiceCallSpeakResult;

139+

} catch (err) {

140+

params.logger?.warn?.(

141+

`[google-meet] Skipped intro speech because realtime bridge was not ready: ${formatErrorMessage(err)}`,

142+

);

143+

spoken = { success: false };

144+

}

153145

if (spoken.success === false) {

154146

params.logger?.warn?.(

155147

`[google-meet] Skipped intro speech because realtime bridge was not ready: ${