Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt

TrackMyCalls is a web application written in PHP that keeps a record of all successful calls made to a list of contacts. Download.

Table of Contents
maxLevel2

...

Let us assume that you are an insurance company that uses VoipNow as a Unified Communication system and you want to track down the calls made to customers.  You You have an internal application and a database containing all the customers. These are not related in any way with VoipNow. 

You want to record a note in the internal application every time an employee calls an existing customer. This way, you will have a record for every customer that has received the company's latest offer.  You You want to know which calls are successful and which are not and also track down if the customer received the offer from the company.

This example illustrates how you can accomplish this.

...

...

This demonstrative code SHOULD NOT be used in production. It is designed simply to show how a client application interacts with Call Events. From this perspective, validations and error-checks aiming to demonstrate the most common mistakes are minimal and can be done easily.

How to Install It

Note
titleSystem Requirements

In order to be able to use the TrackMyCalls plug-in, you need a webserver with PHP 5.2.14 or higher installed. Also, please note that the MySQLi PHP extension is necessary to make the TrackMyCalls setup work.

STEP 1: Download the archive, extract the files, and copy them to a directory that can be accessed over the Web.Clone the files from our GitHub repository into a folder which can be accessed by your web server.

Code Block
git clone https://github.com/4psa/app-trackmycalls.git /var/www/html/app-trackmycalls

 

STEP 2: Allow permissions and ownership rights. 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 use httpd as as a webserver:

Code Block
chmod -R 755 <PATH_TO_TRACKMYCALLS>
chwon -R httpdapache:httpdapache <PATH_TO_TRACKMYCALLS>

STEP 3: In order to use the tool, you must first set up the database by running the SQL script located at at /sql/callevents.sql. 

Tip

You should have your DB admin setup a database for you: e.g. trackmycallsdb.

...

STEP 4: Configure the tool. As soon as the database is set up, you must configure it by opening the file /file config.conf in the  in the <PATH_TO_TRACKMYCALLS>/interface/config/ and changing the following settings:

  • Set the db_host variable to the IP or hostname the IP of your VoipNow web server;
  • Set the the db_username username variable to the username used for accessing the database;
  • Set the the db_password password variable to the password used by the user;
  • Set the the db_databaseName databaseName variable to the database you have set up.

...

As soon as calls are placed, the information about the callers involved will be recorded in the database. Calls made to phone numbers that don do not exist in the database are ignored. That is why, in order to make this work, you have to insert some contacts in the database (along with their phone numbers).

...

In order to make this script usable, you need to follow these steps:

STEP 1: Register an extension using a real phone or a softphone.

STEP 2 2: In In the extension manager of your VoipNow administration page,  select select the extension you wish to monitor and click Call Events.

STEP 3 3: Configure a 'Hangup' event by clicking on the corresponding link.

STEP 4 4: Select Select POST as request method and fill in the Make request to text area with the URL which points to your script.

...

STEP 6: Make a call to a number from the contacts list. If the callee called party answers, a note is written in the database:

...

Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.