Excerpt |
---|
In this page, you can find an example of a web App written in PHP, which enables the validation of a form via an IVR extension. Download. |
Table of Contents | ||
---|---|---|
|
...
...
This demonstrative code SHOULD NOT be used in production. It is designed to simply show how a client application interacts with UnifiedAPI. From this perspective, validations and error-checks aiming to demonstrate the most common mistakes are minimal and can be done easily.
Overview
This App is useful for any developer of PHP applications as it contains basic examples of how to integrate third-party applications with VoipNow via VoipNow Call Interactive.
In order to be able to use the SecureMyForm App, you need a webserver with PHP 5.3 or higher installed.
Installation
STEP 1: Download the archive, extract the files, and copy them to a directory that can be accessed over the Web. Retrieve files from our GitHub repository:
Code Block |
---|
git clone https://github.com/4psa/app-securemyform.git |
STEP 2: You need to give proper permissions and ownership rights to the files of the plugin - the plugin needs to be owned by the web server user and group.
For example, if we use httpd
as a webserver:
...
STEP 1: Go to the URL https://<PATH_TO_SECUREMYFORM>/interface/index.php
and you will be able to see a form requiring your phone and email address details.
...
As a result, you need to add an IVR action as described in the Add IVR Context section. The following actions must be added and executed according to the order indicated below:
01. Play Sound
You should add a sound containing the user instructions.
02. Record digits to variable
You must set the IVR to register a number of digits in a variable called activationCode
. This variable will be transmitted to the script validating the request.
...
03. Call Interactive
The configuration implies the following:
...
Code Block |
---|
http://<ip|host>/<PATH_TO_SECUREMYFORM>/ivr_validate.php?activationCode=$activationCode. |
For more details, go to IVR Extension.
...
Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.