| Prophecy 9.0 Development Guide | Home | Frameset Home |
|
<transfer method="refer">, as illustrated below:
<?xml version="1.0" encoding="UTF-8"?>
<callxml version="3.0">
<do label="B1">
<say>
Preparing to place your call.
</say>
<transfer method="refer" value="tel:4072223333"
maxtime="50s" playvalue="ringtone.wav" termdigit="1"/>
<on event="maxtime">
<log> *** MAXTIME EVENT DETECTED ***</log>
<say>
You hit max time for the call, and were disconnected.
</say>
</on>
<on event="callfailure:hangup">
<log> *** HANGUP EVENT DETECTED ***</log>
</on>
<on event="termdigit:1">
<log> *** TERMDIGIT PRESSED BY USER ***</log>
<say>
you must have pressed 1 to end the call.
</say>
</on>
<on event="callfailure:unreachable">
<log>*** UNREACHABLE EVENT DETECTED ***</log>
<say>
the called number returned an un reachable event.
</say>
</on>
<on event="callfailure:busy">
<log>*** BUSY EVENT DETECTED ***</log>
<say>
the number that you dialed is busy.
</say>
</on>
<!-- note that an 'anonymous' callfailure handler -->
<!-- will catch all call failure events -->
<!-- that do not have their own specific handler. -->
<!-- if the developer employs this soultion, -->
<!-- note that this handler *must* reside below all other handlers -->
<on event="callfailure">
<log>*** RECEIVED AN ANONYMOUS CALLFAILURE EVENT ***</log>
</on>
</do>
</callxml>
<?xml version="1.0" encoding="UTF-8"?>
<ccxml version="1.0" xmlns="http://www.w3.org/2002/09/ccxml">
<var name="conn_id" expr="''" />
<var name="statevar" expr="'state0'"/>
<eventprocessor statevariable="statevar">
<transition state="state0" event="connection.alerting">
<assign name="statevar" expr="'state1'"/>
<assign name="conn_id" expr="event$.connectionid" />
<log expr="'*** Accepting the connection ***'"/>
<accept connectionid="conn_id"/>
</transition>
<transition state="state1" event="connection.connected">
<assign name="statevar" expr="'state2'"/>
<log expr="'*** Redirecting, please stand by ***'"/>
<!-- Since the call has been accepted already a SIP REFER will be executed here -->
<redirect connectionid="conn_id" dest="'tel:+14071112222'"/>
</transition>
<transition state="state2" event="connection.redirected">
<log expr="'Redirect successful!'"/>
<exit/>
</transition>
<transition event="connection.redirect.failed">
<log expr="'The redirect failed...'"/>
<exit/>
</transition>
<transition event="error.*">
<log expr="'An error occurred: ' + event$.reason"/>
<exit/>
</transition>
</eventprocessor>
</ccxml>
<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1">
<meta name="author" content="Matthew Henry"/>
<meta name="copyright" content="2009 voxeo corporation"/>
<meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/>
<form id="F1">
<transfer name="T_1" bridge="false" type="refer"
dest="tel:+12223334444">
<!-- ************************************************* -->
<!-- Transfer code remix, courtesy of D.J. Johnnie Cochran -->
<!-- ************************************************* -->
<prompt> Placing the call, y'all</prompt>
<filled>
<if cond="T_1 == 'busy'">
<prompt>The line is busy, Lizzie. </prompt>
<exit/>
<elseif cond="T_1 == 'noanswer'"/>
<prompt> No one's home, metronome. </prompt>
</if>
</filled>
</transfer>
<block>
<goto next="#F2"/>
</block>
</form>
<form id="F2">
<block>
<prompt>if the bridge is true,
then the call goes on for you.
</prompt>
</block>
</form>
</vxml>
| ANNOTATIONS: EXISTING POSTS |
| login |
|