The Time-of-Day Service
The simplest application for Voicent Gateway is a single vxml
(VoiceXML file extension) file and a configuration file. Our first
version of the time-of-day service just informs the caller the service
name.
1. Create application directory structure
First create a new project directory (will be referred to as
<tddir>) in your file system. Under the project directory
create two sub-directories: conf and webapps.
2. Create application vxml file
Create a file named timeofday.vxml under <tddir>/webapps
and type-in or copy-paste the following to the file:
- <?xml
version="1.0"?>
<vxml version="1.0">
- <form
id="td">
<block>
Hello, this is Time of Day service.
</block>
</form>
- </vxml>
The format of the file is VoiceXML.
3. Create application configuration file
A configuration file is needed to install your application to
the gateway. This configuration file specifies the start and exit
vxml files, the application type (inbound or outbound), and choice
of password protection, etc.
Create a file named timeofday.conf under <tddir>/conf
and copy the following information to the file.
- name =
Time of Day
keyword = Time of day
inbound = 1
outbound= 0
appurl = /td/timeofday.vxml
webappname=/td
4. Check your directory structure
Now you should have a directory structure like this:
- <tddir>
+ conf
timeofday.conf
+ webapps
timeofday.vxml
What we created so far is a minimum application, a "Hello
World" application for Voicent Gateway. Download the sample
code: timeofday_step1.zip. |