<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:
Attribute | Allowed Values | Default Value |
---|---|---|
history | disable , compact , full | disable |
method | GET , POST | POST |
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 URL | Relative URL | Absolute URL |
---|---|---|
https://fake.com | /next | https://fake.com/next |
https://fake.com/file/path | / | https://fake.com/ |
https://fake.com/file/path | ./new | https://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>