Gateway Tutorial Table of Content << Previous >> Next

The Callnow Application

The first version of the callnow sample is the "Hello World" example of outbound call application for Voicent Gateway -- it calls a user specified number and plays a pre-recorded message.

1. Prepare the outbound call files

<?xml version="1.0"?>
<vxml version="1.0">
<form id="td">
  <block>
    <audio src="callnow/hello.wav"/>
  </block>
</form>
</vxml>

Save it as callnow.vxml. Use Windows Sound Recorder or your favorite recording software to record your message and save it as hello.wav. (Make sure the format is PCM 8 KHz, 16 bit, mono).

2. Install these files to Call scheduler

Voicent Gateway contains an integrated call scheduler. The top directory for call scheduler is under <Voicent Install Dir>/Gateway/outcall.

Create a directory named callnow under <Voicent Install Dir>/Gateway/outcall/webapps. Move the callnow.vxml and hello.wav files to the callnow directory.

3. Post call request to the Call Scheduler

To make call, simply send HTTP post request to the call scheduler. The url is http://localhost:8155/ocall/callreqHandler.jsp. The phone number, call time, and other information are sent in the post request. Once the call scheduler gets the request, it will make the call at the specified time.

Since the interface for outbound call is HTTP, you can write your application in any programming language you prefer. Here we are going to create a HTML page and let the browser send the call request.

<html>
<body>
  <form action="/ocall/callreqHandler.jsp" method="post">
    <input type="hidden" name="info" value="callnow sample">
    <input type="hidden" name="firstocc" value="10">
    <input type="hidden" name="startvxml"
           value="
[callnow dir]/callnow.vxml">
    Phone Number: <input name="phoneno" value=""><br>
    <input type="submit" name="s" value="Call now">
  </block>
  </form>
</body>
</html>

Please replace [callnow dir] with the real directory name. Save the content to callnow.htm under <Voicent Install Dir>/Gateway/outcall/webapps/callnow.

4. Test the application

Point your browser to http://localhost:8155/ocall/callnow/callnow.htm. Since the callnow is installed to the call scheduler web applications, you can access the file from any machine on your network. (Just replace the localhost to your real machine name)

If you have problem getting the above sample to work, please see the next section  for troubleshooting tips.

 
Developer Network Table of Content << Previous >> Next