Page tree

Versions Compared

Key

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

This page describes an App that uses UnifiedAPI to invite a group of users to a conference call. Download.

Table of Contents
maxLevel2

Note
titleThe code is on GitHub

Download here. Do not hesitate to contribute in order to make this example better - we welcome Pull Requests!This demonstrative code SHOULD NOT be used in production. It is designed to show how an App 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

Click2Conference is an App written in PHP that enables users to invite anyone to a conference call. It uses the PhoneCall resource exposed by Unified API and the following request:

It is an excellent starting point for any PHP developer.

Installation

In order to be able to use the Click2Conference App, you need a webserver web server with PHP 5.2.14 3 or higher installed.

STEP 1: Download the files.Download the archive, extract the files, and copy them to a Switch to the directory that can be accessed over the Web.web (e.g /var/www/html) and download the files.

Shell
git clone https://github.com/4psa/app-click2conf.git

STEP 2: Proceed to allowing permissions and ownership rights.

You also need to give proper permissions and ownership rights to the files of the App. The App must be owned by the webserver user and group. For example, if we use httpd as a webserver:

Shell
chmod -R 755 <PATH_TO_Click2Conference>
chown -R httpd:httpd <PATH_TO_Click2Conference
 

STEP 3: STEP 2: Configure the App.

In order to use the App, you must configure it by opening the file <PATH_TO_Click2Conference>/interfaceconfig/config.php and changing the following settings:

...

Code Block
php
php
$config['GROUPS']['Office'] = array(
    "0003*001",
    "0003*002",
    "0003*011"
    );

$config['GROUPS']['Remote'] = array(
    "124141",
    "124142",
    "124145"
    );

STEP 3: Proceed to allowing permissions and ownership rights.

You also need to give proper permissions and ownership rights to the files of the App. The App must be owned by the webserver user and group. For example, if we use httpd as a webserver:

code
chmod -R 755 <PATH_TO_Click2Conference>
chwon -R httpd:httpd <PATH_TO_Click2Conference


STEP 4:
Schedule a conference as explained in the Conference Extension section of the User Documentation.

Behavior

User Interface

As soon as the setup process is complete, you can access the interface at https://<hostname>/<PATH_TO_Click2Conference>/index.php. The page displays a drop-down menu and a button as shown in the image below.

...

To invite the group to the conference, the App uses the Unified API  Create ConferenceInvite PhoneCalls request. For each number in the group, the App makes a request as the one below. It uses the extension defined in the config variable VN_CONFERENCE_EXT as extension and source of the call as in the example below. All fields are fictitious.

...

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