Actions

IntelliVision audio analytics - Zenitel Connect Pro integration

From Zenitel Wiki

ZCP IconPlatf.PNG

Introduction

This article describes how to create a Linux Ubuntu machine and use it for installing the Audio Event Detection Server.
The audio event detection server must run in an Zenitel Connect Pro environment as the WAMP communication protocol is used for message transfer and event signaling.
The audio event detection software package consists of two types of containers:

  • A container for audio event detection from an incoming audio stream.
  • A container implementing a web-service for configuring the audio event detection server.

One audio event detection container must be running for each audio stream that is to be analyzed.
The web-service only consists in a single instantiation. The web-service is accessed using a web browser either from an external computer or locally using for instance FireFox. The web-service may also be accessed from ZCP as a 3rd Party Application.

A system setup is shown on the picture below:

AED Test Setup



Creating a Linux Ubuntu Desktop Machine


To create a new Linux Ubuntu machine execute the following steps:

  • Download the latest Linux image from https://ubuntu.com/download/desktop
  • Create a bootable memory stick (>4 GB) using for instance the tool Rufus-4.1 (can be downloaded from https://rufus.ie/en/)
  • Insert the the stick in the machine and reboot.
  • Follow the instructions on the screen.


Audio Event Detection Software Release Package


In the following text '>' indicates the command prompt. All scrips are invoked as admin: "sudo ./SCRIPT_NAME".
The software release package contains of the following items:

  • audioeventdetector.tar - This packed file contains the audio event detector container image.
  • aed_configuration.tar - This packed file contains the audio event detector server configuration web service container image.
  • AED_Setup.sh - This script should be executed once after the installation of the Linux Ubuntu operating system. Ensure that you have internet access. The script will
    • Install Docker Container and its dependencies.
    • Create the volumes aed_data and aed_logs for a local configuration database and logging files.

During installation the user is asked to accept file overwriting. Accept this entering 'y'. The installation is completed testing the docker container by starting the "Hello World" container, which is downloaded and run.

  • Install_AED_ConfigImage.sh - Unpacks the aed_configuration.tar and saves it as an image. The script will stop and remove any container of the configurator service and remove current image.
  • Install_AED_Image.sh - Unpacks the audioeventdetector.tar and saves it as an image. The script will stop and remove any container(s) of the audioeventdetector and remove current image.
  • Start_AED_ConfigContainer.sh - The script will stop and remove current running container before starting a new one.
  • Start_AED_Containers.sh - The script requires a parameter, which specifies the number of incarnation of the image, that should be running. The script will stop and remove any current running detector container before starting a new one(s). Before executing the script insert correct configuration values:
    • ZENITEL_CONNECT_USER=name - Enter the user <name> for the ZCP Link User
    • ZENITEL_CONNECT_PASSWORD=password - Enter the <passsword> for the ZCP Link User
    • ZENITEL_CONNECT_IP_ADDRESS=xxx.xxx.xxx.xxx - Enter the IP address of the ZCP
    • AED_SERVER_IP_ADDRESS=xxx.xxx.xxx.xxx - Enter the IP address of the Audio Analytics Server. Is used to tell the stations where to send the audio stream.

Please note: After the executing of the script the container(s) must be configured using the configuration web-service.
The container(s) will start automatically after a restart/reboot.

  • GetLogFiles.sh - This script will copy logging files from the logging volume to a linux user directory. Must be called with linux username as parameter and as root (sudo). The logfiles will be available from the directory "/home/<user>/aed_logs/_data".


Audio Event Detection Server Operation

Please note:

  • Ensure that the IntelliVision License Key is valid.
  • The Zenitel Connect Pro firewall must be opened for non encrypted communication (8087). This for the use of the AED_Configuration WEB Service that is based on .NET7.
  • The Zenitel Connect Pro Server must be up running.
  • Ensure that the firewall of the Audio Event Server is open for udp stream. Use for instance the command "sudo ufw allow xxxx:yyyy/udp" to allow udp for ports xxxx to yyyy.


At startup the AED container will see if any configuration has been received from the configuration web-service. If configuration data is available this will be used - otherwise the AED container will each 10 s request configuration data. Configuration data can manually be downloaded to the AED container when connecting to the service via a browser.

During operation each AED container will publish event indicating

  • If an audio event is detected.
  • Container is running. This alive message is sent each minute.
  • Any on/off change in audio stream reception.


These events must be subscribed by a Zenitel Connect Client to be available. The release package includes a Zenitel Connect SDK client that can be used for testing.

Audio Event Detection Configuration Operation


After installation and starting the AED Configuration Web service container, the service can accessed using a standard web browser (eg. Microsoft Edge) and select the ip address of the server where the service is install. The port number is the standard 80.
The service can also be accessed locally using Firefox and the ip-address localhost.
The start-up page is shown below. The Service will try connecting to the Zenitel Connect Pro (ZCP) with the current settings shown. It takes about 10 seconds to connect. If these data is not correct:

  • Press the "Disconnect"-button.
  • Set the correct values to connect to ZCP.
  • Press the "Reconnect"- button.
AED Configuration Web Service



When the service has connected to the Zenitel Connect Pro Server it will display the current AED Configuration. This consists of a list of Devices, which can provide an audio stream.
Each line in the list correspond to an incarnation or container instantiation of the Audio Event Detection image. All containers will received the entire list when the button "Update AED-Server". Container 1 will use line 1 of the table, container 2 will use line 2 and so on ..
Please note: It is important that the directory numbers in the list are defined in Zenitel Connect Pro, as they are used when addressing each station.
Each line has four buttons assigned: "Edit", "Delete", "Start and "Stop". Two additional buttons are available: "Add new AED-Device" and "Update AED Server".

AED Device List


  • "Edit" - Pushing this button the service will open the selected line with the possibility of changing the parameters. When completed push the "Save"-button (see picture below).
  • "Delete" - Pushing this button will remove the selected line.
  • "Start" - This is a command to the selected line (or container) to open the audio stream port and start analyzing.
  • "Stop" - This is a command to the selected line (or container) to close the audio stream port and stop analyzing.

Setting the "Output Level" to zero will disable the detection.

AED Edit Device Data


  • "Add new AED-Device" - Pushing this button the service will open a new page with cleared data fields (see picture below). Enter the correct data and push "Submit" to complete the editing. Push the "Abandon" in case this new device should not be saved.
  • "Update AED Server" - Pushing this button the service will send the configuration data to all containers. They will start closing its audio streaming port and used the new data. If a container is not in the list the container will remain stopped analyzing.
AED Add a new Device



Recommended Settings

It is recommended to use the following settings:

  • "Output Level": 10-12 (dB).


From ZCP Configuration web it is recommended to use:

  • Internal Microphone: 4 (dB).
  • Disable signal processing (Echo Cancelling and Automatic Gain Control).


Zenitel Connect Test Client


To monitor the events that are published by the AED containers the Zenitel Connect Test Client included in the installation package can be used. Enter the IP-address of the Zenitel Connect Pro Server and the username/password and push "WAMP Connect".

AED Test Setup



When connected the test client is ready for use. Only "Event Subscription" should be used. Set check mark for those events that should be monitored and push "Open Logging Window". The window can be cleard pushing "Clear Logging Window" and closed pushing "Close Logging Window".

Logging

Log files created by the containers during running time are saved in the volume aed_logs. This volume is not easily accessed. The script GetLogsfiles <username> can be used. Execute the scrip: >sudo ./GetLogFiles <username> The log files will then be available in the directory /home/<username>/aed_logs/_data. The logs stored in the logging volume are deleted

Usefull Commands

  • List all containers and their states.
    • >sudo docker container ls -a
  • List all images:
    • >sudo docker image ls -a
  • Stop all containers:
    • >sudo docker stop $(sudo docker ps -aq)
  • Remove all containers:
    • >sudo docker rm $(sudo docker ps -aq)
  • Remove all images:
    • >sudo docker rmi $(sudo docker images -aq)
  • Restart an exited container:
    • >sudo docker start CONTAINERNAME


Useful Utilities

  • Access the AED Server via ssh.
    • >sudo apt update
    • >sudo apt install openssh-server
    • >sudo systemctl status ssh
    • >sudo ufw allow ssh
    • >sudo ufw enable && sudo ufw reload
  • View used ports.
    • >sudo apt install net-tools
    • >sudo ss -tunlp
  • WireShark – monitor ip communication.
    • >sudo aptt install wireshark
    • >sudo /bin/wireshark
  • DB Browser for SQLite
    • >sudo apt install sqlitebrowser