- Node
- Ruby
- Python
- PHP
- .NET
- Java
- Go
Overview
Plivo passes the call status of an ongoing call so you can decide how to process it. For all the calls made using Plivo’s Make a Call API or Dial XML, Plivo sends the call status to the application server at different stages of a call. We send call status as an HTTP webhook request to URLs such asring_url, answer_url, fallback_url, action_url, callback_url, and hangup_url.In each callback, the CallStatus parameter takes one of these values:| in-progress | The call was answered and is in progress. Calls with this status can be terminated using the Hangup API. |
| completed | The call was completed, terminated either by the Hangup API or by one of the parties in the call. |
| ringing | The call is ringing. This status is sent to the Ring URL. |
| no-answer | The call was not answered. |
| busy | The called line is busy. |
| cancel | The call was canceled by the caller. |
| timeout | There was a timeout while connecting your call, caused by either an issue with one of the terminating carriers or network lag in our system. |
| Parameter | Description |
|---|---|
DialRingStatus | Indicates whether the dial attempt rang or not. Values: true, false |
DialHangupCause | The standard telephony hangup cause. |
DialStatus | Status of the dial. Values: completed, busy, failed, timeout, no-answer |
DialALegUUID | CallUUID of the A leg. |
DialBLegUUID | CallUUID of the B leg. Empty if nobody answers. |
- Using XML
How it works

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 Node.js development environment and a web server and safely expose that server to the internet.Create an Express server for dial status reporting
Create a file calleddial_status.js and paste into it this code.var plivo = require('plivo');
var express = require('express');
var app = express();
app.set('port', (process.env.PORT || 5000));
app.use(express.static(__dirname + '/public'));
app.all('/dialstatus/', function(request, response) {
var r = plivo.Response();
var params = {
'action': "https://<yourdomain>.com/dialstatus/action/",
'method': "POST",
'redirect': "true"
};
var dial = r.addDial(params);
var first_number = "<phone_number>";
dial.addNumber(first_number);
console.log (r.toXML());
response.set({
'Content-Type': 'text/xml'
});
response.end(r.toXML());
});
app.all('/dialstatus/action/', function(request, response) {
var status = request.param('Status');
var aleg = request.param('DialALegUUID');
var bleg = request.param('DialBLegUUID');
console.log ('Status : ' + status + ' Aleg UUID : ' + aleg + ' Bleg UUID : ' + bleg);
});
app.listen(app.get('port'), function() {
console.log('Node app is running on port', app.get('port'));
});
true, which tells Plivo to expect a valid XML document to be posted to https://<yourdomain>.com/dialstatus/action. The code creates an XML document with a Dial XML element.Create a Plivo application for dial status reporting
Associate the Express server you created with Plivo by creating a Plivo application. Visit Voice > Applications in the Plivo console and click on Add New Application, or use Plivo’s Application API.Give your application a name — we called oursDial Status Report. Enter the server URL you want to use (for example https://<yourdomain>.com/dialstatus/) in the Answer URL field and set the method to POST. Click on Create Application to save your application.
Assign a Plivo number to your application
Navigate to the Numbers page and select the phone number you want to use for this application.From the Application Type drop-down, selectXML Application.From the Plivo Application drop-down, select Dial Status Report (the name we gave the application).Click Update Number to save.
Test
Make a call to your Plivo number using any phone. Plivo will send a request to the answer URL you provided requesting an XML response and then process the call according to the instructions in the XML document the server provides, and call details will be posted to your application server via the action and callback URLs you configured throughout the course of the call.Overview
Plivo passes the call status of an ongoing call so you can decide how to process it. For all the calls made using Plivo’s Make a Call API or Dial XML, Plivo sends the call status to the application server at different stages of a call. We send call status as an HTTP webhook request to URLs such asring_url, answer_url, fallback_url, action_url, callback_url, and hangup_url.In each callback, the CallStatus parameter takes one of these values:| in-progress | The call was answered and is in progress. Calls with this status can be terminated using the Hangup API. |
| completed | The call was completed, terminated either by the Hangup API or by one of the parties in the call. |
| ringing | The call is ringing. This status is sent to the Ring URL. |
| no-answer | The call was not answered. |
| busy | The called line is busy. |
| cancel | The call was canceled by the caller. |
| timeout | There was a timeout while connecting your call, caused by either an issue with one of the terminating carriers or network lag in our system. |
| Parameter | Description |
|---|---|
DialRingStatus | Indicates whether the dial attempt rang or not. Values: true, false |
DialHangupCause | The standard telephony hangup cause. |
DialStatus | Status of the dial. Values: completed, busy, failed, timeout, no-answer |
DialALegUUID | CallUUID of the A leg. |
DialBLegUUID | CallUUID of the B leg. Empty if nobody answers. |
- Using XML
How it works

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 Ruby development environment and a web server and safely expose that server to the internet.Create a Rails controller for dial status reporting
Change to the project directory and run this command to create a Rails controller to reject incoming calls.$ rails generate controller Plivo voice
$ rm app/views/plivo/voice.html.erb
include Plivo
include Plivo::XML
include Plivo::Exceptions
class PlivoController < ApplicationController
def dialstatus
r = Response.new()
params = {
'action' => "https://<yourdomain>.com/dialstatus/action/", # Redirect to this URL after leaving Dial.
'method' => 'GET' # Submit to action URL using GET or POST.
}
r.addSpeak("Connecting your call..")
d = r.addDial(params)
d.addNumber("<phone_number>")
xml = Plivo::PlivoXML.new(r)
render xml: xml.to_xml
end
def dialstatusaction
status = params[:DialStatus]
aleg = params[:DialALegUUID]
bleg = params[:DialBLegUUID]
puts "Status : #{status}, ALeg UUID : #{aleg}, BLeg UUID : #{bleg}"
end
end
true, which tells Plivo to expect a valid XML document to be posted to https://<yourdomain>.com/dialstatus/action. The code creates an XML document with a Dial XML element.Create a Plivo application for dial status reporting
Associate the Rails controller you created with Plivo by creating a Plivo application. Visit Voice > Applications in the Plivo console and click on Add New Application, or use Plivo’s Application API.Give your application a name — we called oursDial Status Report. Enter the server URL you want to use (for example https://<yourdomain>.com/dialstatus/) in the Answer URL field and set the method to POST. Click on Create Application to save your application.
Assign a Plivo number to your application
Navigate to the Numbers page and select the phone number you want to use for this application.From the Application Type drop-down, selectXML Application.From the Plivo Application drop-down, select Dial Status Report (the name we gave the application).Click Update Number to save.
Test
Make a call to your Plivo number using any phone. Plivo will send a request to the answer URL you provided requesting an XML response and then process the call according to the instructions in the XML document the server provides, and call details will be posted to your application server via the action and callback URLs you configured throughout the course of the call.Overview
Plivo passes the call status of an ongoing call so you can decide how to process it. For all the calls made using Plivo’s Make a Call API or Dial XML, Plivo sends the call status to the application server at different stages of a call. We send call status as an HTTP webhook request to URLs such asring_url, answer_url, fallback_url, action_url, callback_url, and hangup_url.In each callback, the CallStatus parameter takes one of these values:| in-progress | The call was answered and is in progress. Calls with this status can be terminated using the Hangup API. |
| completed | The call was completed, terminated either by the Hangup API or by one of the parties in the call. |
| ringing | The call is ringing. This status is sent to the Ring URL. |
| no-answer | The call was not answered. |
| busy | The called line is busy. |
| cancel | The call was canceled by the caller. |
| timeout | There was a timeout while connecting your call, caused by either an issue with one of the terminating carriers or network lag in our system. |
| Parameter | Description |
|---|---|
DialRingStatus | Indicates whether the dial attempt rang or not. Values: true, false |
DialHangupCause | The standard telephony hangup cause. |
DialStatus | Status of the dial. Values: completed, busy, failed, timeout, no-answer |
DialALegUUID | CallUUID of the A leg. |
DialBLegUUID | CallUUID of the B leg. Empty if nobody answers. |
- Using XML
How it works

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 Python development environment and a web server and safely expose that server to the internet.Create a Flask application for dial status reporting
Create a file calleddial_status.py and paste into it this code.from flask import Flask, request, Response
from plivo import plivoxml
app=Flask(__name__)
@app.route('/dialstatus/', methods=['GET','POST'])
def dial_xml():
# Generate Dial XML
response = plivoxml.ResponseElement()
response.add(plivoxml.SpeakElement('Connecting your call..'))
response.add(plivoxml.DialElement(action='https://<yourdomain>.com/dialstatus/action/', method='POST', redirect=True)
.add(plivoxml.NumberElement("<phone_number>")))
return Response(response.to_string(), mimetype='application/xml')
@app.route('/dialstatus/action/', methods=['GET','POST'])
def dial_status():
# After completion of the call, Plivo will report back the status to the action URL in the Dial XML.
status = request.args.get('DialStatus')
aleg = request.args.get('DialALegUUID')
bleg = request.args.get('DialBLegUUID')
print "Status : %s, ALeg Uuid : %s, BLeg Uuid : %s" % (status,aleg,bleg)
return "Dial status reported"
if __name__ == '__main__':
app.run(host='0.0.0.0', debug=True)
true, which tells Plivo to expect a valid XML document to be posted to https://<yourdomain>.com/dialstatus/action. The code creates an XML document with a Dial XML element.Create a Plivo application for dial status reporting
Associate the Flask application you created with Plivo by creating a Plivo application. Visit Voice > Applications in the Plivo console and click on Add New Application, or use Plivo’s Application API.Give your application a name — we called oursDial Status Report. Enter the server URL you want to use (for example https://<yourdomain>.com/dialstatus/) in the Answer URL field and set the method to POST. Click on Create Application to save your application.
Assign a Plivo number to your application
Navigate to the Numbers page and select the phone number you want to use for this application.From the Application Type drop-down, selectXML Application.From the Plivo Application drop-down, select Dial Status Report (the name we gave the application).Click Update Number to save.
Test
Make a call to your Plivo number using any phone. Plivo will send a request to the answer URL you provided requesting an XML response and then process the call according to the instructions in the XML document the server provides, and call details will be posted to your application server via the action and callback URLs you configured throughout the course of the call.Overview
Plivo passes the call status of an ongoing call so you can decide how to process it. For all the calls made using Plivo’s Make a Call API or Dial XML, Plivo sends the call status to the application server at different stages of a call. We send call status as an HTTP webhook request to URLs such asring_url, answer_url, fallback_url, action_url, callback_url, and hangup_url.In each callback, the CallStatus parameter takes one of these values:| in-progress | The call was answered and is in progress. Calls with this status can be terminated using the Hangup API. |
| completed | The call was completed, terminated either by the Hangup API or by one of the parties in the call. |
| ringing | The call is ringing. This status is sent to the Ring URL. |
| no-answer | The call was not answered. |
| busy | The called line is busy. |
| cancel | The call was canceled by the caller. |
| timeout | There was a timeout while connecting your call, caused by either an issue with one of the terminating carriers or network lag in our system. |
| Parameter | Description |
|---|---|
DialRingStatus | Indicates whether the dial attempt rang or not. Values: true, false |
DialHangupCause | The standard telephony hangup cause. |
DialStatus | Status of the dial. Values: completed, busy, failed, timeout, no-answer |
DialALegUUID | CallUUID of the A leg. |
DialBLegUUID | CallUUID of the B leg. Empty if nobody answers. |
- Using XML
How it works

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 PHP development environment and a web server and safely expose that server to the internet.Create a Laravel controller for dial status reporting
Create a file calleddial_status.php and paste into it this code.<?php
namespace App\Http\Controllers;
require '../../vendor/autoload.php';
use Plivo\RestClient;
use Plivo\XML\Response;
use Illuminate\Http\Request;
class VoiceController extends Controller
{
// Speak XML to handle your first incoming call
public function dialStatus()
{
$r = new Response();
// Add Speak tag
$body = "Connecting your call..";
$r->addSpeak($body);
$params = array(
'action' => 'https://<yourdomain>.com/dial_action/', # Redirect to this URL after leaving Dial.
'method' => 'GET' # Submit to action URL using GET or POST.
);
// Add Dial tag
$d = $r->addDial($params);
$number = "<phone_number>";
$d->addNumber($number);
Header('Content-type: text/xml');
echo($r->toXML());
}
// Action URL Block
public function dialstatusAction()
{
// Print the Dial Details
$status = $_REQUEST['DialStatus'];
$aleg = $_REQUEST['DialALegUUID'];
$bleg = $_REQUEST['DialBLegUUID'];
echo "Status = $status , Aleg UUID = $aleg , Bleg UUID = $bleg";
}
}
true, which tells Plivo to expect a valid XML document to be posted to https://<yourdomain>.com/dialstatus/action. The code creates an XML document with a Dial XML element.Create a Plivo application for dial status reporting
Associate the Laravel controller you created with Plivo by creating a Plivo application. Visit Voice > Applications in the Plivo console and click on Add New Application, or use Plivo’s Application API.Give your application a name — we called oursDial Status Report. Enter the server URL you want to use (for example https://<yourdomain>.com/dialstatus/) in the Answer URL field and set the method to POST. Click on Create Application to save your application.
Assign a Plivo number to your application
Navigate to the Numbers page and select the phone number you want to use for this application.From the Application Type drop-down, selectXML Application.From the Plivo Application drop-down, select Dial Status Report (the name we gave the application).Click Update Number to save.
Test
Make a call to your Plivo number using any phone. Plivo will send a request to the answer URL you provided requesting an XML response and then process the call according to the instructions in the XML document the server provides, and call details will be posted to your application server via the action and callback URLs you configured throughout the course of the call.Overview
Plivo passes the call status of an ongoing call so you can decide how to process it. For all the calls made using Plivo’s Make a Call API or Dial XML, Plivo sends the call status to the application server at different stages of a call. We send call status as an HTTP webhook request to URLs such asring_url, answer_url, fallback_url, action_url, callback_url, and hangup_url.In each callback, the CallStatus parameter takes one of these values:| in-progress | The call was answered and is in progress. Calls with this status can be terminated using the Hangup API. |
| completed | The call was completed, terminated either by the Hangup API or by one of the parties in the call. |
| ringing | The call is ringing. This status is sent to the Ring URL. |
| no-answer | The call was not answered. |
| busy | The called line is busy. |
| cancel | The call was canceled by the caller. |
| timeout | There was a timeout while connecting your call, caused by either an issue with one of the terminating carriers or network lag in our system. |
| Parameter | Description |
|---|---|
DialRingStatus | Indicates whether the dial attempt rang or not. Values: true, false |
DialHangupCause | The standard telephony hangup cause. |
DialStatus | Status of the dial. Values: completed, busy, failed, timeout, no-answer |
DialALegUUID | CallUUID of the A leg. |
DialBLegUUID | CallUUID of the B leg. Empty if nobody answers. |
- Using XML
How it works

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 .NET development environment and a web server and safely expose that server to the internet.Create an MVC controller for dial status reporting
Navigate to the Controllers directory in the Dialstatus app. Create a Controller namedDialstatusController.cs and paste into it this code.using System;
using System.Collections.Generic;
using Plivo.XML;
using Microsoft.AspNetCore.Mvc;
namespace Dialstatus.Controllers
{
public class DialstatusController : Controller
{
// GET: /<controller>/
public IActionResult Index()
{
Plivo.XML.Response resp = new Plivo.XML.Response();
// Generate Dial XML
Plivo.XML.Dial dial = new Plivo.XML.Dial(new Dictionary<string, string>()
{
{"action","https://<yourdomain>.com/dialstatus/action/"}, // Redirect to this URL after leaving Dial.
{"method","GET"} // Submit to action URL using GET or POST.
});
dial.AddNumber("<phone_number>", new Dictionary<string, string>() { });
resp.Add(dial);
var output = resp.ToString();
return this.Content(output, "text/xml");
}
//Action URL
public String Action()
{
var status = Request.Query["DialStatus"];
var aleg = Request.Form["DialALegUUID"];
var bleg = Request.Form["DialBLegUUID"];
Debug.WriteLine("Status : {0}, ALeg UUID : {1}, BLeg UUID : {2}", status, aleg, bleg);
return "OK";
}
}
}
true, which tells Plivo to expect a valid XML document to be posted to https://<yourdomain>.com/dialstatus/action. The code creates an XML document with a Dial XML element.Create a Plivo application for dial status reporting
Associate the controller you created with Plivo by creating a Plivo application. Visit Voice > Applications in the Plivo console and click on Add New Application, or use Plivo’s Application API.Give your application a name — we called oursDial Status Report. Enter the server URL you want to use (for example https://<yourdomain>.com/dialstatus/) in the Answer URL field and set the method to POST. Click on Create Application to save your application.
Assign a Plivo number to your application
Navigate to the Numbers page and select the phone number you want to use for this application.From the Application Type drop-down, selectXML Application.From the Plivo Application drop-down, select Dial Status Report (the name we gave the application).Click Update Number to save.
Test
Make a call to your Plivo number using any phone. Plivo will send a request to the answer URL you provided requesting an XML response and then process the call according to the instructions in the XML document the server provides, and call details will be posted to your application server via the action and callback URLs you configured throughout the course of the call.Overview
Plivo passes the call status of an ongoing call so you can decide how to process it. For all the calls made using Plivo’s Make a Call API or Dial XML, Plivo sends the call status to the application server at different stages of a call. We send call status as an HTTP webhook request to URLs such asring_url, answer_url, fallback_url, action_url, callback_url, and hangup_url.In each callback, the CallStatus parameter takes one of these values:| in-progress | The call was answered and is in progress. Calls with this status can be terminated using the Hangup API. |
| completed | The call was completed, terminated either by the Hangup API or by one of the parties in the call. |
| ringing | The call is ringing. This status is sent to the Ring URL. |
| no-answer | The call was not answered. |
| busy | The called line is busy. |
| cancel | The call was canceled by the caller. |
| timeout | There was a timeout while connecting your call, caused by either an issue with one of the terminating carriers or network lag in our system. |
| Parameter | Description |
|---|---|
DialRingStatus | Indicates whether the dial attempt rang or not. Values: true, false |
DialHangupCause | The standard telephony hangup cause. |
DialStatus | Status of the dial. Values: completed, busy, failed, timeout, no-answer |
DialALegUUID | CallUUID of the A leg. |
DialBLegUUID | CallUUID of the B leg. Empty if nobody answers. |
- Using XML
How it works

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 Spark application for dial status reporting
Create a Java class namedDialStatus and paste into it this code.import static spark.Spark.*;
import com.plivo.api.xml.Dial;
import com.plivo.api.xml.Number;
import com.plivo.api.xml.Response;
public class dialstatus {
public static void main(String[] args) {
post("/dialstatus/", (request, response) -> {
response.type("application/xml");
Response resp = new Response()
.children(
new Dial()
.action("https://<yourdomain>.com/dialstatus/action/")
.method("POST")
.redirect(true)
.children(
new Number("<phone_number>")
)
);
return resp.toXmlString();
});
post("/dialstatus/action/", (request, response) -> {
String status = request.queryParams("Status");
String aleg = request.queryParams("DialALegUUID");
String bleg = request.queryParams("DialBLegUUID");
System.out.println("Status : " + status + " ALeg UUID : " + aleg + " Bleg UUID : " + bleg);
response.raw().getWriter().print("Status : " + status + " ALeg UUID : " + aleg + " Bleg UUID : " + bleg);
return "done";
});
}
}
true, which tells Plivo to expect a valid XML document to be posted to https://<yourdomain>.com/dialstatus/action. The code creates an XML document with a Dial XML element.Create a Plivo application for dial status reporting
Associate the Spark application you created with Plivo by creating a Plivo application. Visit Voice > Applications in the Plivo console and click on Add New Application, or use Plivo’s Application API.Give your application a name — we called oursDial Status Report. Enter the server URL you want to use (for example https://<yourdomain>.com/dialstatus/) in the Answer URL field and set the method to POST. Click on Create Application to save your application.
Assign a Plivo number to your application
Navigate to the Numbers page and select the phone number you want to use for this application.From the Application Type drop-down, selectXML Application.From the Plivo Application drop-down, select Dial Status Report (the name we gave the application).Click Update Number to save.
Test
Make a call to your Plivo number using any phone. Plivo will send a request to the answer URL you provided requesting an XML response and then process the call according to the instructions in the XML document the server provides, and call details will be posted to your application server via the action and callback URLs you configured throughout the course of the call.Overview
Plivo passes the call status of an ongoing call so you can decide how to process it. For all the calls made using Plivo’s Make a Call API or Dial XML, Plivo sends the call status to the application server at different stages of a call. We send call status as an HTTP webhook request to URLs such asring_url, answer_url, fallback_url, action_url, callback_url, and hangup_url.In each callback, the CallStatus parameter takes one of these values:| in-progress | The call was answered and is in progress. Calls with this status can be terminated using the Hangup API. |
| completed | The call was completed, terminated either by the Hangup API or by one of the parties in the call. |
| ringing | The call is ringing. This status is sent to the Ring URL. |
| no-answer | The call was not answered. |
| busy | The called line is busy. |
| cancel | The call was canceled by the caller. |
| timeout | There was a timeout while connecting your call, caused by either an issue with one of the terminating carriers or network lag in our system. |
| Parameter | Description |
|---|---|
DialRingStatus | Indicates whether the dial attempt rang or not. Values: true, false |
DialHangupCause | The standard telephony hangup cause. |
DialStatus | Status of the dial. Values: completed, busy, failed, timeout, no-answer |
DialALegUUID | CallUUID of the A leg. |
DialBLegUUID | CallUUID of the B leg. Empty if nobody answers. |
- Using XML
How it works

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 Go development environment and a web server and safely expose that server to the internet.Create a Go application for dial status reporting
Create a file calleddial_status.go and paste into it this code.package main
import (
"github.com/go-martini/martini"
"github.com/plivo/plivo-go/v7/xml"
"net/http"
)
func main() {
m := martini.Classic()
m.Post("/dialstatus/", func(w http.ResponseWriter, r *http.Request) string {
w.Header().Set("Content-Type", "application/xml")
response := xml.ResponseElement{
Contents: []interface{}{
new(xml.DialElement).
SetAction("https://<yourdomain>.com/dialstatus/action/").
SetMethod("POST").
SetRedirect(true).
SetContents([]interface{}{
new(xml.NumberElement).
SetContents("<phone_number>"),
}),
},
}
return response.String()
})
m.Post("/dialstatus/action", func(w http.ResponseWriter, r *http.Request) string {
status := r.FormValue("DialStatus")
aleg := r.FormValue("DialALegUUID")
bleg := r.FormValue("DialBLegUUID")
result := status + " " + aleg + " " + bleg
return result
})
m.Run()
}
true, which tells Plivo to expect a valid XML document to be posted to https://<yourdomain>.com/dialstatus/action. The code creates an XML document with a Dial XML element.Create a Plivo application for dial status reporting
Associate the Go application you created with Plivo by creating a Plivo application. Visit Voice > Applications in the Plivo console and click on Add New Application, or use Plivo’s Application API.Give your application a name — we called oursDial Status Report. Enter the server URL you want to use (for example https://<yourdomain>.com/dialstatus/) in the Answer URL field and set the method to POST. Click on Create Application to save your application.
Assign a Plivo number to your application
Navigate to the Numbers page and select the phone number you want to use for this application.From the Application Type drop-down, selectXML Application.From the Plivo Application drop-down, select Dial Status Report (the name we gave the application).Click Update Number to save.