Documentation Index
Fetch the complete documentation index at: https://daily-docs-vonage-manual-subscribe.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
VonageVideoConnectorTransport provides real-time WebRTC audio and video communication using the Vonage Video API. It handles bidirectional media streams, participant management, and session lifecycle events, enabling you to build AI-powered applications that participate in Vonage Video sessions.
VonageVideoConnectorTransport API Reference
Pipecat’s API methods for Vonage Video Connector integration
Example Implementation
Complete Vonage Video Connector voice agent example
Vonage Video API Documentation
Official Vonage Video API documentation and guides
Vonage Dashboard
Sign up for Vonage API access and application management
Installation
To useVonageVideoConnectorTransport, install the required dependencies:
The
vonage-video-connector extra installs the Vonage Video Connector native
library, which is only available on Linux AMD64 and ARM64 with Python 3.13.Prerequisites
Vonage Account Setup
Before usingVonageVideoConnectorTransport, you need:
- Vonage Account: Sign up at Vonage Dashboard
- Application: Create a Vonage Video API application in the dashboard
- Session: Create a Vonage Video session (via the server SDK or REST API)
- Token: Generate a participant token for the session
Required Environment Variables
VONAGE_APPLICATION_ID: Your Vonage Video application IDVONAGE_SESSION_ID: The ID of the Video API session to joinVONAGE_TOKEN: A valid participant token for the session
Key Features
- Vonage Video API: Integrate with Vonage’s managed WebRTC infrastructure
- Audio and Video I/O: Bidirectional audio and video streaming
- Participant Management: Stream subscription and participant lifecycle events
- Auto-subscription: Optionally auto-subscribe to incoming audio and video streams
- Interruption Handling: Automatic media buffer clearing on pipeline interruptions
Configuration
VonageVideoConnectorTransport
Your Vonage Video API application identifier.
The ID of the Vonage Video session to connect to.
A valid participant token for the session.
Transport configuration parameters. See
VonageVideoConnectorTransportParams
below and
TransportParams
for inherited base parameters.
VonageVideoConnectorTransportParams
Inherits all parameters from TransportParams (audio, video settings) with these additional fields:Display name for the bot’s published stream in the session.
Whether to enable Opus Discontinuous Transmission (DTX) for the publisher
audio, which reduces bandwidth when no audio is being sent.
Whether to enable session migration, allowing the connection to survive
network changes.
Whether to automatically subscribe to incoming audio streams from session
participants.
Whether to automatically subscribe to incoming video streams from session
participants.
Preferred
(width, height) resolution for auto-subscribed video input
streams.Preferred framerate for auto-subscribed video input streams.
Whether to clear media buffers in the Vonage Video Connector when an
InterruptionFrame is received. Enable this for conversational AI
applications that need to stop playback immediately when the user interrupts;
disable it for recording or streaming scenarios where all media should be
preserved.Log level for the Vonage Video Connector native library. Accepted values:
"DEBUG", "INFO", "WARNING", "ERROR".SubscribeSettings
Used withsubscribe_to_stream() to control per-stream subscription quality when audio_in_auto_subscribe or video_in_auto_subscribe are disabled.
Whether to subscribe to the stream’s audio track.
Whether to subscribe to the stream’s video track.
Preferred
(width, height) resolution for the subscribed video track. The
server provides the closest available quality if the exact resolution is
unavailable.Preferred framerate for the subscribed video track.
Usage
VonageVideoConnectorTransport connects your Pipecat bot to a Vonage Video session where it can communicate with participants through audio and video streams. The transport handles session joining, stream subscription, and media conversion automatically.
Use pipecat.runner.vonage.configure() to read credentials from environment variables:
- Session credential configuration via environment variables
- Transport setup with audio input and output
- Pipeline integration with an LLM service
- Event handling to trigger the bot when a participant connects
Subscribing to streams manually
Whenaudio_in_auto_subscribe or video_in_auto_subscribe is disabled, subscribe to a specific participant’s stream with subscribe_to_stream(), passing SubscribeSettings to control which tracks are received and at what quality. The streamId is available from the on_participant_joined event data.
Event Handlers
VonageVideoConnectorTransport provides event handlers for session lifecycle, participant stream management, and subscriber connectivity. Register handlers using the @event_handler decorator on the transport instance.
Events Summary
| Event | Description |
|---|---|
on_joined | Bot joined the Vonage session |
on_left | Bot left the Vonage session |
on_error | Transport error occurred |
on_first_participant_joined | First participant stream joined the session (sync) |
on_participant_joined | A participant stream joined the session (sync) |
on_participant_left | A participant stream left the session |
on_client_connected | Transport connected to a participant’s stream (sync) |
on_client_disconnected | Transport disconnected from a participant’s stream |
Session Lifecycle
on_joined
Fired when the bot successfully connects to the Vonage Video session.| Parameter | Type | Description |
|---|---|---|
transport | VonageVideoConnectorTransport | The transport instance |
data | dict | Event data containing sessionId |
on_left
Fired when the bot disconnects from the Vonage Video session.| Parameter | Type | Description |
|---|---|---|
transport | VonageVideoConnectorTransport | The transport instance |
data | dict | Event data containing sessionId |
on_error
Fired when a transport-level error occurs.| Parameter | Type | Description |
|---|---|---|
transport | VonageVideoConnectorTransport | The transport instance |
error | str | Error description |
Participants
on_first_participant_joined
Fired when the first participant stream is received in the session. Commonly used to trigger the bot’s initial response.| Parameter | Type | Description |
|---|---|---|
transport | VonageVideoConnectorTransport | The transport instance |
data | dict | Event data containing sessionId, streamId, and connectionData |
This is a synchronous event — the session will not proceed until all
handlers complete. Keep handlers fast.
on_participant_joined
Fired when any participant stream is received in the session.| Parameter | Type | Description |
|---|---|---|
transport | VonageVideoConnectorTransport | The transport instance |
data | dict | Event data containing sessionId, streamId, and connectionData |
This is a synchronous event — the session will not proceed until all
handlers complete. Keep handlers fast.
Both
on_first_participant_joined and on_participant_joined fire for the
first stream. Use on_first_participant_joined if you only need to react
once.on_participant_left
Fired when a participant’s stream is dropped from the session.| Parameter | Type | Description |
|---|---|---|
transport | VonageVideoConnectorTransport | The transport instance |
data | dict | Event data containing sessionId, streamId, and connectionData |
Subscribers
on_client_connected
Fired when the transport successfully connects to a participant’s stream — at this point the subscription is established and media is flowing.| Parameter | Type | Description |
|---|---|---|
transport | VonageVideoConnectorTransport | The transport instance |
data | dict | Event data containing subscriberId, streamId, and connectionData |
This is a synchronous event — the session will not proceed until all
handlers complete. Keep handlers fast.
on_client_disconnected
Fired when the transport disconnects from a participant’s stream, either due to an explicit unsubscription or a connection drop.| Parameter | Type | Description |
|---|---|---|
transport | VonageVideoConnectorTransport | The transport instance |
data | dict | Event data containing subscriberId, streamId, and connectionData |
Additional Resources
- Events Overview - Overview of all events in Pipecat
- TransportParams - Base transport parameters reference