Connect ElevenLabs Agents to Vonage Voice API or Video API calls using a WebSocket connector application. This enables real-time, bi-directional audio streaming for use cases like PSTN calls, SIP trunks, and WebRTC clients.
The Node.js connector bridges Vonage and ElevenLabs:
user_transcript, agent_response, interruption).Clone the repository and set up the environment file.
Add your credentials to .env:
Install dependencies: npm install.
Use ngrok, or a similar service, to create a public URL for the connector (default port 6000).
Note the public Forwarding URL (e.g., xxxxxxxx.ngrok-free.app). Do not include https:// when configuring Vonage.
Your Vonage app needs to connect to the connector’s WebSocket endpoint (wss://YOUR_CONNECTOR_HOSTNAME/socket). This is the ngrok URL from step 3.
PROCESSOR_SERVER set to your connector’s hostname.connect action targeting the connector’s WebSocket URI (wss://...) with content-type: audio/l16;rate=16000. Pass necessary query parameters like peer_uuid and webhook_url.For production, deploy the connector to a stable hosting provider (e.g., Vonage Cloud Runtime) with a public hostname.