Skip to main content
Telnyx Voice uses Agnost’s voice webhook service. No Agnost SDK import is required.

Data Sources

Minimal Server Integration

Keep Telnyx pointed at your app. Add one small forwarder for final STT and one for TTS:
Forward final transcription events:
Record TTS where your app already calls Telnyx speak/playback:

Copy-Paste Middleware

Use one server-side helper. STT can run inside the incoming Telnyx webhook handler. TTS must run beside the existing Telnyx speak/playback call because that is where your backend has the bot text.
Forward final STT from your Telnyx webhook:
Forward TTS where your product already speaks to the caller:

Telnyx SDK Users

Using the Telnyx Node or Python SDK does not replace the STT webhook. Keep webhook_url configured on the call so final call.transcription events still reach your backend. Then wrap the SDK speak call to record TTS. Node.js:
Python:
Use the same session_id for STT and TTS events from the same call/session. It can be the Telnyx conversation_id, call_session_id, or call_control_id; Agnost turns non-UUID Telnyx IDs into stable dashboard UUIDs and keeps the original ID in metadata. Pass a stable event_id when your middleware can retry the same STT/TTS event. Agnost’s voice service stores final STT in memory for up to 10 minutes until the next TTS event for the same session_id. That TTS write becomes one dashboard event with user speech in args and bot speech in result. If a TTS event arrives without a queued STT, or after that queue expires, Agnost records it as output-only.

Troubleshooting

  • Only bot messages appear: TTS is arriving before final STT, more than 10 minutes after STT, or with a different session_id.
  • No user input appears: you are forwarding partial STT only. Agnost ignores STT where final or is_final is false.
  • TTS appears in a separate conversation: pass the same Telnyx conversation or call ID as session_id.
  • The accepted session_id looks different from the Telnyx ID: use the returned conversation_id in dashboard/debug links. The original Telnyx ID is stored as metadata.
  • No events appear: confirm X-Org-Id is set and your server can reach the Agnost voice service.
  • Missing bot output: you are forwarding STT only. Post the TTS text after the Telnyx speak/playback request succeeds.

Telnyx References