diff --git a/extensions/voice-call/src/providers/shared/guarded-json-api.test.ts b/extensions/voice-call/src/providers/shared/guarded-json-api.test.ts index 9e16fe839950..c9247bb0f4d0 100644 --- a/extensions/voice-call/src/providers/shared/guarded-json-api.test.ts +++ b/extensions/voice-call/src/providers/shared/guarded-json-api.test.ts @@ -66,6 +66,7 @@ describe("guardedJsonApiRequest", () => { }, policy: { allowedHostnames: ["api.example.com"] }, auditContext: "voice-call:test", + timeoutMs: 30_000, }); expect(release).toHaveBeenCalledTimes(1); }); diff --git a/extensions/voice-call/src/providers/shared/guarded-json-api.ts b/extensions/voice-call/src/providers/shared/guarded-json-api.ts index 7959d22f9dc2..ffe3b7e9c54f 100644 --- a/extensions/voice-call/src/providers/shared/guarded-json-api.ts +++ b/extensions/voice-call/src/providers/shared/guarded-json-api.ts @@ -8,6 +8,8 @@ import { // Shared guarded JSON API client for voice-call providers. +const VOICE_CALL_PROVIDER_API_TIMEOUT_MS = 30_000; + /** Parameters for an SSRF-guarded provider JSON request. */ type GuardedJsonApiRequestParams = { url: string; @@ -33,6 +35,7 @@ export async function guardedJsonApiRequest( }, policy: { allowedHostnames: params.allowedHostnames }, auditContext: params.auditContext, + timeoutMs: VOICE_CALL_PROVIDER_API_TIMEOUT_MS, }); try {