Gateway Outbound Application Tutorial: Dynamically Generated VXML Files

Except trivial applications, most voice applications requires dynamically generated VXML files. This is especially true when your application needs to be integrated with a web site or a database.

For dynamically generated VXML application, you must use starturl in the call request to define your starting VXML file. Whenever the gateway needs new VXML file, it will send HTTP POST request to the URL defined in your VXML file. Hence your application must be able to handle HTTP request. Practically, your application should use or embedded a web server to serve the VXML files to the gateway.

The advantage is that your application and the gateway does not have to be on the same machine. And you should be able to build a distributed calling system easily.

Voicent Gateway also has an embedded web server. It is the TOMCAT web server from apache.org. Assuming your Voicent Gateway is installed under the directory:

C:\Program Files\Voicent\Gateway

we can deploy our start.jsp file and the wave files on the gateway as follows:

C:\Program Files\Voicent\Gateway\outcall\webapps\myapp\start.jsp
C:\Program Files\Voicent\Gateway\outcall\webapps\myapp\audio\live.wav
C:\Program Files\Voicent\Gateway\outcall\webapps\myapp\audio\answering.wav

Compile your JSP files

If a JSP file is not compiled, then TOMCAT will compile it on the fly. This requires the availability of JDK's Java Compiler (tools.jar in the CLASSPATH). However, since Voicent Gateway cannot assume JDK is available on the customer's computer, you must compile all JSP files for your released product. For details, please check out Tomcat's document.

For development workaround, we can copy the tools.jar to the gateway library path under

C:\Program Files\Voicent\Gateway\lib

Restart Voicent Gateway.

Test your JSP files using your browser

It is always a good idea to use the web browser to test your JSP files first. To do so, you can enter the following URL:

You should see the following in your browser:
 


Previous Table of Contents Next