XML: <Redirect>

The Redirect verb is used to redirect the current XML execution to another URL.


Attribute Description
redirectUrl (required) URL to request new BXML from. A Redirect event will be sent to this endpoint. May be a relative URL.
redirectMethod (optional) The HTTP method to use for the request to redirectUrl. GET or POST. Default Value is POST.
redirectFallbackUrl (optional) A fallback url which, if provided, will be used to retry the Redirect callback delivery in case redirectUrl fails to respond.
redirectFallbackMethod (optional) The HTTP method to use to deliver the Redirect callback to redirectFallbackUrl. GET or POST. Default value is POST.
username (optional) The username to send in the HTTP request to redirectUrl.
password (optional) The password to send in the HTTP request to redirectUrl.
fallbackUsername (optional) The username to send in the HTTP request to redirectFallbackUrl.
fallbackPassword (optional) The password to send in the HTTP request to redirectFallbackUrl.
tag (optional) A custom string that will be sent with this and all future callbacks unless overwritten by a future tag attribute or cleared.

May be cleared by setting tag=""

Max length 256 characters.

Callbacks Received

Callbacks Can reply with more BXML
Redirect Yes

Example 1 of 1: Redirect Verb

This shows how to use Bandwidth XML to redirect the response to a new url.

<?xml version="1.0" encoding="UTF-8"?>
   <Redirect redirectUrl="http://flow.url/newFlow" username='username' password='password'/>
   <!--Username and Password are not required, but are included to demonstrate adding multiple attributes to the redirect tag-->
Redirect redirect = Redirect.builder()

Response response = Response.builder().build()

Response response = new Response();

Redirect redirect = new Redirect();
redirect.RedirectUrl = "http://flow.url/newFlow";


response = Bandwidth::Voice::Response.new()
redirect = Bandwidth::Voice::Redirect.new({
    :redirect_url => "http://flow.url/newFlow"

puts response.to_bxml()
response = Response()
redirect = Redirect(

var redirect = new BandwidthBxml.Verbs.Redirect();

var response = new BandwidthBxml.Response();

$redirect = new BandwidthLib\Voice\Bxml\Redirect();

$response = new BandwidthLib\Voice\Bxml\Response();

echo $response->toBxml();
echo "\n";

results matching ""

    No results matching ""