Skip to main content

Telnyx Integration

This guide walks you through integrating Kallglot with Telnyx for real-time voice translation.

Prerequisites

  • A Telnyx account with a phone number
  • A TeXML application configured
  • A Kallglot API key
  • A web server to receive webhooks

Architecture

Setup Steps

1. Create a TeXML Application

In the Telnyx Portal:
  1. Go to Call Control > TeXML Applications
  2. Click Create TeXML Application
  3. Configure:
    • Name: Kallglot Translation
    • Voice URL: https://your-app.com/webhooks/telnyx/voice
    • Voice Method: POST
  4. Note the Application ID

2. Assign Phone Number

  1. Go to Numbers > My Numbers
  2. Select your number
  3. Under Voice, select your TeXML application
  4. Save

3. Create the Webhook Handler

Kallglot does not currently provide official SDKs. The helper functions in these examples, such as createKallglotSession(...), represent standard HTTP requests to the API.

4. Handle Call Events

Set up status callbacks for call lifecycle events:

Advanced Configurations

Outbound Calls with Call Control API

For more control, use Telnyx’s Call Control API:

Using SIP Trunking

For SIP-based integration with your PBX:

Recording Configuration

Configure call recording in TeXML:

Telnyx vs Twilio Comparison

Error Handling

Handle API Errors

Handle Webhook Signature Verification

Telnyx signs webhooks with a signature you should verify:

Best Practices

For multi-step call flows (IVR, transfers), use the Call Control API instead of TeXML for more flexibility.
Telnyx webhooks may timeout. Respond quickly and process asynchronously:
Configure Telnyx connections in regions close to your customers to minimize latency.

Troubleshooting

Calls not connecting

  1. Verify the TeXML application is assigned to your number
  2. Check webhook URL is accessible (use ngrok for testing)
  3. Verify TeXML syntax is valid

No audio translation

  1. Check track="both_tracks" is set in Stream element
  2. Verify Kallglot session was created successfully
  3. Check WebSocket connection in stream logs

High latency

  1. Check region configuration
  2. Verify network path between Telnyx and your server
  3. Consider using Telnyx’s edge locations closer to your users