Web Server Configuration

Overview

Note: These instructions are required only if you are going to host WebRTC on separate server with the MiVoice 5000 ICP. If you are going to host the application on MBG itself, these instructions are unnecessary.

After configuring MBG to support WebRTC on a separate server, download the Software Development Kit (SDK) from the WebRTC. The SDK includes the settings you have configured on MBG (WebRTC address and port, WebRTC protocol security mode, Webserver shared secret, etc.) and allows you to deploy the application to your web server, customizing the look and operation of the pages if you desire.

Downloading the SDK and Opening the Files

To obtain the SDK:

  1. On the MBG main page, click the Service configuration tab and then click WebRTC.

  2. Click Download SDK.

The file (webrtc.zip) is downloaded in accordance with your web browser setup.

  1. Move to file to a location of your choosing (if necessary), unzip it and examine the contents.

The SDK is an archive (zipped file) that contains:

Adding the Files to the Web Server

There are two ways to implement WebRTC on your web server:

Implement the Complete SDK  

To employ this option, simply extract the contents of the SDK onto the web server to a location such as the root directory. The server requires PHP. You can  then begin using the standalone service by opening the appropriate URL in the SDK folder location. For example, to initiate a call, you would enter the following addresses in a web browser:

Optionally, you can modify the implementation as follows:

  1. Add a reference to the WebRTC in your own web site. To support anonymous call mode, make sure to include the destination number or SIP URI in the URL.

  2. Updates the image and audio files. At the very least, hide the Mitel image by adding the "hh=1" parameter to the URL. If you have your own image and audio files, copy them to the appropriate directories and update the CSS accordingly.

  3. Modify the PHP content to customize the look and operation of the service. This step is recommended only for experienced web developers.  

Implement Only the JS Files

You can build your own web application using only the Javascript files included with the SDK. If your web pages are dynamically created by PHP, you can include the config.php file as in your PHP code. If your implementation does not support PHP, you must manage these parameters manually.

You are required to use the following JavaScript libraries:

Correspondence table of config.php values and miwebphone.js constructor values:

config.php

miwebphone.js constructor

$websocket_secure

'ws_secured'

$websocket_server

'ws_server'

$websocket_port

'ws_port'

$disable_video

'disable_video'

$user_ipbx_server

'pbxIpaddress'

Config.php values used by the web pages but not provided to the constructor: