CallXML 2.0 Development Guide Home  |  Frameset Home

  Outbound Sample Code  |  TOC  |  Answering Machine Detection  
This documentation is for CallXML 2, which has been superceded by CallXML 3. The CallXML 2 language is not being updated any longer. CallXML 3, however, has many new features and is actively being enhanced. If you're writing a new CallXML application, you should use CallXML 3. Click here for the CallXML 3.0 documentation.

Token Initiated Calls with CallXML

The ability to create an outbound call by simply clicking a ‘submit’ button on a web form is one of the most useful offerings on the Voxeo network. Token initiated calls follow the same rules as regular <transfer> calls, in that the same conditions must be checked against in regards to call status and errors.

Reminder: Outbound dialing requires the use of outbound dialing priveleges, which must be provisioned by voxeo support. If you have not contacted us to get these permissions, click here to learn how you can get hooked up with this feature.


For further information, token calls are detailed fully in Lesson 9, but for the truly lazy, we reprint the code here:

Start.html


<title>Demonstration Session Trigger Application</title>
<form name="SampleForm"
  action="http://session.voxeo.net/CallXML.start"  method="POST">
  <input type="hidden" name="tokenid" value="sometoken">
  <input type="hidden" name="resulturl" value="http://mywebserver.com/Start.html">

  Phone number to call:<br>
  <input type="text" name="Phone" size="20" maxlength="20" value=""><br><br>
  Enter your text to say here:<br>
  <input type="text" name="TTS" size="100" value=""><br><br>
  <input type="reset" value="Clear">

  <input type="submit" name="submit" value="Give me a call!">
</form>


MyTokenApp.asp


<?xml version="1.0" encoding="UTF-8"?>  <callxml version="2.0">
<%
'------------------------------------------------------------------------
' Need to use ASP to grab the variables from the querystring.
'------------------------------------------------------------------------
Phone  = request.querystring("phone")
Message = request.querystring("TTS")
'----------------------------------------------------------------------------
' Now we will transfer those ASP variables to callxml variables
'----------------------------------------------------------------------------
response.write "<assign var=""Phone""  value=""" & Phone  & """/>"
response.write "<assign var=""Message"" value=""" & Message & """/>"
%>
  <call value="$Phone;" maxtime="30s"/>
  <onanswer>
    <block label="MessageBlock" repeat="3">
      <text>$Message;</text>
      <wait value="3s"/>
    </block>
  </onanswer>

  <oncallfailure>
    <log value="Call failed to connect."/>
  </oncallfailure>
</callxml>




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

login
  Outbound Sample Code  |  TOC  |  Answering Machine Detection  

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