Voxeo Documentation - Tutorial: Hello World

This simple tutorial will step you through the creation and deployment of a Hello World application. When we are done, you will have a basic understanding of creating phone applications using web technologies, and you can call the resulting Hello World application.

Step 1: Write the Main VoiceXML File

Open up your favorite text editor to write a few lines of VoiceXML .

First you must put in the file a standard XML header. Every XML document you write, including VoiceXML documents, will need a header like this.

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

Next, you must specify the correct version number for your VoiceXML document. If you plan on using any of the newer 2.1 application features, such as the <data> element, then you will want to make certain that you specify version " 2.1 ".

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

<vxml version="2.1">

</vxml>

Since we are starting small, we will partake in the time-honored tradition of true Hello World applications.

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

<vxml version = "2.1" >

<form>

  <block>

   <prompt>

   Hello World. This is my first telephone application.

   </prompt>

  </block>

</form>

</vxml>

That is all there is to it. Notice that even at this most basic level of scripting, we still see evidence of some required code structure. The <form> tag is not unlike the HTML <form> tag, as it groups sections of input and output together on your page: remember, this is just a web page for the telephone. But the similarity between the two tags ends there -- in more complicated scripts the <form> can also serve as a named section that can be jumped to, not unlike a HTML anchor tag. In a similar way, the <block> tag in our example seems somewhat unimportant because we are performing but a single function; however, VoiceXML requires structure inside the <form> tag, which is what the <block> provides for us. So how does VoiceXML know to convert Hello World. This is my first telephone application? No extra tags are required to read text-to-speech -- VoiceXML assumes any non-tagged value is text to be read over the phone. How simple is that?

Your VoiceXML file is now done. Go ahead and save it as helloworld.xml.

Step 2: Upload your VoiceXML File

Next you must post or upload your VoiceXML file to a web server. In this example, we might put the file into http://www.myserver.com/helloworld, so that your VoiceXML file would be at http://www.myserver.com/helloworld/helloworld.xml in the VAM. If you do not have access to a web server, you can use Voxeo File Manager to upload your code to our servers . As a member of the Voxeo Community, you get 10 MB of free hosting space on our servers in which to test your applications. For more information, see Voxeo File Manager.

Step 3: Sign up for a Voxeo Account

If you have already signed up for a Voxeo account, you can skip forward to the next Step.

Signing up for a Voxeo account is absolutely free. The following link will pop-up a new window where you provide basic contact information to sign up for an account. When you are done signing up for an account, just close the pop-up window and return here to move on to Step 5.

Click here to sign up for a Voxeo account.

Step 4: Link a phone number to your VoiceXML URL

Not sure how to map an application to a phone number? For more information, see Creating an Application.

Step 5: Upload and Call your Application

You are now ready to try out your application. Call the number you received in Step 4. You should hear Hello World read to you over the phone.

Welcome to the world of phone application development!

Downloadable Sample Code

See Also

VoiceXML 2.1 Tutorials Overview

Voxeo Support

 

The final process for a developed application published as a live application that can be called.

In Voxeo CXP, this is the activation of an application as a Service on a server. For more information, see Deploying a Service in the Deployment Guide for your version of Voxeo CXP in the Voxeo CXP Documentation.

In Voxeo Designer, you deploy your new or updated project to activate the application for live callers. For more information, see How to: Publish a Project in the Voxeo Designer Guide.

 
VoiceXML is an XML markup language format that you can use to specify interactive voice dialogs between a human and a computer. A voice application developed using VoiceXML can be deployed in a similar way an HTML application is deployed. While HTML uses a visual browser to display data, VoiceXML uses a voice browser, for example, the Voxeo Prophecy VoiceXML browser, to interpret the VoiceXML data. For more information, see the VoiceXML 2.1 Development Guide.
 

Extensible markup language is the universal format for structured documents and data on the web. The acronym for extensible markup language is XML. XML is a set of rules, or formatting, for encoding documents in a machine-readable form.

 

The <data> element allows the developer to fetch content from an XML source without having to use any server-side logic, and without having to transition to a new dialog. For more information, see <data> Element.

 

The <form> element is a container for all field items, such as a <field> element or a <subdialog> element, and for all control items, such as a <block> element or an <initial> element. For more information, see <form> Element.

 

Hyper Text Markup Language is the predominant markup language used for web pages to display data. The acronym for Hyper Text Markup Language is HTML. HTML describes the structure of text-based information in a document by identifying text as links, headings, paragraphs, lists, and so forth. The HTML text is supplemented with interactive forms, embedded images, and other objects.

 

The <form> element is a container for all field items, such as a <field> element or a <subdialog> element, and for all control items, such as a <block> element or an <initial> element. For more information, see <form> Element.

 

The <form> element is a container for all field items, such as a <field> element or a <subdialog> element, and for all control items, such as a <block> element or an <initial> element. For more information, see <form> Element.

 

The <block> element is a form-item container element for executable content. For more information, see <block> Element.

 

