
























@@ -28,7 +28,7 @@ describe("Google Meet voice-call gateway", () => {
2828gatewayMocks.startGatewayClientWhenEventLoopReady.mockClear();
2929});
303031-it("starts Twilio Meet calls, sends delayed DTMF, then speaks the intro", async () => {
31+it("starts Twilio Meet calls, sends delayed DTMF, then speaks the intro without TwiML fallback", async () => {
3232const config = resolveGoogleMeetConfig({
3333voiceCall: {
3434gatewayUrl: "ws://127.0.0.1:18789",
@@ -70,10 +70,39 @@ describe("Google Meet voice-call gateway", () => {
7070"voicecall.speak",
7171{
7272callId: "call-1",
73+allowTwimlFallback: false,
7374message: "Say exactly: I'm here and listening.",
7475},
7576{ timeoutMs: 30_000 },
7677);
7778expect(gatewayMocks.request).toHaveBeenCalledTimes(3);
7879});
80+81+it("skips the intro without failing when the realtime bridge is not ready", async () => {
82+gatewayMocks.request
83+.mockResolvedValueOnce({ callId: "call-1" })
84+.mockResolvedValueOnce({ success: true })
85+.mockResolvedValueOnce({ success: false, error: "No active realtime bridge for call" });
86+const config = resolveGoogleMeetConfig({
87+voiceCall: {
88+gatewayUrl: "ws://127.0.0.1:18789",
89+dtmfDelayMs: 1,
90+postDtmfSpeechDelayMs: 1,
91+},
92+});
93+const logger = { info: vi.fn(), warn: vi.fn(), error: vi.fn(), debug: vi.fn() };
94+95+const result = await joinMeetViaVoiceCallGateway({
96+ config,
97+dialInNumber: "+15551234567",
98+dtmfSequence: "123456#",
99+ logger,
100+message: "Say exactly: I'm here and listening.",
101+});
102+103+expect(result).toMatchObject({ callId: "call-1", dtmfSent: true, introSent: false });
104+expect(logger.warn).toHaveBeenCalledWith(
105+expect.stringContaining("Skipped intro speech because realtime bridge was not ready"),
106+);
107+});
79108});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。