Voice Call: add Plivo provider

This commit is contained in:
vrknetha
2026-01-13 17:16:02 +05:30
committed by Peter Steinberger
parent 0a1eeedc10
commit 946b0229e8
15 changed files with 1861 additions and 244 deletions

View File

@@ -4,6 +4,7 @@ import { validateProviderConfig } from "./config.js";
import { CallManager } from "./manager.js";
import type { VoiceCallProvider } from "./providers/base.js";
import { MockProvider } from "./providers/mock.js";
import { PlivoProvider } from "./providers/plivo.js";
import { TelnyxProvider } from "./providers/telnyx.js";
import { OpenAITTSProvider } from "./providers/tts-openai.js";
import { TwilioProvider } from "./providers/twilio.js";
@@ -56,6 +57,18 @@ function resolveProvider(config: VoiceCallConfig): VoiceCallProvider {
: undefined,
},
);
case "plivo":
return new PlivoProvider(
{
authId: config.plivo?.authId ?? process.env.PLIVO_AUTH_ID,
authToken: config.plivo?.authToken ?? process.env.PLIVO_AUTH_TOKEN,
},
{
publicUrl: config.publicUrl,
skipVerification: config.skipSignatureVerification,
ringTimeoutSec: Math.max(1, Math.floor(config.ringTimeoutMs / 1000)),
},
);
case "mock":
return new MockProvider();
default: