Skip to content

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 http and https URIs, you may also redirect to tel and sip URIs. This behaves the same as using the <Call> action and can be useful in certain use-cases.
  • The relative URIs example and ./example behave the same way. If you are using a colon towards the start of a relative URI (eg my: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 &amp;).