Documentation Index
Fetch the complete documentation index at: https://plivo.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Overview
You may want to have an application dial out for someone, so that it calls them on their phone, then connects them to the number they want. This involves three tasks:- Make an outbound call to a caller.
- When the call recipient answers the phone, place a new call to a different number (second user).
- Bridge the calls (first and second user) after the second user answers.
- Using XML
Here‘s how to connect a call to a second person using XML.Replace the auth placeholders with your authentication credentials from the Plivo console. Replace the phone number placeholders with actual phone numbers (for example, 12025551234).Save the file and run it.
You should see your basic server application in action at http://localhost:8080/outbound_call/.Set up ngrok to expose your local server to the internet.
Prerequisites
To get started, you need a Plivo account — sign up with your work email address if you don’t have one already. You must have a voice-enabled Plivo phone number to receive incoming calls; you can rent numbers from the Numbers page of the Plivo console, or by using the Numbers API. If this is your first time using Plivo APIs, follow our instructions to set up a Java development environment and a web server and safely expose that server to the internet.Create a Spring server to connect calls to a second person
Edit the PlivoVoiceApplication.java file in the src/main/java/com.example.demo/ folder and paste into it this code.Note: Here, the demo application name is PlivoVoiceApplication.java because we provided the friendly name
Plivo Voice in the Spring Initializr.
Note: We recommend that you store your credentials in the
auth_id and auth_token environment variables, to avoid the possibility of accidentally committing them to source control. If you do this, you can initialize the client with no arguments and Plivo will automatically fetch the values from the environment variables. You can use <a rel="nofollow" href="https://docs.oracle.com/javase/tutorial/essential/environment/env.html">System.getenv()</a> to store environment variables and retrieve them when initializing the client.