Plivo RESTXML is a small set of specific XML elements that can control a call. This set is referred to as Plivo Elements.

Plivo Elements comprises of the following:
<Dial>, <GetDigits>, <GetSpeech>, <Hangup>, <Play>, <PreAnswer>, <Record>, <Redirect>, <Speak>, <Wait>, <Conference>.

These act as a replacement for complex telephony functions. The elements, can be combined in different ways, to perform complex actions. This is generally used to control an incoming call to the telephony engine. E.g. A customer calls and a dynamic IVR menu needs to be played. OR You may want to record a voicemail for an incoming call to a phone number.

The below diagram outlines a typical case where RESTXML is used and how Plivo works in such cases:

When an incoming call is received, Plivo looks up the Answer URL and makes a request to that URL. The web application at that URL responds to the request and decides how the call should proceed by returning a RESTXML document with instructions for Plivo.

Outgoing calls can also be controlled in the same manner as incoming calls using RESTXML. The initial outbound call is made through a RESTAPI request; and once the call gets answered, Plivo calls the web app on the Answer URL which carries instructions on how the outbound call should be handled.


How Plivo communicates with your Web App

By default, RESTXML requests to your application are made via POST. However, you can configure Plivo to make its RESTXML requests to your application via HTTP GET or POST either by using the attribute ‘method’ in the Plivo Elements or by changing the config parameter in Plivo.

Comments are closed.