Last reviewed: 3/23/2024 12:41:17 PM
<transfer>
A <transfer> element transfers the caller to another destination.
Syntax
<audio transfer aai="string"
aaiexpr="expression"
bridge="booelan"
cond="string"
connecttimeout="secondsormilliseconds"
dest="uri"
destexpr="expression"
expr="expression"
maxtime="secondsormilliseconds"
name="var"
transferaudio="uri"
type="transfertype" />
Attributes
aai
Application-to-application information. A string containing data sent to an application on the far-end, available in the session variable session.connection.aai. The transmission of aai data may depend upon signaling network gateways and data translation (e.g. ISDN to SIP); the status of data sent to a remote site is not known or reported. Although all platforms must support the aai attribute, platforms are not required to send aai data and need not support receipt of aai data. Platforms that cannot receive aai data must set the session.connection.aai variable to the ECMAScript undefined value. The underlying transmission mechanism may impose data length limits.
aaiexpr
An ECMAScript expression yielding the AAI data.
bridge
Determines whether the platform remains in the connection with the caller and callee.
Transfer Type | Description |
---|---|
Bridge transfer | If true, the platform adds the callee to the connection. Document interpretation suspends until the transferred call terminates. The platform remains in the connection for the duration of the transferred call; listening during transfer is controlled by any included <gramma>s. If the caller disconnects by going onhook or if the network disconnects the caller, the platform throws a connection.disconnect.hangup event. |
Blind transfer | If flase (default), platform redirects the caller to the callee without remaining in the connection, and does not monitor the outcome. The platform throws a connection.disconnect.transfer immediately, regardless of whether the transfer was successful or not. |
cond
An expression that must evaluate to true in order for the form item to be visited.
connecttimeout
The time to wait while trying to connect the call before returning the noanswer condition. The value is a Time Designation. Only applies if bridge is true. Default is platform specific.
dest
The URI of the destination (telephone, IP telephony address). Platforms must support the tel: URL syntax and may support other URI-based addressing schemes.
destexpr
An ECMAScript expression yielding the URI of the destination.
expr
The initial value of the form item variable; default is ECMAScript undefined. If initialized to a value, then the form item will not be visited unless the form item variable is cleared.
maxtime
The time that the call is allowed to last, or 0s if no limit is imposed. The value is a Time Designation. Only applies if bridge is true. Default is 0s.
name
Stores the outcome of a bridge transfer attempt. In the case of a blind transfer, this variable is undefined.
transferaudio
The URI of audio source to play while the transfer attempt is in progress (before far-end answer). If the resource cannot be fetched, the error is ignored and the transfer continues; what the caller hears is platform-dependent.
type
(2.1) The type of transfer. The value can be "bridge", "blind", or "consultation".
Children
<audio>, <catch>, <enumerate>, <error>, <filled>, <grammar>, <help>, <noinput>, <nomatch>, <prompt>, <property>, and <value>.
Parents
Variables
none
Example
The following example illustrates transfering a call.
<form id="xfer">
<var name="mydur" expr="0"/>
<block>
<!-- queued and played before starting the transfer -->
<prompt>
Calling Riley. Please wait.
</prompt>
</block>
<!-- Play music while attempting to connect to far-end -->
<!-- "hotword" bargeintype during transferaudio only -->
<!-- Wait up to 60 seconds for the far end to answer -->
<transfer name="mycall" dest="tel:+1-555-123-4567"
transferaudio="music.wav" connecttimeout="60s" bridge="true">
<!-- queued and played before starting the transfer -->
<!-- bargein properties apply during this prompt -->
<prompt>
Say cancel to disconnect this call at any time.
</prompt>
<!-- specify an external grammar to listen for "cancel" command -->
<grammar src="cancel.grxml" type="application/srgs+xml"/>
<filled>
<assign name="mydur" expr="mycall$.duration"/>
<if cond="mycall == 'busy'">
<prompt>
Riley's line is busy. Please call again later.
</prompt>
<elseif cond="mycall == 'noanswer'"/>
<prompt>
Riley can't answer the phone now. Please call
again later.
</prompt>
</if>
</filled>
</transfer>
<!-- submit call statistics to server -->
<block>
<submit namelist="mycall mydur" next="/cgi-bin/report"/>
</block>
</form>
Version Information
Supported in: VoiceXML 1.0, VoiceXML 2.0, and VoiceXML 2.1.