Skip to main content

Telnyx Calling: WebRTC — Documentation Index

WebRTC documentation within the Calling section of the Telnyx developer docs (https://developers.telnyx.com). This file: https://developers.telnyx.com/development/llms/calling-webrtc-llms-txt.md · Root index: https://developers.telnyx.com/llms.txt

Getting Started

  • Fundamentals: Core concepts for building real-time voice apps with the Telnyx Voice WebRTC SDKs — sessions, media negotiation, codecs, and call lifecycle basics.
  • Architecture: Architecture overview of the Telnyx Voice WebRTC SDKs covering signaling, media flow, ICE/STUN/TURN, and how clients connect to the Telnyx network.
  • SDK Commonalities: Concepts shared across the Telnyx Voice WebRTC SDKs (JS, iOS, Android, Flutter) — clients, calls, events, push, and authentication flows in one place.

Authentication

  • Credential Connections: Authenticate the Telnyx Voice WebRTC SDKs with credential-based SIP connections. Set up SIP credentials and login flow for browser and mobile apps.
  • Telephony Credentials: Authenticate the Telnyx Voice WebRTC SDKs with telephony credentials. Create per-user logins tied to a SIP connection for browser and mobile apps.
  • JWTs: Authenticate the Telnyx Voice WebRTC SDKs with short-lived JWT tokens. Generate, refresh, and validate tokens for secure browser and mobile clients.

Push Notifications

  • Overview: How push notifications work with Telnyx WebRTC SDKs to deliver incoming call alerts when your app is backgrounded or terminated.
  • Android: Set up Firebase Cloud Messaging and configure the Telnyx Portal to receive push notifications for incoming calls on Android.
  • iOS: Configure APNS VoIP push certificates and the Telnyx Portal to receive push notifications for incoming calls on iOS.
  • Flutter: Configure push notifications for the Telnyx Flutter Voice SDK on both Android and iOS.
  • React Native: Configure push notifications for the Telnyx React Native Voice SDK on both Android and iOS.

Tutorials

  • JS SDK Demo App: Run the Telnyx JavaScript WebRTC demo app to make and receive browser calls, test hold, mute, and transfer, and inspect the open-source code.
  • JS SDK Anatomy: Anatomy of the Telnyx JavaScript Voice SDK — the TelnyxRTC client, Call objects, and how events flow between your web app and the Telnyx network.

Use Cases

  • Contact Center (CCaaS): Build a complete contact center solution using Telnyx WebRTC with advanced call control and routing capabilities.
  • Outbound Dialer: Build an automated outbound dialer system using Telnyx WebRTC and Call Control API for high-volume calling campaigns.

Troubleshooting

  • Call Detail Records: Use WebRTC call detail records (CDRs) on Telnyx to diagnose Voice SDK problems — connection failures, audio quality issues, and session lifecycle events.
  • Debug Logs: Enable and read debug logs from the Telnyx Voice WebRTC SDKs to diagnose signaling, media, and call quality issues in production and development.
  • Interpreting Debug Data: Step-by-step guide to interpreting debug logs from the Telnyx Voice WebRTC SDKs — read INVITE/BYE flows, ICE candidates, and identify common errors.

SDKs

  • WebRTC JS SDK quickstart: Get started with the Telnyx WebRTC JS SDK in 5 minutes. Make and receive calls from your browser.
  • Build a Call Center Agent: Step-by-step tutorial for building a call center agent with the Telnyx WebRTC JS SDK — answering calls, muting, and holding.
  • WebRTC JS SDK authentication: How to authenticate the Telnyx WebRTC JS SDK using JWT, credentials, or anonymous login. Includes token refresh and security best practices.
  • Network Connectivity Requirements: Required endpoints, ports, and firewall configuration for the Telnyx WebRTC JS SDK.
  • Device Management: How to select, switch, and manage audio input/output devices (microphones, speakers) with the Telnyx WebRTC JS SDK.
  • Manage Multiple Calls: How to handle concurrent calls, call waiting, and per-call media element management with the Telnyx WebRTC JS SDK.
  • Call Report Stats: How to enable, access, and interpret WebRTC call reports from the Telnyx JS SDK — RTT, jitter, packet loss, ICE data, and audio quality metrics.
  • Reconnection & Call Recovery: How the Telnyx WebRTC JS SDK handles reconnection, when calls survive network interruptions, and how to configure recovery behavior.
  • Framework Integration: How to integrate the Telnyx WebRTC JS SDK with React, Next.js, Vue, and other JavaScript frameworks.
  • Debug Data & Call Quality Analysis: How to collect, interpret, and troubleshoot WebRTC call quality using debug reports, call reports, and the Telnyx debug visualizer.
  • WebRTC JS SDK error handling: Handle errors, warnings, and connection failures with the Telnyx WebRTC JS SDK, including fatal errors, recommended recovery actions, reconnection behavior, and version-specific guidance.
  • Production Best Practices: Production deployment guide for the Telnyx WebRTC JS SDK — security, reliability, performance, and monitoring.
  • TelnyxRTC Class: Main entry point for the Telnyx WebRTC JS SDK. Connect, disconnect, and manage calls.
  • Call Class: The Call object represents an active voice call — make, answer, hang up, mute, and hold.
  • IClientOptions: Configuration options for the TelnyxRTC client — authentication, connection, ICE, call reports, and debugging.
  • ICallOptions: Configuration options for placing a call with the Telnyx WebRTC JS SDK.
  • INotification: Notification object emitted by the Telnyx WebRTC JS SDK for call updates, media events, and SDK notifications.
  • Switch/Server Events: Events emitted by the Telnyx signaling server during the WebRTC call lifecycle — login, invite, answer, bye, and more.
  • How WebRTC Signaling Works: How the Telnyx WebRTC JS SDK communicates with Telnyx infrastructure — WebSocket connection, SIP signaling, and the full call flow from dial to hangup.
  • How ICE & TURN Work: How ICE connectivity checks, STUN, and TURN relay work in the Telnyx WebRTC JS SDK — and why they matter for call quality.
  • Authentication Architecture: How the three Telnyx WebRTC authentication methods relate — Credential Connections, Telephony Credentials, and JWTs — and when to use each.
  • Call State Lifecycle: Every state a Telnyx WebRTC call goes through, what triggers each transition, and what your app should do at each stage.
  • WebRTC JS ChangeLog: Release notes for the Telnyx JavaScript Voice SDK (@telnyx/webrtc). Track new features, breaking changes, bug fixes, and deprecations by version.
  • React quickstart: Get started with the Telnyx React SDK for building WebRTC voice applications in React.
  • Voice native iOS Client SDK: Telnyx iOS Voice Client SDK — add real-time SIP voice and video calling to native iOS apps with CallKit integration, VoIP push notifications, and Swift support.
  • WebRTC iOS Client: TxClient reference for the iOS Voice SDK. Main entry point used to log in, place outbound calls, and receive inbound calls in Swift and SwiftUI apps.
  • WebRTC iOS Call: Call class reference for the Telnyx iOS Voice SDK. Represents an active audio or video call and exposes accept, decline, hold, mute, and DTMF methods.
  • WebRTC iOS Call: Call extensions in the Telnyx iOS Voice SDK. Convenience methods added to the Call class for CallKit integration, state queries, and audio routing.
  • WebRTC iOS Client: TxClient extensions for the iOS Voice SDK. Helper methods added to the TelnyxRTC client for state queries, CallKit integration, and convenience APIs.
  • WebRTC iOS Call State: CallState enum reference for the iOS Voice SDK. Represents the current state of a call (NEW, CONNECTING, RINGING, ACTIVE, DONE) and supported transitions.
  • WebRTC iOS TxClientDelegate: TxClientDelegate protocol reference for the iOS Voice SDK. Implement these methods to receive call state changes, socket events, and backend updates.
  • WebRTC iOS Call Info: TxCallInfo struct reference for the iOS Voice SDK. Contains information about the current call — callerName, callerNumber, callId, and direction.
  • WebRTC iOS Client Configuration: TxConfig struct reference for the iOS Voice SDK. Structure used to configure TelnyxRTC client logins, ringtone, ringback tone, logging, and push.
  • WebRTC iOS Client Push Notifications Configuration: TxPushConfig struct reference for the iOS Voice SDK. Properties used to configure push notification credentials and behavior for incoming calls.
  • WebRTC iOS Client Push IP Notifications Configuration: TxPushIPConfig struct reference for the iOS Voice SDK. Properties used to configure the server endpoint for VoIP push notification delivery.
  • iOS Portal Setup: Configure VoIP push credentials in the Telnyx portal for the iOS Voice SDK. Upload your APNs VoIP certificate so Telnyx can deliver incoming call pushes.
  • iOS Push Notification Setup: Set up VoIP push notifications in your iOS app to wake the Telnyx Voice SDK on incoming calls. Covers PushKit, CallKit reporting, and SDK integration.
  • Troubleshooting: Troubleshoot iOS Voice SDK push notification problems — APNs VoIP delivery, PushKit registration, CallKit reporting timing, and missed call symptoms.
  • WebRTC iOS SDK AI Voice Assistant Introduction: Introduction to building AI-powered voice assistants with the iOS Voice SDK
  • WebRTC iOS SDK AI Voice Assistant Anonymous Login: Learn how to implement anonymous login for AI voice assistants with the iOS Voice SDK
  • WebRTC iOS SDK AI Voice Assistant Starting Conversations: Learn how to start conversations with AI voice assistants using the iOS Voice SDK
  • WebRTC iOS SDK AI Voice Assistant Text Messaging: Learn how to implement text messaging with AI voice assistants using the iOS Voice SDK
  • WebRTC iOS SDK AI Voice Assistant Transcript Updates: Learn how to handle transcript updates with AI voice assistants using the iOS Voice SDK
  • WebRTC Stats: WebRTC stats changelog for the Telnyx iOS Voice SDK. Updates and improvements to call-quality metrics, packet stats, and diagnostic data exposed by the SDK.
  • WebRTC iOS SDK Error Handling: Handle errors in the Telnyx iOS Voice SDK. Reference of TxError types, socket error codes, and patterns for surfacing call failures in your iOS app.
  • WebRTC iOS ChangeLog: Release notes for the Telnyx iOS Voice SDK. Track new features, breaking changes, bug fixes, and deprecations across published Swift package versions.
  • WebRTC Android Quickstart: Quickstart for the Telnyx Android Voice SDK using the telnyx_common drop-in module. Add SIP voice calling to your Android app in under 10 minutes.
  • Android Voice Client SDK: Telnyx Android Voice Client SDK — add real-time SIP audio and video calling to native Android apps, with push notifications and a drop-in module.
  • WebRTC Android Client: TelnyxClient class reference for the Telnyx Android Voice SDK. The main entry point — log in, connect, place outbound calls, and receive incoming calls.
  • WebRTC Android Call: Call class reference for the Telnyx Android Voice SDK. Represents an active audio or video call and exposes accept, decline, hold, mute, and DTMF methods.
  • WebRTC Android Config: TxConfig reference for the Telnyx Android Voice SDK. Defines login credentials, ringtone, logging level, and notification settings for TelnyxClient.
  • WebRTC Android ReceivedMessageBody: ReceivedMessageBody reference for the Android Voice SDK. Data class describing the structure of every message received over the Telnyx socket connection.
  • WebRTC Android SocketResponse: SocketResponse reference for the Android Voice SDK. Data class used for communication between the Telnyx WebSocket connection and TelnyxClient.
  • Android Portal Setup: Configure push notification credentials in the Telnyx portal for the Android Voice SDK. Upload your FCM server key so Telnyx can deliver call pushes.
  • Notification Quickstart for Android: Quickstart for adding push notifications to your Android Voice SDK app using the telnyx_common module. Drop-in solution for incoming call wakeups.
  • Android Push Notification Setup: Set up push notifications in your Android app to wake the Telnyx Voice SDK on incoming calls. Covers Firebase Cloud Messaging integration and SDK setup.
  • Android Push Troubleshooting: Troubleshoot push notification problems with the Android Voice SDK — debug FCM delivery, wakeup issues, and missing calls in foreground and background.
  • WebRTC Android SDK AI Voice Assistant Introduction: Introduction to building AI-powered voice assistants with the Android Voice SDK
  • WebRTC Android SDK AI Voice Assistant Anonymous Login: Learn how to implement anonymous login for AI voice assistants with the Android Voice SDK
  • WebRTC Android SDK AI Voice Assistant Starting Conversations: Learn how to start conversations with AI voice assistants using the Android Voice SDK
  • WebRTC Android SDK AI Voice Assistant Text Messaging: Learn how to implement text messaging with AI voice assistants using the Android Voice SDK
  • WebRTC Android SDK AI Voice Assistant Transcript Updates: Learn how to handle transcript updates with AI voice assistants using the Android Voice SDK
  • WebRTC Stats: WebRTC stats changelog for the Telnyx Android Voice SDK. Updates and improvements to call-quality metrics, packet stats, and diagnostic data exposed by the SDK.
  • WebRTC Call Reports: Collect and send WebRTC call statistics for troubleshooting and monitoring
  • WebRTC Android SDK Error Handling: Error handling reference for the Telnyx Android Voice SDK. List of common errors, TelnyxSocketError codes, and patterns for surfacing call failures.
  • WebRTC Android ChangeLog: Release notes for the Telnyx Android Voice SDK. Track new features, breaking changes, bug fixes, and deprecations across published versions.
  • React Native SDK: Official Telnyx React Native SDK for building cross-platform real-time communication applications with WebRTC.
  • React Native SDK Quickstart: Get started with the Telnyx React Native SDK in minutes. Complete setup guide from installation to making your first call.
  • Call: Represents a call with reactive state streams. Wraps the underlying Telnyx Call object and provides reactive streams for all call state changes.
  • TelnyxVoipClient: Main VoIP client class for React Native applications. Provides methods for call management, user registration, and WebRTC functionality.
  • CredentialConfig: Configuration for credential-based authentication with SIP username and password.
  • TokenConfig: Reference for the TokenConfig interface used to configure JWT token-based authentication when initializing the Telnyx WebRTC React Native SDK.
  • TelnyxVoipClientOptions: Configuration options for TelnyxVoipClient including app state management and debug settings.
  • TelnyxVoiceAppOptions: Configuration options for the TelnyxVoiceApp component including VoIP client management and push notification handling.
  • Portal Setup: Configure push notifications for React Native applications in the Telnyx Portal.
  • App Setup: Configure your React Native application for push notifications on both iOS and Android platforms.
  • Error Handling: Common errors, debugging techniques, and troubleshooting tips for the Telnyx WebRTC React Native SDK, including connection failures and call-state errors.
  • Changelog: Release notes and version history for the Telnyx WebRTC React Native SDK, including new features, breaking changes, bug fixes, and upgrade guidance.
  • Flutter Voice Client SDK: Telnyx Flutter Voice SDK — add real-time SIP voice and video calling to Flutter and Dart applications with push notifications, CallKit, and ConnectionService.
  • WebRTC Flutter Client: TelnyxRTC client reference for the Flutter Voice SDK. Main entry point used to log in, place outbound calls, and receive inbound calls in Dart and Flutter apps.
  • WebRTC Flutter Call: Call class reference for the Telnyx Flutter Voice SDK. Represents an active audio or video call and exposes accept, decline, hold, mute, and DTMF methods.
  • Flutter WebRTC SDK Message: TelnyxMessage reference for the Flutter Voice SDK. Represents an inbound message received from the Telnyx socket — events, payload fields, and parsing.
  • Flutter WebRTC SDK Socket Error Message: TelnyxSocketError reference for the Flutter Voice SDK. Represents an error received over the Telnyx WebSocket — codes, messages, and recovery patterns.
  • WebRTC Flutter Call State: CallState enum reference for the Flutter Voice SDK. Represents the current state of a call (NEW, CONNECTING, RINGING, ACTIVE, DONE) and supported transitions.
  • Flutter WebRTC SDK Socket Message Handler: onSocketMessageReceived event handler for the Flutter Voice SDK. Callback invoked when messages are received from the Telnyx WebSocket connection.
  • Flutter WebRTC SDK Socket Error Handler: onSocketErrorReceived event handler for the Flutter Voice SDK. Callback invoked when errors are received from the Telnyx WebSocket connection.
  • WebRTC Flutter Client Configuration: Config method object for the Flutter Voice SDK. Defines parameters used to configure the TelnyxClient login — credentials, ringtone, logging, and more.
  • WebRTC Flutter Incoming Invite Object: IncomingInviteParams method object for the Flutter Voice SDK. Information about an incoming call that can be answered, declined, or rejected by the app.
  • WebRTC Flutter Client Push Notifications Configuration: PushMetadata reference for the Flutter Voice SDK. Properties carried in push notification payloads to wake the SDK and reconcile incoming calls.
  • Flutter Push Notification Portal Setup: Configure push notification credentials in the Telnyx portal for the Flutter Voice SDK. Upload FCM and APNs/VoIP credentials for incoming call delivery.
  • Flutter Push Notification App Setup: Set up push notifications in your Flutter app to wake the Telnyx Voice SDK on incoming calls. Covers FCM, APNs/VoIP, and platform-channel wiring.
  • Flutter Push Troubleshooting: Troubleshoot push notification problems with the Flutter Voice SDK — debug FCM and VoIP push delivery, missed calls, and platform-channel issues.
  • WebRTC Flutter SDK AI Voice Assistant Introduction: Introduction to building AI-powered voice assistants with the Flutter Voice SDK
  • WebRTC Flutter SDK AI Voice Assistant Anonymous Login: Learn how to implement anonymous login for AI voice assistants with the Flutter Voice SDK
  • WebRTC Flutter SDK AI Voice Assistant Starting Conversations: Learn how to start conversations with AI voice assistants using the Flutter Voice SDK
  • WebRTC Flutter SDK AI Voice Assistant Text Messaging: Learn how to implement text messaging with AI voice assistants using the Flutter Voice SDK
  • WebRTC Flutter SDK AI Voice Assistant Transcript Updates: Learn how to handle transcript updates with AI voice assistants using the Flutter Voice SDK
  • WebRTC Stats: WebRTC stats changelog for the Telnyx Flutter Voice SDK. Updates and improvements to call-quality metrics, packet stats, and diagnostic data exposed by the SDK.
  • WebRTC Flutter SDK Error Handling: Error handling reference for the Telnyx Flutter Voice SDK. Common errors, socket error codes, and patterns for surfacing call failures in Flutter apps.
  • WebRTC Flutter ChangeLog: Release notes for the Telnyx Flutter Voice SDK. Track new features, breaking changes, bug fixes, and deprecations across published Dart package versions.

API Reference (WebRTC)

Credentials

Access Tokens

Push Credentials

Voice SDK Stats

  • List Voice SDK call reports: Returns paginated raw call report stats JSON payloads stored for the authenticated user. The user is derived from Telnyx authentication, not from request param…
  • Retrieve Voice SDK call reports by call ID: Returns raw call report stats JSON payloads stored for the authenticated user and call_id. The user is derived from Telnyx authentication, not from request p…