<transfer>

<transfer>

The <transfer> element directs the interpreter to connect the caller to another entity (e.g., telephone line or another voice application). During the transfer operation, the current interpreter session is suspended.

Attributes

Name
Data type
Description

name

String

Stores the outcome of a bridge transfer attempt.

cond

Boolean

(defaults to true) An expression that must evaluate to true in order for the form item to be visited.

expr

String

The initial value of the form item variable. The default is ECMAScript undefined.

If initialized to a value, then the form item will not be visited unless the form item variable is cleared.

dest

String

The telephone number of the destination. When using the “dest” attribute, you should always prefix a “1” before the telephone number.

For extensions, the format is <transfer dest=“tel:+12345678900;postd=1234”/>.

To set the outgoing caller ID, the format is <transfer dest=“tel:+12345678900;ani=2125551234”/>.

To insert a pause before the extension is dialed, you can add a “p” before the extension number (i.e. “p1234”).

destexpr

String

An ECMAScript expression yielding the telephone number of the destination. Note: If using <transfer> for outbound, please note that outbound calls originate from a toll-free number, and you are not able to transfer to another toll free number.

type

String

(defaults to “bridge”) The type of transfer. Accepts the following values: "bridge", "blind" (unsupported), and "consultation" (unsupported).

This setting overrides the bridge attribute.

bridge

Boolean

(defaults to “true”) Instructs the platform to perform a bridge transfer.

connecttimeout

String

(defaults to 30 seconds) The time to wait while trying to connect the call before returning the noanswer condition.

maxtime

Integer

(defaults to 0) The time that the call is allowed to last.

transferaudio

String

The URI of an audio source to play while a bridge transfer attempt is in progress (before far-end answer).

Nothing can be played during blind transfer attempts as those calls are immediately handed off to the phone switch.

Notes

  • Only bridge transfers are officially supported.

  • Exactly one of “dest” and “destexpr” may be specified.

  • Only one shadow variable is is supported: name$.duration. The shadow variables name$.inputmode and name$.utterance are not supported.

  • “connecttimeout” refers specifically to the amount of time the system will wait for the far-end to pick up.

  • One of the following values will be returned in the form item variable if a transfer is completed without the caller disconnecting:

    1. maxtime_disconnect - returned when a maxtime attribute was set and the maxtime was reached.

    2. far_end_disconnect - returned with the callee disconnects.

  • If the caller disconnects, a connection.disconnect will be thrown and the return value is not defined.

Example

<?xml version="1.0"?>
<vxml version="2.0">
  <form>
    <field name="targetnumber" type="digits">
      <prompt>
        What phone number would you like to dial?
      </prompt>
    </field>
    <transfer destexpr="targetnumber">
      <prompt>
        Transferring to
        <say-as type="acronym">
          <value expr="targetnumber"/>
        </say-as>.
      </prompt>
    </transfer>
  </form>
</vxml>

The output of the above script would be:

Computer: What phone number would you like to dial? Human: One two one two five five five one two one two. Computer: Transferring to one two one two five five five one two one two. Computer: (transfers call to 1-212-555-1212)

Child Tags

<audio>, <catch>, <enumerate>, <error>, <filled>, <grammar>, <help>, <noinput>, <nomatch>, <prompt>, <property>, <value>

Parent Tags

<form>

Last updated