The <Redirect/> Element

This element transfers control of a call to a different URL and expects to receive a new XML document. It is possible to specify list of URLs separated by commas to permit fallback. See XML Fetch Fallback Any elements after <Redirect/> are ignored as the control of the call will be transfered to the new document.

Element Attributes

The <Redirect/> element doesn't support any attributes.

Examples

Example 1

In this example, we have a <Redirect/> element after a <Speak/> element. When the <Speak/> element finishes, the <Redirect/> element executes. <Redirect/> makes an request to http://www.foo.com/nextInstructions and transfers the call control to the XML received in response to that request.

1
2
3
4
<IVR>
  <Speak voice="en-US-Standard-C">Please wait while your call is being transferred</Speak>
  <Redirect>http://www.foo.com/nextInstructions</Redirect>
</IVR>

Example 2

Passing control of the call to another IVR defined in XML file in the domain storage

1
2
3
4
<IVR>
  <Speak voice="en-US-Standard-C">Please wait.</Speak>
  <Redirect>file://some_ivr.xml</Redirect>
</IVR>

Example 3

Trying some HTTPS URLs and falling back to a file

1
2
3
4
<IVR>
  <Speak voice="en-US-Standard-C">Please wait.</Speak>
  <Redirect>https://xxx.com/myivr,https://yyy.com/myivr,file://myivr.xml</Redirect>
</IVR>

Example 4

Trying some HTTPS URLs and falling back to a Section in the current document (full URL schema for section is 'section://SECTION_NAME' but it is optional)

1
2
3
4
5
6
7
8
9
<IVR>
  <Section name="main">
    <Speak voice="en-US-Standard-C">Please wait.</Speak>
    <Redirect>https://xxx.com/myivr,https://yyy.com/myivr,fallback</Redirect>
  </Section>
  <Section name="fallback">
    <Speak voice="en-US-Standard-C">Sorry. Something went wrong. Please try again later.</Speak>
  </Section>
</IVR>