<transfer>

Transfers the call to the specified number.

Syntax

<transfer
    aai = "CDATA"
    aaiexpr = "CDATA"
    bridge = "{true | false}"
    cond = "CDATA"
    connecttimeout = "CDATA"
    dest = "URI"
    destexpr = "CDATA"
    expr = "CDATA"
    maxtime = "CDATA"
    name = "identifier"
    transferaudio = "URI"
    type = "{bridge | blind | consultation}"
     />

Attributes

Attribute

Data Type

Required?

Default

Description

aai

CDATA

no

NA

String containing application-to-application (aai) data to send to an application at the far-end of the transfer.

aaiexpr

CDATA

no

NA

ECMAScript expression that evaluates to the aai.

bridge

boolean

no

no

Determines whether the platform stays in the connection with the caller and callee during and after the transfer. Valid values:

  • true = Document interpretation suspends until the transferred call terminates.

  • false = Raises the connection.disconnect.transfer event.

cond

CDATA

no

NA

Boolean expression that must evaluate to ECMAScript true for the transfer to execute.

connecttimeout

CDATA

no

NA

Time to wait for a connection to be made before the noanswer condition is returned.

dest

URI

no

NA

URI of the transfer destination.

destexpr

CDATA

no

NA

ECMAScript expression that evaluates to the URI of the transfer destination.

expr

CDATA

no

NA

Initial value of the form item variable.

maxtime

CDATA

no

0

Maximum duration of the call if bridge is true.

name

CDATA

no

NA

Stores the outcome of the transfer. Valid values:

  • busy = Destination refused the request.

  • noanswer = connecttimeout interval was exceeded before a connection occurred.

  • network_busy = Transfer was refused by an intermediary network.

  • near_end_disconnect = Transfer completed and was terminated by the caller.

  • far_end_disconnect = Transfer completed and was terminated by the callee.

  • network_disconnect = Transfer completed and was terminated by the network.

  • maxtime_disconnect = Transfer reached the maximum allowed duration and was terminated.

  • unknown = Transfer ended for an unknown reason.

The form item shadow variable has the following properties after the transfer is completed (where mycall is the form item variable name):

  • mycall$.duration = Duration of a successful call, in seconds.

  • mycall$.utterance = User utterance, if the transfer was terminated by a recognition.

  • mycall$.inputmode = Input mode of the utterance (DTMF or voice), if the transfer was terminated by a recognition.

transferaudio

URI

no

NA

URI of an audio file to play while attempting the transfer. By default, the audio used is a 2-tone (440 + 480 Hz), 2-second on, 4-second off sound. Only single-channel, 8 bit, 8 kHz audio files can be used for transferaudio.

type

{bridge | blind | consultation}

no

blind

Type of transfer to perform. The <transfer> element can have a bridge attribute or a type attribute, but not both; otherwise an error.badfetch event is thrown. Valid values:

  • bridge = Equivalent to bridge="true".

  • blind = Equivalent to bridge="false".

  • consultation = Similar to a blind transfer, except that the disconnect event is only raised if the call was successfully transferred. Otherwise, the session between the original caller and the VoiceXML Interpreter remains active, and document execution resumes.

Details

The following events can be raised by a transfer:

Event

Description

error.connection.baddestination

Destination URI is malformed.

connection.disconnect.hangup

Caller hung up.

connection.disconnect.transfer

Call was transferred (see the bridge attribute).

error.connection.noauthorization

Caller is not allowed to call the destination.

error.connection.noresource

Platform cannot allocate resources to place the call.

error.connection.noroute

Not implemented.

error.connection.protocol.nnn

Not implemented.

error.unsupported.uri

URI format used in the destination number is not supported.

Parents

<form>

Children

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

Example

<?xml version="1.0"?>
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">
    <form>
        <var name="phoneNumber" expr="'tel:+35312345678'"/>
        <block>Transferring your call, please hold</block>
        <transfer destexpr="phoneNumber" name="callTransfer" type="bridge" 
            connecttimeout="10s">

            <filled>
                Your transfer lasted 
                <value expr="callTransfer$.duration" /> seconds.
                <if cond="callTransfer == 'busy
                    Your call party is busy please call back later
                </if>
            </filled>
        </transfer>
    </form>
</vxml>

value

See Also

<form>