Basix Plivo XML Response

When a phone call comes in to Basix Plivo, Basix Plivo makes an HTTP request to the Answer URL . In your response to that request you can tell Plivo how to control the call.

Your web app at the Answer URL should respond to Plivo's request with XML. Plivo Elements can be categorized as follows: the parent element and the other children elements.

Basix Plivo XML Interpreter

When Plivo receives the XML, it executes the elements in order from top to bottom. As an example, the following XML snippet says "Good morning" to the caller before playing Trumpet.mp3 and hanging up (call will end as there is nothing else to be done).

<Response>
    <Speak voice="kal">Good morning</Speak>
    <Play>http://somewhere/sounds/Trumpet.mp3</Play>
</Response>

Plivo names are case-sensitive. For example, using <speak> instead of <Speak> will result in an error. Attribute name are also case sensitive and "camelCased".

If there is an error in the XML the call will terminate and the Answer URL will be notified with CallStatus=error and a parameter 'Error' with details. Ex: CallStatus=error&Error=Element+Speak+does+not+support+attribute+studio

When all elements are executed the call finishes (it is hung up). Unless the last element is a <Transfer>.

The Parent <Response> Element

The parent element of Plivo's XML is the <Response> element. All children elements must be nested within this element. Any other structure is considered invalid.

Example:

<Response>
    <Speak voice="rms">Good morning</Speak>
</Response>

Please refer to Plivo Elements for more details.