1. Configure the demo
You’ll need Python 3.11 or later, uv, API keys for Deepgram, Google AI Studio, and Cartesia, and a voice-capable VoiceTel test number. From your terminal, run:
git clone https://github.com/voicetel/pipecat-voicetel-demo
cd pipecat-voicetel-demo
uv sync
cp .env.example .env
In .env, put your VoiceTel Account SID in TWILIO_ACCOUNT_SID and your VoiceML Auth Token in TWILIO_AUTH_TOKEN. Pipecat expects those variable names. Leave TWILIO_BASE_URL set to https://voiceml.voicetel.com so call control goes to VoiceTel. You don’t need a Twilio account.
Fill in DEEPGRAM_API_KEY, GOOGLE_API_KEY, and CARTESIA_API_KEY. Run uv run scripts/check_voicetel.py to check the VoiceTel credentials before starting the agent.
2. Listen to a reply locally
Start the server with uv run server.py. In a second terminal in the same directory, run uv run scripts/fake_caller.py. The script connects to the local WebSocket and saves the agent’s audio to recordings/caller_reply.wav. Play the file to check the reply before routing a phone call.
3. Route an inbound test call
- Give the server a public HTTPS address that supports WebSockets. For a temporary test tunnel, install
cloudflaredand runcloudflared tunnel --url http://localhost:7860. The demo also serves an outbound calling route,/dialout; block public access to that route for an inbound-only test. - Set
PUBLIC_URLin.envto the tunnel’s HTTPS origin. LeaveSTREAM_URLunset to use the local agent. SetVERIFY_WEBHOOKS=1to verify incoming voice webhook signatures, then restartserver.py. - In the VoiceTel portal, set the test number’s inbound voice webhook to the public origin plus the webhook path shown in the demo’s number configuration example. Select POST. The
/wspath is for audio; the server supplies it in its webhook response. - Dial the number. Listen for the greeting, ask a question, then interrupt the reply. The server log should show the incoming webhook followed by
Stream started.
If the webhook returns 403, check that PUBLIC_URL matches the public origin configured on the number and restart the server. If the stream starts but you hear silence, check the server log for provider key errors and repeat the local audio test.

