Skip to main content

<Redirect>

The <Redirect> verb transfers control of a call to the VoXML at a different URL. All verbs after <Redirect> are unreachable and ignored.

<Redirect> Attributes

<Redirect> supports the following attributes that change its behavior:

AttributeAllowed ValuesDefault Value
historydisable, compact, fulldisable
methodGET, POSTPOST

history

The history attribute determines if the <Redirect> verb should be logged in the history array of the CDR. The default is to not log.

For <Redirect>, the compact and full values log the following payload to the history array respectively.

compact

{
"payload": {
"url": "/next"
}
}

full

{
"payload": {
"url": "/next",
"method": "POST"
}
}

method

The method attribute determines what HTTP method will be used when making the request to the provided URL.

<Redirect> Nouns

The absolute or relative URL for a different VoXML document.

Relative URLs are constructed according to RFC 3986 Section 5.2, where the base URL is taken from the working VoXML document. Some examples for convenience:

Base URLRelative URLAbsolute URL
https://fake.com/nexthttps://fake.com/next
https://fake.com/file/path/https://fake.com/
https://fake.com/file/path./newhttps://fake.com/file/new

<Redirect> Examples

Absolute URL Usage

Welcome the user and redirect to an absolute URL.

<Response>
<Say>Hello.</Set>
<Redirect>https://www.example.com/next</Redirect>
</Response>

Relative URL Usage

Welcome the user and redirect to a relative URL.

<Response>
<Say>Hello.</Set>
<Redirect>/next</Redirect>
</Response>