IVR Tutorial Lesson 6: Create an HTTP Action

HTTP is the standard protocol for all website communications. The HTTP protocol governs the way information is passed between a browser and a website. You do not need to fully understand the protocol in order to use it.

The most common web operation is submiting a form to a website. For example, when you enter a user name and a password in a web page form, and click OK button, the browser submits a form with that information to the website. The website processes the form and returns a new web page to the browser. You can use the same form submission operation in IVR Studio using an HTTP action.

In Part II of this tutorial, we'll discuss HTTP action in more detail. For now, we will just use it as if we are submitting a web form.

New HTTP Action

Select Message OK element, click the properties button on the program toolbar, select the Action tab. Click the New button to add a new action. From the "Choose Action Type" window, select Submit HTTP Request radio button. Enter the following information as shown below:

The HTTP Submit Operation

The above HTTP action defines the following HTTP submission request:

  • Target URL: http://192.168.15.10:8155/savefile.jsp
    Here 191.168.15.10 is the IP address of your remote computer for outbound calls. You can use the computer name also. If you are testing it on a local computer, please enter the following URL: http://localhost:8155/savefile.jsp
8155 refers to the port that Voicent Gateway is listening on. Voicent Gateway contains a built-in web server.
savefile.jsp is the server site program to handle a file upload operation for the gateway.
Submit Parameters

The savefile.jsp handler requires the following parameters:

  • target: the relative path of the target file on the gateway web server
  • overwrite: overwrite existing file with the same name, value 1 means true, 0 means false
  • filename: the actual file to upload to the server

This HTTP action uploads the recorded audio file, defined by variable message_file, to the remote Voicent Gateway for outbound calls. The uploaded file overwrites any existing file there. We can see that this operation is the same as the move command in the runvcast.bat file. The difference is that this action overwrites a file on a remote computer through file upload.

Please also note that you must use filename as the parameter name to upload a file.

Action Execution Order

We also have to change the order of actions. This action must be run before we launch the BroadcastByPhone program. To do so, select the HTTP action, then click the Move Up button.