diff --git a/extensions/voice-call/src/runtime.test.ts b/extensions/voice-call/src/runtime.test.ts index b50864af5dd..c169b7b89c4 100644 --- a/extensions/voice-call/src/runtime.test.ts +++ b/extensions/voice-call/src/runtime.test.ts @@ -227,6 +227,33 @@ describe("createVoiceCallRuntime lifecycle", () => { await runtime.stop(); }); + it("does not log duplicate webhook and public URLs when they match", async () => { + const logger = { + info: vi.fn(), + warn: vi.fn(), + error: vi.fn(), + }; + + const runtime = await createVoiceCallRuntime({ + config: createExternalProviderConfig({ + provider: "twilio", + publicUrl: "https://voice.example.com/voice/webhook", + }), + coreConfig: {} as CoreConfig, + agentRuntime: {} as never, + logger, + }); + + expect(logger.info).toHaveBeenCalledWith( + "[voice-call] Webhook URL: https://voice.example.com/voice/webhook", + ); + expect(logger.info).not.toHaveBeenCalledWith( + "[voice-call] Public URL: https://voice.example.com/voice/webhook", + ); + + await runtime.stop(); + }); + it("wires the shared realtime agent consult tool and handler", async () => { const config = createBaseConfig(); config.inboundPolicy = "allowlist"; diff --git a/extensions/voice-call/src/runtime.ts b/extensions/voice-call/src/runtime.ts index eb509a40d20..88cdf0f0151 100644 --- a/extensions/voice-call/src/runtime.ts +++ b/extensions/voice-call/src/runtime.ts @@ -464,7 +464,7 @@ export async function createVoiceCallRuntime(params: { log.info("[voice-call] Runtime initialized"); log.info(`[voice-call] Webhook URL: ${webhookUrl}`); - if (publicUrl) { + if (publicUrl && publicUrl !== webhookUrl) { log.info(`[voice-call] Public URL: ${publicUrl}`); }