Telnyx Integration
Connect Telnyx Voice API to import completed call recordings into Genfin for transcription and QA scoring. Your human producers can keep using Telnyx while your AI calls continue on Twilio or another provider.
Before you start
You need permission to manage Genfin integrations and a developer who can update your Telnyx application's recording and webhook settings. Have these details ready:
- Telnyx API key: a key that can access the connection and its recordings.
- Webhook public key: the account's base64 Ed25519 public key from Telnyx Mission Control.
- Voice API connection ID: the numeric ID for the application that owns the recordings.
This integration supports Telnyx Voice API v2 JSON webhooks and Telnyx-hosted recordings. If your phone system uses Telnyx only as a SIP carrier, first confirm where calls are recorded and whether your application can send Voice API recording events. Connecting Genfin does not start recording or change your call routing.
1. Connect Telnyx
- In Genfin, open Organization → Integrations → Telnyx → Connect.
- Enter your API key, webhook public key, and Voice API connection ID.
- Select Connect, then copy the generated webhook URL. You can find it again under Setup instructions.
The URL has this format; use the actual URL Genfin gives you:
https://api.genfin.ai/webhooks/telnyx/{integration_id}
The Configured badge means the connection details are saved. It does not confirm that a recording has reached Genfin. If Telnyx is not listed, contact Support before changing your telephony settings.
2. Send recording events to Genfin
Have your developer configure the Voice API application to:
- Record the calls you want to import, including both parties, using Telnyx-hosted WAV or MP3 storage. Dual-channel files are supported.
- Send
call.recording.savedevents to the copied Genfin webhook URL using POST and the v2 JSON webhook format. - Keep the application's existing call-control webhook. Use event-specific recording delivery, a recording-command webhook override, or forward recording-ready events from your existing webhook handler.
Do not replace the webhook that answers or controls your live calls. Genfin receives recording notifications; your application remains responsible for live call handling.
If forwarding events, preserve the original request body byte-for-byte and include the telnyx-signature-ed25519 and telnyx-timestamp headers. Do not parse and reserialize the JSON before forwarding it. Forward promptly: Genfin accepts signatures within a five-minute window.
See Telnyx's Voice API webhook configuration and recording storage guide.
3. Include the producer and call direction
To attribute a recording to a producer, include the following JSON, encoded as base64, in the recording command's client_state. Use the producer handling that call:
{
"genfin": {
"agent_name": "Alex Smith",
"direction": "outbound"
}
}
These are Genfin's application metadata fields; Telnyx does not automatically supply the producer's name. Use a consistent, distinct name for each producer within your organization. Use inbound or outbound for direction.
For example, your developer can create the value in Python:
import base64
import json
metadata = {
"genfin": {
"agent_name": "Alex Smith",
"direction": "outbound",
}
}
client_state = base64.b64encode(
json.dumps(metadata).encode("utf-8")
).decode("ascii")
Pass the resulting client_state to the recording command. If your application already uses JSON in this field, add the genfin object alongside its existing fields before encoding it.
Calls without a producer name remain unassigned. If direction is missing, Genfin does not infer which phone number belongs to the customer. A recognized direction supplied directly in the webhook takes precedence over client_state.
4. Test the connection
- Make and finish a recorded inbound call and a recorded outbound call through your configured application.
- Confirm your application sends each
call.recording.savedevent to Genfin successfully. - Open Calls in Genfin. After processing finishes, check that the audio plays, a transcript is available, and the producer, direction, and customer phone number are correct.
- If you use transfers or stop and restart recording, test those flows too. Separate call legs or recording segments appear as separate recordings.
Troubleshooting
- Cannot connect: verify the numeric connection ID, API key access, and base64 public key. Use credentials for the account that owns the connection and recordings.
- Configured, but no calls appear: check that recording is enabled and that v2
call.recording.savedevents are reaching the generated URL. The event's connection ID must match the one saved in Genfin. - Webhook rejected: check the public key, signature headers, delivery timing, and whether a forwarding service changed the request body. Do not replay an old signed request after its five-minute window.
- Missing producer or customer attribution: check the per-call
genfin.agent_nameandgenfin.directionvalues before base64 encoding. Missing direction leaves customer attribution unset. - Processing does not finish: confirm the recording still exists in Telnyx and the API key can read it. Genfin refreshes short-lived recording links when downloading; there is no need to paste a recording URL into Genfin.
Supported recordings
One Telnyx Voice API connection per Genfin organization, with newly delivered call.recording.saved events and Telnyx-hosted WAV or MP3 audio. Single- and dual-channel files are supported.
Historical imports, TeXML form callbacks, conference recording events, SIP-trunk polling, and customer-managed recording storage are outside this integration. Transfers are not stitched together, and a Telnyx producer call is not automatically linked to a Twilio AI call.
Disconnect or change credentials
Let pending downloads finish, then select Disconnect on the Telnyx card. Existing imported recordings remain in Genfin. Disconnecting stops future ingestion and prevents pending downloads from using that connection's credentials.
To change credentials, disconnect and reconnect, then replace the Genfin webhook URL in your application's recording-event configuration with the newly generated URL.
Need help? Email support@genfin.ai with your organization name, the approximate call time, and the relevant Telnyx recording ID or call leg ID. Do not include your API key or signed recording URLs.