api/javascript/telnyx-voice-streaming-javascript/SKILL.md
Stream call audio in real-time, fork media to external destinations, and transcribe speech live. Use for real-time analytics and AI integrations. This skill provides JavaScript SDK examples.
npx skillsauth add team-telnyx/telnyx-toolkit telnyx-voice-streaming-javascriptInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
npm install telnyx
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
All examples below assume client is already initialized as shown above.
Call forking allows you to stream the media from a call to a specific target in realtime.
POST /calls/{call_control_id}/actions/fork_start
const response = await client.calls.actions.startForking('call_control_id');
console.log(response.data);
Stop forking a call.
POST /calls/{call_control_id}/actions/fork_stop
const response = await client.calls.actions.stopForking('call_control_id');
console.log(response.data);
Start streaming the media from a call to a specific WebSocket address or Dialogflow connection in near-realtime.
POST /calls/{call_control_id}/actions/streaming_start
const response = await client.calls.actions.startStreaming('call_control_id');
console.log(response.data);
Stop streaming a call to a WebSocket.
POST /calls/{call_control_id}/actions/streaming_stop
const response = await client.calls.actions.stopStreaming('call_control_id');
console.log(response.data);
Start real-time transcription.
POST /calls/{call_control_id}/actions/transcription_start
const response = await client.calls.actions.startTranscription('call_control_id');
console.log(response.data);
Stop real-time transcription.
POST /calls/{call_control_id}/actions/transcription_stop
const response = await client.calls.actions.stopTranscription('call_control_id');
console.log(response.data);
The following webhook events are sent to your configured webhook URL.
All webhooks include telnyx-timestamp and telnyx-signature-ed25519 headers for verification (Standard Webhooks compatible).
| Event | Description |
|-------|-------------|
| callForkStarted | Call Fork Started |
| callForkStopped | Call Fork Stopped |
| callStreamingStarted | Call Streaming Started |
| callStreamingStopped | Call Streaming Stopped |
| callStreamingFailed | Call Streaming Failed |
| transcription | Transcription |
tools
Build cross-platform VoIP calling apps with React Native using Telnyx Voice SDK. High-level reactive API with automatic lifecycle management, CallKit/ConnectionService integration, and push notifications. Use for mobile VoIP apps with minimal setup.
tools
Build browser-based VoIP calling apps using Telnyx WebRTC JavaScript SDK. Covers authentication, voice calls, events, debugging, call quality metrics, and AI Agent integration. Use for web-based real-time communication.
tools
Build VoIP calling apps on iOS using Telnyx WebRTC SDK. Covers authentication, making/receiving calls, CallKit integration, PushKit/APNS push notifications, call quality metrics, and AI Agent integration. Use when implementing real-time voice communication on iOS.
tools
Build cross-platform VoIP calling apps with Flutter using Telnyx WebRTC SDK. Covers authentication, making/receiving calls, push notifications (FCM + APNS), call quality metrics, and AI Agent integration. Works on Android, iOS, and Web.