| VoiceXML 2.1 Development Guide | Home | Frameset Home |
|
<transfer> in the VoiceXML application. Note the fact that they are NOT caught by using the standard 'catch event' syntax, but rather, as part of a conditional statement within the transfer itself. The syntax for successfully catching these events are as follows:
<transfer name="MyTransferName" dest="tel:+12223334444">
<filled>
<if cond="MyTransferName == condition1'">
<!-- do something here -->
<elseif cond="MyTransfername == condition2'"/>
<!-- do something else here -->
</if>
</filled>
</transfer>
<transfer> form-item's name exactly; if this is not followed to the letter, then none of the transfer events will be catchable. When coding an outbound call via the <transfer> element into your application, it is always considered best practice to add handlers for ALL of these events detailed below:| Condition | Explanation |
| maxtime_disconnect | Maxtime of <transfer> expired |
| busy | Destination number was busy |
| network_busy | Network busy....contact Voxeo support |
| noanswer | Connect timeout expired (No Answer) |
| far_end_disconnect | Callee disconnected |
| near_end_disconnect | Caller disconnected from the call bridge via dtmf input |
<?xml version="1.0" encoding="UTF-8"?>
<vxml version = 2.1" >
<meta name="maintainer" content="YOUR_EMAIL@SOMEWHERE.COM"/>
<form id="CallTransfer">
<block>
<prompt>Preparing to dial the number</prompt>
</block>
<!--
Make sure you have outbound dialing priveleges,
else any call attempts will result in a 'busy' event.
Contact support@voxeo.com for details
-->
<transfer name="MyCall" dest="tel:+1234567890"
bridge="true" connecttimeout="20s" maxtime="60s">
<grammar type="text/gsl">[dtmf-1]</grammar>
<filled>
<if cond="MyCall == 'busy'">
<prompt>
Sorry, our lines are busy. Please try again later.
</prompt>
<exit/>
<elseif cond="MyCall == 'noanswer'"/>
<prompt>
Hey, nobody is answering the phone.
</prompt>
<elseif cond="MyCall == 'far_end_disconnect'"/>
<prompt>
Your party must have hung up. how rude.
</prompt>
<elseif cond="MyCall == 'near_end_disconnect'"/>
<submit next ="MyCoolCleanupPage.jsp"/>
<elseif cond="MyCall == 'maxtime.disconnect'"/>
<prompt>
Your call ran over the maxtime of sixty seconds,
and your called party has been disconnected.
</prompt>
</if>
</filled>
</transfer>
</form>
</vxml>
| ANNOTATIONS: EXISTING POSTS |
| login |
|