Declares whether callback ids satisfy the durable manager contract.
Telnyx credentials and optional overrides. With
allowUnverifiedWebhooks: true and no publicKey, the provider logs
one warning and accepts webhooks unverified. That is decided here,
once: a later change to config does not open the webhook.
Verify an incoming Telnyx webhook using Ed25519 signature verification.
allowUnverifiedWebhooks
and no key, for local development: then skip verification and return
valid: true.Telnyx-Timestamp and Telnyx-Signature-Ed25519 headers
(or their X- prefixed forms)."{timestamp}|{rawBody}".crypto.verify(null, payload, { key, format: 'der', type: 'spki' }, signature).webhookToleranceSec (default 300).Raw webhook request context.
Verification result. Without a public key it is { valid: false }
in either profile, or { valid: true } when the provider was
constructed with allowUnverifiedWebhooks and no key.
Parse a Telnyx webhook JSON body into normalized NormalizedCallEvents.
Telnyx sends all webhook payloads as JSON with a data.event_type
discriminant field. The data.payload object contains call-specific
fields like call_control_id, hangup_cause, digit, and result.
Telnyx's call.hangup event includes a hangup_cause field that must
be inspected to determine whether the user or the system terminated
the call:
normal_clearing / user_busy / originator_cancel -> call-hangup-usercall_rejected, unallocated_number) -> call-completedA body without a data object holding a payload object yields no
events. In carrier mode each event carries a stable id from
stableCarrierEvents; a DTMF event's occurrence is the webhook's
data.id, else its data.occurred_at, else the callback URL's event_key.
Raw webhook request context.
Parsed result containing zero or more normalized events.
Initiate an outbound call via the Telnyx Call Control v2 API.
POSTs to /v2/calls with a JSON body containing the connection_id,
phone numbers, and webhook URL. In carrier mode a mediaStreamUrl is
sent as stream_url with the inbound track and bidirectional PCMU RTP.
Legacy mode neither sends nor keeps it: the host starts a stream with
the streaming_start action after call.answered.
Call initiation parameters (from/to numbers, webhook URL).
Result containing the Telnyx call_control_id on success.
Never throws; returns { success: false, error: '...' } on failure.
Hang up an active call via the Telnyx Call Control hangup action.
POSTs an empty JSON body to /v2/calls/{call_control_id}/actions/hangup.
Telnyx will terminate the call and fire a call.hangup webhook.
Contains the Telnyx call_control_id to hang up.
Speak text into a live call using Telnyx's text-to-speech speak action.
POSTs a JSON body to /v2/calls/{id}/actions/speak with the text
payload, voice (default 'female'), and language (default 'en-US').
TTS parameters (text, optional voice, call ID).
Readonly nameProvider identifier, always 'telnyx'.
Telnyx voice call provider.
Uses the Telnyx Call Control v2 API for outbound call initiation and in-call actions (hangup, speak). Webhook verification uses Ed25519 public key signing; without a public key every webhook is refused, unless the provider is constructed with
allowUnverifiedWebhooksfor local development.Example