CCXML 1.0-W3C Development Guide Home  |  Frameset Home

  Dialog Extension: x-recordaudio  |  TOC  |  E: Client Side Scripting  

Dialog extension: "x-transfer"

The x-transfer dialog extension provides the ability to initiate a transfer of a call to a new call destination specified in a script using the hints attribute. In the script, when a hints.header is specified, the header is attached to a new SIP call as shown in the following code example.



<dialogstart src="'sip:test@127.0.0.1:5070'" type="'application/x-transfer'" hints='hints'/>

An example to this dialog extension in action is listed below for your convenience.

Note: You must escape reserved URI characters such as the & and # signs.


<?xml version="1.0" encoding="UTF-8" ?>
<ccxml version="1.0">

<meta name="author" content="Brian Feinberg"/>
<meta name="copyright" content="2011 Voxeo Corporation"/>
<meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/>

 


<var name="initState" expr="'state_1'"/>
<var name="MyCallID"/>

<eventprocessor statevariable="initState">

  <transition event="connection.alerting" state="state_1">
    <assign name="MyCallID" expr="event$.connectionid"/>
    <send data="'MyEvent'" target="session.id"/>
  </transition>

  <transition event="MyEvent">
      <accept connectionid="MyCallID"/>    
  </transition>

  <transition event="connection.connected" state="state_1">
      <dialogstart src="'sip:user@127.0.0.1:5070'" type="'application/x-transfer'" hints='hints'/>
  </transition>

  <transition event="connection.disconnected" state="state_1">
    <log expr="'@@@@ INBOUND CALLER HUNG UP @@@@'"/>
    <exit/>
  </transition>
 

  <transition event="error.dialog.notstarted'" state="state_1">
      <log expr="'@@@@ OUTBOUND CALL FAILED @@@@'"/>
      <exit/>
  </transition>


  <transition event="dialog.exit">
    <log expr="'@@@@ OUTBOUND CALLER HUNG UP @@@@'"/>
    <exit/>
  </transition>

  <transition event="error.*">
    <log expr="'@@@@ GENERIC ERROR @@@@'"/>
    <log expr="'@@@@' +event$.reason "/>
    <exit/>
  </transition>


</eventprocessor>
</ccxml>


To download the preceding code example, click ....



  ANNOTATIONS: EXISTING POSTS
0 posts - click the button below to add a note to this page

login
  Dialog Extension: x-recordaudio  |  TOC  |  E: Client Side Scripting  

© 2012 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site