Skip to main content
Get started with Plivo Voice in minutes. This guide walks you through making your first outbound call and receiving incoming calls.

Prerequisites

Before you begin:
  1. Sign up for a Plivo account (free trial includes credits)
  2. Note your Auth ID and Auth Token from the console dashboard
  3. Rent a phone number for receiving calls

Install the SDK

For web framework support, also install Flask:

Make an Outbound Call

Create a call from your Plivo number to any phone number. When the call is answered, Plivo fetches XML instructions from your answer_url.
Outbound call flow
The sample answer.xml file plays a message:
Replace this URL with your own server endpoint to control call behavior dynamically.

Receive an Incoming Call

Set up a web server to handle incoming calls. When someone calls your Plivo number, Plivo sends a request to your Answer URL and executes the XML instructions you return.
Inbound call flow
Run: python app.py

Expose Your Server

Use ngrok to expose your local server to the internet:
Copy the HTTPS forwarding URL (e.g., https://abc123.ngrok.io).

Configure Your Number

  1. Go to Voice Applications in the Plivo console
  2. Click Add New Application
  3. Set the Answer URL to your ngrok URL + /answer/ (e.g., https://abc123.ngrok.io/answer/)
  4. Save the application
  5. Go to Active Numbers
  6. Select your number and assign your application
Now call your Plivo number to hear the greeting!

Forward a Call

Dial another number when receiving an incoming call.

Next Steps

Call API Reference

Complete API documentation for managing calls

XML Reference

All XML elements for call control

Use Cases

Common voice application patterns

Webhooks

Handle call events in real-time

Framework-Specific Guides

For detailed setup with specific frameworks:

Environment Variables

Store credentials securely using environment variables:
All Plivo SDKs automatically read these variables when you initialize the client without arguments: