VoiceML: <Redirect>¶
The <Redirect> action transfers control of the call to another URI.
Attributes¶
The <Redirect> action does not support any attributes.
Body¶
The following is supported for the body of <Redirect>.
| Type | Description |
|---|---|
| plain text | The relative or absolute URI to transfer control to. |
Examples¶
Example 1: Transfer control to a different handler¶
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Redirect>different-handler.php</Redirect>
</Response>
Tips and Tricks¶
- In addition to
httpandhttpsURIs, you may also redirect totelandsipURIs. This behaves the same as using the<Call>action and can be useful in certain use-cases. - The relative URIs
exampleand./examplebehave the same way. If you are using a colon towards the start of a relative URI (egmy:uri), you may encounter an invalid scheme error. To disambiguate your relative URI, add the./prefix (eg./my:uri). - Make sure your URL is properly XML serialized (eg
&should be serialized as&).