Telcoflow SDK
Python SDK for connecting to the Telcoflow Server, handling call events, managing media connections, and processing audio streams. These docs track the public telcoflow-sdk 0.24.0 package currently published on TestPyPI.
Features
- Dual authentication - Support for API key authentication in SANDBOX mode and mTLS certificates in PROD mode
- Automatic reconnection - Reconnects when the control connection drops
- Event-driven call handling - Decorator-based handlers for call events plus async iterators for audio streams
- Automatic media setup - Creates the media connection for you when a call arrives
- Bidirectional audio streaming - Send and receive raw PCM audio over the media connection
- Buffer management - Queue audio smoothly and clear pending playback on interruptions
Recommended Flow
The public 0.24.0 API is built around a small set of core patterns:
- Create a config with
TelcoflowClientConfig.sandbox(...)orTelcoflowClientConfig.production(...) - Start the client with
async with TelcoflowClient(config) as client - Register incoming-call handlers with
@client.on(events.INCOMING_CALL) - Work with each
ActiveCallusing methods likeanswer(),connect(),send_audio(),close(), anddisconnect(), noting thatclose()behaves differently before and afterconnect()
Next Steps
- Developer Onboarding - Gather the telco, phone number, WSS, firewall, and launch details needed before implementation
- Installation - Install the SDK and pin the version these docs describe
- Quick Start - Build a minimal
0.24.0app - Architecture - Understand the control and media connection model
