6.1 Create
an HTTP Action
HTTP is the standard protocol for all website communications. The
HTTP protocol governs the way information are 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 to submit 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 the form
information to the website. The website processes the form
information 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 in more details about
the HTTP action. For now, we just need to 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 using 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 build-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 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 existing file if it
is 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.
|