<Redirect> element transfers control of a call to a different URL and expects to receive a new RESTXML document. Any elements after
<Redirect> can not be processed.
Note: Currently, you must enter an absolute URL to transfer control of the call.
<Redirect> element supports the following attributes that modify its behavior:
|Attribute Name||Allowed Values||Default Value|
The ‘method’ attribute takes the value ‘GET’ or ‘POST’. This tells Plivo whether to request the
<Redirect> URL via HTTP GET or POST. ‘POST’ is the default.
Example 1: Absolute URL Redirect
In this example, we have a
<Redirect> element after a
<Speak> element with no URL. When the
<Speak> element finishes, the
<Redirect> element executes.
<Redirect> makes a request to http://www.foo.com/nextInstructions and transfers the call flow to the RESTXML received in response to that request.
1 2 3 4 5
<?xml version="1.0" encoding="UTF-8"?> <Response> <Speak>Please wait while you call is being transferred</Speak> <Redirect>http://www.foo.com/nextInstructions</Redirect> </Response>