api/python/telnyx-voice-python/SKILL.md
Make and receive calls, transfer, bridge, and manage call lifecycle with Call Control. Includes application management and call events. This skill provides Python SDK examples.
npx skillsauth add team-telnyx/telnyx-toolkit telnyx-voice-pythonInstall 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.
pip install telnyx
import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
All examples below assume client is already initialized as shown above.
Answer an incoming call.
POST /calls/{call_control_id}/actions/answer
response = client.calls.actions.answer(
call_control_id="call_control_id",
)
print(response.data)
Bridge two call control calls.
POST /calls/{call_control_id}/actions/bridge — Required: call_control_id
response = client.calls.actions.bridge(
call_control_id_to_bridge="call_control_id",
call_control_id_to_bridge_with="v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg",
)
print(response.data)
Dial a number or SIP URI from a given connection.
POST /calls — Required: connection_id, to, from
response = client.calls.dial(
connection_id="7267xxxxxxxxxxxxxx",
from_="+18005550101",
to="+18005550100",
)
print(response.data)
Hang up the call.
POST /calls/{call_control_id}/actions/hangup
response = client.calls.actions.hangup(
call_control_id="call_control_id",
)
print(response.data)
Transfer a call to a new destination.
POST /calls/{call_control_id}/actions/transfer — Required: to
response = client.calls.actions.transfer(
call_control_id="call_control_id",
to="+18005550100",
)
print(response.data)
Lists all active calls for given connection.
GET /connections/{connection_id}/active_calls
page = client.connections.list_active_calls(
connection_id="1293384261075731461",
)
page = page.data[0]
print(page.call_control_id)
Return a list of call control applications.
GET /call_control_applications
page = client.call_control_applications.list()
page = page.data[0]
print(page.id)
Create a call control application.
POST /call_control_applications — Required: application_name, webhook_event_url
call_control_application = client.call_control_applications.create(
application_name="call-router",
webhook_event_url="https://example.com",
)
print(call_control_application.data)
Retrieves the details of an existing call control application.
GET /call_control_applications/{id}
call_control_application = client.call_control_applications.retrieve(
"id",
)
print(call_control_application.data)
Updates settings of an existing call control application.
PATCH /call_control_applications/{id} — Required: application_name, webhook_event_url
call_control_application = client.call_control_applications.update(
id="id",
application_name="call-router",
webhook_event_url="https://example.com",
)
print(call_control_application.data)
Deletes a call control application.
DELETE /call_control_applications/{id}
call_control_application = client.call_control_applications.delete(
"id",
)
print(call_control_application.data)
Filters call events by given filter parameters.
GET /call_events
page = client.call_events.list()
page = page.data[0]
print(page.call_leg_id)
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 |
|-------|-------------|
| callAnswered | Call Answered |
| callStreamingStarted | Call Streaming Started |
| callStreamingStopped | Call Streaming Stopped |
| callStreamingFailed | Call Streaming Failed |
| callBridged | Call Bridged |
| callInitiated | Call Initiated |
| callHangup | Call Hangup |
| callRecordingSaved | Call Recording Saved |
| callMachineDetectionEnded | Call Machine Detection Ended |
| callMachineGreetingEnded | Call Machine Greeting Ended |
| callMachinePremiumDetectionEnded | Call Machine Premium Detection Ended |
| callMachinePremiumGreetingEnded | Call Machine Premium Greeting Ended |
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.