Redirect

View as Markdown

An example that redirects the next XML instruction to another call:

1<?xml version="1.0" encoding="UTF-8"?>
2<Response>
3 <Redirect>https://www.your-application.com/next-instructions</Redirect>
4</Response>

The <Redirect> verb transfers control from the current call to another. It is effectively an exit statement from the current call, as there is no way to return to any instructions listed after the <Redirect> verb.

Verb attributes

The following attribute is available for the verb <Redirect>:

method
stringDefaults to POST

Specifies whether the redirect is a GET or a POST.

Nouns

The following item is accepted as a noun for the <Redirect> verb:

NounDescription
plain textThe URL, in plain text, of the call to execute.

Nesting

No other verbs can be nested within <Redirect> and you cannot nest <Redirect> within any other verbs.

Examples

Redirect to absolute URL

1<?xml version="1.0" encoding="UTF-8"?>
2<Response>
3 <Dial>310-123-0000</Dial>
4 <Redirect>http://www.your-application.com/next-instructions</Redirect>
5</Response>

SignalWire makes a request after the number has been dialed and transfers the call to the XML received through the request.