Class PlivoVoiceProvider

Plivo voice call provider.

Uses the Plivo REST API v1 for outbound call control and HMAC-SHA256 for inbound webhook signature verification (v3 signature scheme).

Example

const provider = new PlivoVoiceProvider({
authId: process.env.PLIVO_AUTH_ID!,
authToken: process.env.PLIVO_AUTH_TOKEN!,
});

Implements

Constructors

Methods

  • Parse a Plivo webhook body into normalized NormalizedCallEvents.

    Plivo sends most webhooks with URL-encoded bodies, but some callbacks may arrive as JSON. This parser handles both formats by inspecting whether the body starts with { (JSON) or not (form-encoded).

    Plivo uses two naming conventions for the same fields:

    • PascalCase (CallUUID, CallStatus, Digits) in URL callbacks.
    • snake_case (call_uuid, call_status) in some API responses. Both are checked for maximum compatibility.

    Parameters

    Returns WebhookParseResult

    Parsed result containing zero or more normalized events.

  • Hang up an active call using the Plivo Call DELETE endpoint.

    Plivo uses HTTP DELETE to terminate a call (unlike Twilio's POST with Status=completed or Telnyx's POST to /actions/hangup). This is a RESTful convention where deleting the call resource ends the call.

    Parameters

    Returns Promise<void>

  • Speak text into a live call using the Plivo Speak API.

    POSTs a JSON body to /v1/Account/{authId}/Call/{callUuid}/Speak/ with the text, voice (default 'WOMAN'), and language (default 'en-US').

    Parameters

    • input: PlayTtsInput

      TTS parameters (text, optional voice, call ID).

    Returns Promise<void>

Properties

name: "plivo" = ...

Provider identifier, always 'plivo'.