Add Telnyx media streaming plugin
Why
Vision Agents already has a Twilio phone plugin and phone examples. Telnyx also supports WebSocket media streaming with PCMU, PCMA, L16, and bidirectional RTP, so this adds a parallel carrier media bridge without changing core agent APIs.
Reference: https://developers.telnyx.com/docs/voice/programmable-voice/media-streaming
Changes
- Add
vision-agents-plugins-telnyxas a workspace package and optionalvision-agents[telnyx]extra - Add Telnyx media stream WebSocket handling for
connected,start,media,stop,error,mark, anddtmfevents - Add PCMU, PCMA, and L16 RTP payload conversion helpers using Vision Agents
PcmData - Add a Telnyx call registry and
attach_phone_to_callbridge matching the existing Twilio plugin shape - Add tests for audio conversion, registry behavior, media stream receive, and bidirectional audio send
Testing
uv run ruff check plugins/telnyx agents-core/pyproject.toml pyproject.toml README.mduv run ruff format --check plugins/telnyxuv run pytest plugins/twilio/tests plugins/telnyx/testsgit diff --check- secret scan over the diff found no matches
No actionable comments were generated in the recent review. đ
âšī¸ Recent review info
âī¸ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 774adc34-28d3-4e69-824d-0b6f83050a7a
đĨ Commits
Reviewing files that changed from the base of the PR and between 851dbaf06e575352932979015969dc9a82889b5a and 82aedc781d67c0d478c4af707d5281263cad5637.
â Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
đ Files selected for processing (3)
README.mdagents-core/pyproject.tomlpyproject.toml
â Files skipped from review due to trivial changes (2)
- README.md
- pyproject.toml
đ§ Files skipped from review as they are similar to previous changes (1)
- agents-core/pyproject.toml
đ Walkthrough
Walkthrough
This PR adds a complete Telnyx plugin to Vision-Agents, enabling bidirectional audio integration for Telnyx voice calls. The plugin includes workspace configuration updates, audio codec conversion for PCMU/PCMA/L16 RTP payloads, an in-memory call registry with lifecycle management and token validation, a WebSocket-based media stream handler that bridges Telnyx and GetStream RTC audio, RTC call attachment for bidirectional audio forwarding, and comprehensive unit tests. The implementation also updates the main README to reflect Telnyx support alongside existing Twilio integration.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
Hi thank you for your PR, our team is reviewing and will follow up.
@a692570 - can you have a look at the remarks from Coderabbit?
@Nash0x7E2 thanks for the nudge. I addressed the CodeRabbit remarks in the latest branch updates.
Covered:
- removed caller and callee phone numbers from info logs
- gated outbound Telnyx audio until the start frame is parsed
- recreated the audio track from the negotiated media format
- added RTC cleanup when the Telnyx media stream closes
- added tests for negotiation, gated send, and cleanup
- merged current main to clear the PR conflict
Local checks passed:
uv lock --checkuv run pytest plugins/telnyx/tests/test_telnyx.py plugins/telnyx/tests/test_audio.pyuv run ruff check plugins/telnyx && uv run ruff format --check plugins/telnyxuv run mypy plugins/telnyx
CodeRabbit is passing now and the PR is no longer conflicted. GitHub still shows the PR as blocked because the fork PR CI workflows appear to need maintainer approval/action.