The <form> element is a container for all field items, such as a <field> element or a <subdialog> element, and for all control items, such as a <block> element or an <initial> element. For more information, see <form> Element.

 

The <block> element is a form-item container element for executable content. For more information, see <block> Element.

 

Text-to-speech is digitized audio rendering of written text into speech. The acronym for text-to-speech is TTS.

 
Voxeo Corporation is a technology company that specializes in providing development platforms for unified customer experience as self-service and unified communications using real-time communications applications. Voxeo's products are also available as a SaaS platform as cloud-based services using on-premise software in a private cloud, or hybrid clouds that combine both on-demand public-cloud and on-premise components. For more information, see Voxeo.com.

 

A physical computer dedicated to run one or more services to serve the needs of the users of other computers on the network. Depending on the computing service that it offers, a server can be be a database server, file server, mail server, print server, web server, gaming server, or some other kind of server.

In Voxeo CXP, a server is a concept that corresponds to a cluster of physical server machines and is represented by a Server object. Services must be hosted on a server in order to be called. For more information, see Configuring a Server in the Configuring Servers and Services section in the Deployment Guide for your version of Voxeo CXP in the Voxeo CXP Documentation.

In Voxeo Prophecy, a Prophecy server is a Community Controller or a managed server in the Community. For more information, see Managing Servers in the Working with Servers section in the Prophecy Commander chapter for your version of Prophecy in the Prophecy Documentation.

Voxeo Documentation

     Voxeo Documentation Overview
  Evolution Developer Portal Documentation
  Voxeo CXP Documentation
  Prophecy Documentation
  XML Development Languages Documentation
  VoiceXML 2.1 Development Guide
     VoiceXML Development Guide v2.1 Overview
     Platform Overview
     Creating an Application
     Voxeo File Manager
     Caching Tips and Techniques
     Cache Manager API
     Security Information
  Learning VoiceXML 2.1
     VoiceXML 2.1 Tutorials Overview
     Tutorial: Hello World
     Tutorial: Voice Recognition
     Tutorial: Call Flow
     Tutorial: Document Navigation
     Tutorial: Using Audio Files
     Tutorial: Call Transfer
     Tutorial: Caller ID and Called ID
     Tutorial: DTMF Recognition
     Tutorial: JavaScript and VoiceXML
     Tutorial: Subgrammars
     Tutorial: grXML Grammar Weighting
     Tutorial: Subdialogs
     Tutorial: Shadow Variables
     Tutorial: N-best Lesson
     Tutorial: Outbound VoiceXML Applications Using HTTP
     Tutorial: Mixed Initiative Dialogs
     Tutorial: <foreach> and <data>
     Tutorial: Using the <mark> Element
     Tutorial: Dynamic Grammars
     Tutorial: Event Logging
     Tutorial: Screen Scraping
     Introduction to Server Side Languages
     Passing Querystring Variables Using ASP/JSP/PHP/CF
     Final Notes
  Best Practices
  Debugging Techniques
  Exceptions and Errors
  VoiceXML 2.1 Porting Guide
  VoiceXML Variables
  All Things Audio
  Outbound Dialing
  Property Guide
  GSL Grammars
  grXML Grammars
     Custom Features
     External References
  Text-To-Speech Guide
     VoIP Dialing
     Voxeo Designer User Interface
  Element Reference Guide
     Element Summary
     <assign> Element
     <audio> Element
     <block> Element
     <break> Element
     <catch> Element
     <choice> Element
     <clear> Element
     <data> Element
     <disconnect> Element
     <else> Element
     <elseif> Element
     <emphasis> Element
     <enumerate> Element
     <error> Element
     <example> Element
     <exit> Element
     <field> Element
     <filled> Element
     <foreach> Element
     <form> Element
     <goto> Element
     <grammar> Element
     <help> Element
     <if> Element
     <initial> Element
     <item> Element
     <link> Element
     <log> Element
     <mark> Element
     <media> Element
     <menu> Element
     <meta> Element
     <noinput> Element
     <nomatch> Element
     <one-of> Element
     <option> Element
     <paragraph> Element
     <param> Element
     <phoneme> Element
     <prompt> Element
     <property> Element
     <prosody> Element
     <record> Element
     <reprompt> Element
     <return> Element
     <rule> Element
     <ruleref> Element
     <say-as> Element
     <script> Element
     <sentence> Element
     <sub> Element
     <subdialog> Element
     <submit> Element
     <tag> Element
     <throw> Element
     <token> Element
     <transfer> Element
     <value> Element
     <var> Element
     <voxeo:logcontrol> Element
     <voxeo:recordcall> Element
     <vxml> Element
  CCXML 1.0 Development Guide
  CallXML 3.0 Development Guide
  Voxeo Support
     Support Quick Reference
  Registering for an Account
  Self-Help Tools
  Collecting Information
  Evolution Ticketing System
     Submitting a Support Request
     Escalating a Support Request
  Software Lifecycle and Support Policies
  Getting Further Assistance
  Voxeo Glossary
  Help on Help