The Redirect
command transfers control of a Call to the PerCL at a different URL. Redirect
is a terminal command — any actions following it are never executed.
The maximum number of redirections allowed during the life time of a Call is 256. This is intended to prevent a Call from possibly looping infinitely due to errors in PerCL being generated.
Nesting Rules
No actions can be nested within Redirect
and Redirect
cannot be nested in any other actions.
Example
[
{
"Redirect" : {
"actionUrl" : "http://www.example.com/redirects"
}
}
]
Command Attributes
Redirect supports the following attributes that modify its behavior:
actionUrl
REQUIREDType: absolute URL
Default: null
URL to request a new PerCL script to continue with the current Call's processing. When Redirect invokes the actionUrl
, a redirect
Webhook is sent. This request therefore looks identical to the initial request (made to the voiceUrl
of the number that was called) for an inbound Call.
A PerCL response is expected to control the Call.