bcmsSVR/BCMS Real Time and Historical Report Data

Posted: September 27, 2014 in BCMS

Introduction

The bcmsSVR is similar to clintSVR, it is a gateway program for the access of real-time BCMS, historical BCMS and other reports from Avaya CM. It also provides API interfaces for the development of call centre reports and wallboard applications. The bcmsSVR retrieves BCMS and other reports at an interval that is specified by you, it stores the real-time and historical data in the database, Splunk, Kafka and memory which enables multiple programs to access the data via REST query API, OCX and C/C++ DLL interfaces. The data is presented in XML or JSON format, and the following reports and interfaces are supported:

  • REST query API to get real-time and historical reports
  • C++ interface header, library and DLL files are provided
  • OCX interface for VB or ASP.net programming
  • Supports XMPP connection so bcmsSVR can connect to XMPP servers such as Openfire
  • Supports logging of report data to Splunk
  • Supports logging of report data to Kafka
  • Supports logging of report data to MSSQL, MySQL and Oracle database
  • Supports the following real-time and historical BCMS reports
    • monitor bcms split
    • monitor bcms split SLA
    • monitor bcms split status (REST only)
    • monitor bcms split agent stats (REST only)
    • monitor bcms system
    • monitor bcms vdn
    • list bcms split
    • list bcms split day
    • list bcms vdn
    • list bcms vdn day
    • list bcms agent
    • list bcms agent day
    • list bcms trunk
    • list bcms trunk day
    • list bcms summary split
    • list bcms summary spliti day
    • list bcms summary vdn
    • list bcms summary vdn day
    • list bcms summary agent
    • list bcms summary agent day
    • list bcms summary trunk
    • list bcms summary trunk day
  • Provides API for the following commands
    • status trunk
    • display variables
    • change variables
    • display alarms
    • change agent password
    • display agent
    • list measurements hunt-group last-hour
    • list measurements hunt-group yesterday-peak
    • list measurements hunt-group today-peak
    • list measurements trunk-group hourly
    • list measurements trunk-group summary last-hour
    • list measurements trunk-group summary yesterday-peak
    • list measurements trunk-group summary today-peak
    • change agent basic information
    • add agent
    • change agent
    • change agent basic
    • change agent password
    • remove agent
    • add agent skills
    • delete agent skills
    • update agent skills
    • add hunt-group member
    • delete hunt-group member
    • list station
    • list agent
    • list hunt
    • list vdn
    • list trunk
    • list history
    • list multimedia ip-stations
    • list media-gateway
    • status media-gateways
    • display capacity
    • status hunt-group
    • add hunt-group member
    • delete hunt-group member
    • monitor traffic trunk-groups
  • Supported OS
    • Windows
    • CentOS / RedHat
    • Ubuntu
    • Debian
  • Free Tool using bcmsSVR

See Also: clintSVR / CMS Real Time Data

See Also: Call Analytics

See Also: Splunk App Avaya BCMS

See Also: Using Grafana to Monitor Avaya Call Center

See Also: Integration with Grafana and Prometheus using Metrics API

Preparation and Password Encryption

  • The access MDB file stored username and password used by the bcmsSVR program. For security reason, a tool called encryptpasswd.exe is provided to generate encrypted password for the installation and configuration of the software.
  • Execute the program, generate the encrypted password for the user of Avaya CM server, then use the encrypted password when you add ACD object in the program console. For example, the encrypted password for “p@ssword” is “R3NIw1yJMLlnPFzEQtuh2A==”
  • encryptpasswd

64 bit Windows System 

  • For 64 bit Windows system, please follow the steps below
    • Configure ODBC System DSN using C:\Windows\SysWOW64\odbcad32.exe
    • Stop the Windows firewall because it enables by default and we don’t have time to figure out what ports are required to be opened, you need to find it out yourself. BcmsSVR uses TCP port 14017 for telnet console, enable it in firewall so you can configure the program remotely.

OVA File for Testing

centos

We have created a OVA file which you can deploy it to VirtualBox or VMware Workstation or Player for testing.  After deploying the OVA file, please modify the following for your own environment

  • Reference this guide to delete the file /etc/udev/rules.d/70-persistent-net.rules
  • Change the MAC address and IP address of the VM in the file /etc/sysconfig/network-scripts/ifcfg-eth0
  • Telnet to bcmsSVR console port 14017, update parameters for your environment
  • Once the changes are completed, reboot the VM

The username and password of the OVA VM is

  • OS : root/P@ssw0rd
  • MySQL: root/P@ssw0rd
  • bcmsSVR console: tcpgate/tcpgate01
  • Splunk URL: http://newIP:8000/

Installation  

  • We have recorded a video for Windows 2012 64bit, please watch the video before the installation
  • Download the bcmsSVR zip file here or backup site.
  • Follow the steps below to install the software.
    • Extract all the files into directory c:\program files\bcmsSVR
    • Open Windows Command Prompt, enter the following commands to register the program as Windows Service, you need to run command prompt as Administrator when you run Windows 7 or above
      • cd c:\program files\bcmsSVR
      • bcmsSVR -i
      • sc description bcmsSVR “Provides BCMS real-time and historical functions for Avaya CM”
    • Open ODBC Setting, create a System DSN called BCMSSVRCFG for Microsoft Access Driver and select bcmsSVR.mdb which is located in the directory c:\program files\bcmsSVR
    • Start the Windows Service bcmsSVR
    • Telnet to localhost and port number 14017, enter username tcpgate and password tcpgate01 to access the program console
    • Enter the following command to add an acd object
      • add acd 1 10.2.10.100 5023 username encrypted_password pin|NULL name false 
      • Hint: Add an ACD object which the IP address is 10.2.10.100, port 5023 and not using SSH connection
      • Hint: bcmsSVR can manage multiple ACD objects
      • Hint: For security reason, some user configuration come with pin. If your user account has no pin, type NULL there
      • Hint: For SSH connection, set the last parameter to true
    • To turn on trace, enter the following command
      • trace on asc
    • To get help message, enter the following command
      • help

Add Reports

  • Start from version 2.0.0, the command to add bcms report is prefix with “bcms” which is used to distinguish with other reports
  • You can get real time and historical report data by Report Agents or get the data via the supported API interfaces. When you add a Report Agent, the data will be pulled from Avaya CM, then pushed to Splunk and database at an interval that specified by you. When the data has imported to Splunk, you can use Splunk to make customized reports and dashboards. You can also access the stored real time and historical data from the database directly.
  • Telnet to the IP and port number 14017 where bcmsSVR is installed, enter username tcpgate and password tcpgate01 to access the program console
  • To add “monitor bcms split” report, enter the following command
    • add bcmsmonitorsplit 1 640 10 split_640
    • add bcmsmonitorsplit 1 129;640 10 twosplits
    • Hint: 1 is ACD number
    • Hint: 640 is split/skill number
    • Hint: 10 is refresh rate in seconds, the minimum refresh rate is 3 seconds
    • Hint: split_640 is a description
    • Hint: bcmsSVR will push the “monitor bcms split” report data to Splunk and database every 10 seconds
    • Hint: bcmsSVR will keep a copy of the report data in memory as cache, if access the data within bcms_cache_timeout period, the cache data will be provided, this design reduce the loading to Avaya CM
    • Hint: each object is separated by “;” for multiple objects monitoring
  • To add “monitor bcms system” report, enter the following command
    • add bcmsmonitorsystem 2 all 10  allsplits
    • Hint: real time data of all splits in ACD 2 will be pushed to Splunk and database every 10 seconds. Since no split number is provided, split name will be pushed into Splunk and database
    • add bcmsmonitorsystem 2 129;640 10 twosplits 
    • Hint: real time data of two splits 129 and 640 will be pushed to Splunk and database every 10 seconds
  • To add “monitor bcms vdn” report, enter the following command
    • add bcmsmonitorvdn 3 10800;10801 10 twovdns
    • Hint: real time data of vdns 10800 and 10801 in ACD 3 will be pushed to Splunk and database every 10 seconds
  • To ad “status trunk” report, enter the following command
    • add statustrunk 3 26 10 trunk_26
    • add statustrunks 3 26;27 10 twotrunks
    • Hint: real time data of trunk 26 in ACD 3 will be pushed to Splunk and database every 10 seconds
    • Hint: each object is separated by “;” for multiple objects monitoring
  • To add “list bcms split” report, enter the following command
    • add bcmslistsplit 4 640 300 listsplit_640
    • Hint: historical report about split 640 in ACD 4 will be pushed to Splunk and database every 5 minutes
  • To add “list bcms split day” report, enter the following command
    • add bcmslistsplitday 4 640 300 listsplit_640_day
    • Hint: historical report about split 640 daily in ACD 4 will be pushed to Splunk and database every 5 minutes
  • To add “list bcms vdn” report, enter the following command
    • add bcmslistvdn 5 10800 300  listvdn_10800
    • Hint: historical report about vdn 10800 in ACD 5 will be pushed to Splunk and database every 5 minutes
  • To add “list bcms vdn day” report, enter the following command
    • add bcmslistvdnday 5 10800 300  listvdn_10800_day
    • Hint: historical report about vdn 10800 daily in ACD 5 will be pushed to Splunk and database every 5 minutes
  • To add “list bcms agent” report, enter the following command
    • add bcmslistagent 6 40004 300 listagent_40004
    • Hint: historical report about agent 40004 in ACD 6 will be pushed to Splunk and database every 5 minutes
  • To add “list bcms trunk” report, enter the following command
    • add bcmslisttrunk 6 26 300 listtrunk_26
    • Hint: historical report about trunk 26 in ACD 6 will be pushed to Splunk and database every 5 minutes
  • To add “display variables” report, enter the following command
    • add displayvariables 7 all 10 allvariables 
    • Hint: all variables in ACD 7 will be pushed to Splunk and database every 10 seconds
  • To add “list bcms summary split” report, enter the following command
    • add bcmslistsummarysplit 4 640 300 listsummarysplit_640
    • Hint: historical report about split 640 in ACD 4 will be pushed to Splunk and database every 5 minutes
  • To add “list bcms summary vdn” report, enter the following command
    • add bcmslistsummaryvdn 5 10800 300  listsummaryvdn_10800
    • Hint: historical report about vdn 10800 in ACD 5 will be pushed to Splunk and database every 5 minutes
  • To add “list bcms summary agent” report, enter the following command
    • add bcmslistsummaryagent 6 40004 300 listsummaryagent_40004
    • Hint: historical report about agent 40004 in ACD 6 will be pushed to Splunk and database every 5 minutes
  • To add “list bcms summary trunk” report, enter the following command
    • add bcmslistsummarytrunk 6 26 300 listsummarytrunk_26
    • Hint: historical report about trunk 26 in ACD 6 will be pushed to Splunk and database every 5 minutes
  • To add “list measurements hunt-group last-hour” report, enter the following command
    • add listmeashuntgroup 1 lasthour 300 last-hour
    • Hint: Last hour hunt group measurements in ACD 1 will be pushed to Splunk and database every 5 minutes
  • To add “list measurements hunt-group yesterdaypeak” report, enter the following command
    • add listmeashuntgroup 1 yesterdaypeak 300 yesterday-peak
    • Hint: Yesterday peak hunt group measurements in ACD 1 will be pushed to Splunk and database every 5 minutes
  • To add “list measurements hunt-group todaypeak” report, enter the following command
    •  add listmeashuntgroup 1 todaypeak 300 today-pea
    • Hint: Today peak hunt group measurements in ACD 1 will be pushed to Splunk and database every 5 minutes
  • To add “list agent” report, enter the following command
    • add listagent 1 3600 list_agent_every_hour
    • Hint: dump the data from command “list agent” for ACD 1 to database every hour
  • To add “list station” report, enter the following command
    • add liststation 1 3600 list_station_every_hour
    • Hint: dump the data from the command “list station” for ACD 1 to database every hour
  • To add “list vdn” report, enter the following command
    • add listvdn 1 3600 list_vdn_every_hour
    • Hint: dump the data from the command “list vdn” for ACD 1 to database every hour
  • To add “list trunk” report, enter the following command
    • add trunk 1 3600 list_trunk_every_hour
    • Hint: dump the data from the command “list trunk” for ACD 1 to database every hour
  • To add “list history” report, enter the following command
    • add listhistory 1 3600 list_history_every_hour
    • Hint: dump the data from command “list history” for ACD 1 to database every hour
  • To add “list multimedia ip-stations” report, enter the following command
    • add multimediaipstations 1 3600 list_multimedia_ip_stations_every_hour
    • HInt: dump the data from the command “list multimedia ip-stations” for ACD 1 to database every hour
  • To add “list media-gateway” report, enter the following command
    • add listmediagateway 1 3600 list_mediagateway_every_hour
    • HInt: dump the data from the command “list media-gateway” for ACD 1 to database every hour

Logging Report Data to Database 

  • Start from version 2.0.0, the tables for bcms report is prefix with “bcms” which is used to distinguish with other reports
  • The following SQL commands and screen dump are example for MySQL
  • Create database and user
  • mysql -u root -p
  • create database bcms;
  • create user 'tcpgate'@'localhost' identified by 'tcpgate';
  • grant all on bcms.* to 'tcpgate'@'localhost';
  • flush privileges;
  • quit;
  • mysql -h localhost -u tcpgate -p bcms < bcms.sql
  • Open ODBC Setting, create a System DSN called BCMSSVRDBCFG for MySQL database. The following screen dump is for Windows installation
  • bcmssvrdbcfg
  • Copy the following to /etc/odbc.ini for CentOS installation
    • [BCMSSVRDBCFG]
      Description = MySQL connection to bcmsSVR DB
      Driver = MySQL
      Server = localhost
      Port = 3306
      Database = bcms
  • Edit the following parameters for report data database logging
    • bcms_db_dsn
      • Hint: The ODBC System DSN, enter the value is BCMSSVRDBCFG
    • bcms_db_username
      • Hint: The username used to connect the database
    • bcms_db_passwd
      • Hint: The encrypted password of the database user
    • bcms_db_table
      • Hint: One of the table that holds the bcms data, enter the default value tBcmsMonitorSplit
    • bcms_db_errfile
      • Hint: The error file for SQL statements when db error occurred. The default value is bcms_err.txt
    • bcms_errorreportinterval
      • Hint: The error report interval, the default value is 900 seconds (15 minutes)
    • bcms_db_sqltype
      • Hint: Currently mysql, mssql and oracle are supported
    • bcms_db_allreport
      • Hint: Set it to true if you want all report data are sent to database. Set it to false if you want to control it by “add dbreport” command
  • You can find the real time and historical data in database directly
  • listsplitdb

Uninstallation

  • Stop the Window Service bcmsSVR
  • Open Windows Command Prompt, enter the following commands to uninstall the program from Windows Service
    • cd c:\program files\bcmsSVR
    • bcmsSVR -u

Kafka Integration 

  • Change the following parameters in order to have integration with Kafka
    • update parameter bcms_kafkabroker 192.168.1.101:32770,192.168.1.102:32770
      • Hint: Multiple brokers are separated by comma
    • update parameter bcms_kafkatopic bcms
      • Hint: Set the default topic for payload data sent to Kafka
  • You can add more Kafka broker by the following command
    • add kafkabroker 192.168.1.103:32770
  • You can map each report type to different Kafka topic
    • add kafkatopic bcmsmonitorsystem bcms.monitor
      • Hint: For bcmsmonitorsystem reports, the topic bcms.monitor will be used
  • If you want to set Kafka configuration properties, you can use the following command
    • add kafkaconfig security.protocol sasl_plaintext
    • add kafkaconfig sasl.password 40UIt9O3PqtwsSn+Wx6pig== true
      • Hint: Your data is stored in the bcmsSVR configuration database, therefore encryption is required for sensitive information

CentOS 6.x Installation Guide

  • centos
  • The following is for CentOS 6 only
  • The executable file for 32bit version is “bcmsSVR” and the 64bit version is “bcmsSVR64”, copy and use the correct file please
  • Install the following packages
  • Follow this guide to install Kafka library for bcmsSVR version >= 2.1.0
  • yum install mysql-server mysql
  • yum install mysql-connector-odbc unixODBC
  • wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
  • rpm -ivh epel-release-6-8.noarch.rpm
  • yum install libssh
  • Config and start MySQL
  • chkconfig mysqld on
  • service mysqld start
  • Create database and user
  • mysql -u root -p
  • create database bcmssvr;
  • create user 'tcpgate'@'localhost' identified by 'tcpgate';
  • grant all on bcmssvr.* to 'tcpgate'@'localhost';
  • flush privileges;
  • quit
  • mysql -h localhost -u tcpgate -p bcmssvr < bcmssvr.sql
  • Copy the following to /etc/odbc.ini file
    • [BCMSSVRCFG]
      Description = MySQL connection to bcmsSVR configuration
      Driver = MySQL
      Server = localhost
      Port = 3306
      Database = bcmssvr
    • [BCMSSVRDBCFG]
      Description = MySQL connection to bcmsSVR DB
      Driver = MySQL
      Server = localhost
      Port = 3306
      Database = bcms
  • Create user and copy files
  • useradd bcmssvr
  • mkdir /usr/local/bcmssvr
  • cp bcmsSVR /usr/local/bcmssvr
  • chmod +x /usr/local/bcmssvr/bcmsSVR
  • chown -R bcmssvr.bcmssvr /usr/local/bcmssvr
  • mkdir -p /var/log/bcmssvr
  • chown -R bcmssvr.bcmssvr /var/log/bcmssvr
  • Auto start the daemon after server reboot
  • echo "rm /tmp/bcmssvr.log" >> /etc/rc.local
  • echo "su bcmssvr -c '/usr/local/bcmssvr/bcmsSVR'" >> /etc/rc.local

CentOS 7.x Installation Guide

  • centos
  • The following is for RedHat/CentOS 7 64 bit OS only, other Linux distribution is similar
  • Login as root and execute the following commands
  • Disable SELINUX and stop firewall
  • sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/selinux/config
  • systemctl disable firewalld
  • systemctl stop firewalld
  • reboot
  • Install the MySQL 8.x
  • sudo rpm -Uvh https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
    sudo yum --enablerepo=mysql80-community install mysql-community-server
    sudo service mysqld start
    grep "A temporary password" /var/log/mysqld.log
    mysql_secure_installation
  • Install the following packages
  • yum install telnet libssh librdkafka
  • yum install mysql-connector-odbc unixODBC
    
  • Config and start MySQL
  • systemctl enable mysqld
  • systemctl start mysqld
  • Create database and user
  • mysql -u root -p
  • create database bcmssvr;
  • create user 'tcpgate'@'localhost' identified by 'P@ssw0rd';
  • grant all on bcmssvr.* to 'tcpgate'@'localhost';
  • flush privileges;
  • quit
  • mysql -h localhost -u tcpgate -p bcmssvr < bcmssvr.sql
  • Copy the following to /etc/odbc.ini file
    • [BCMSSVRCFG]
      Description = MySQL connection to bcmsSVR Configuration
      Driver =MySQL ODBC 8.0 ANSI Driver
      Server = localhost
      Port = 3306
      Database = bcmssvr
    • [BCMSSVRDBCFG]
      Description = MySQL connection to bcmsSVR DB
      Driver =MySQL ODBC 8.0 ANSI Driver
      Server = localhost
      Port = 3306
      Database = bcms
  • Create user and copy files
  • useradd bcmssvr
  • mkdir /usr/local/bcmssvr
  • cp bcmsSVR64 /usr/local/bcmssvr
  • chmod +x /usr/local/bcmssvr/bcmsSVR64
  • chown -R bcmssvr.bcmssvr /usr/local/bcmssvr
  • mkdir -p /var/log/bcmssvr
  • chown -R bcmssvr.bcmssvr /var/log/bcmssvr
  • Auto start the daemon after server reboot
  • echo "rm -f /tmp/bcmssvr.log" >> /etc/rc.local
  • echo "su bcmssvr -c '/usr/local/bcmssvr/bcmsSVR64 -u tcpgate -p 40UIt9O3PqtwsSn+Wx6pig=='" >> /etc/rc.local
  • chmod +x /etc/rc.local

Ubuntu 14.04 Installation Guide

  • The following is for Ubuntu 14.04 only
  • The executable file of 32 bit version is “bcmsSVR”, the 64 bit version is “bcmsSVR64”
  • Install the following packages
  • sudo apt-get install mysql-server mysql-client
  • sudo apt-get install libmyodbc unixodbc unixodbc-bin
  • sudo apt-get install libssh-4 libssh2-1 openssl unrar
  • Create database and user
  • mysql -u root -p
  • create database bcmssvr;
  • create user 'tcpgate'@'localhost' identified by 'tcpgate';
  • grant all on bcmssvr.* to 'tcpgate'@'localhost';
  • flush privileges;
  • quit
  • mysql -h localhost -u tcpgate -p bcmssvr < bcmssvr.sql
  • Copy the following to /etc/odbcinst.ini file for Ubunt 64bit
    • [MySQL]
      Description = ODBC for MySQL
      Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
      Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
      UsageCount = 1
  • Copy the following to /etc/odbcinst.ini file for Ubunt 32bit
    • [MySQL]
      Description = ODBC for MySQL
      Driver = /usr/lib/i386-linux-gnu/odbc/libmyodbc.so
      Setup = /usr/lib/i386-linux-gnu/odbc/libodbcmyS.so
      UsageCount = 1
  • Install the ODBC driver
  • sudo odbcinst -i -d -f /etc/odbcinst.ini
  • Copy the following to /etc/odbc.ini file
    • [BCMSSVRCFG]
      Description = MySQL connection to bcmsSVR configuration
      Driver = MySQL
      Server = localhost
      Port = 3306
      Socket = /var/run/mysqld/mysqld.sock
      Database = bcmssvr
    • [BCMSSVRDBCFG]
      Description = MySQL connection to bcmsSVR DB
      Driver = MySQL
      Server = localhost
      Port = 3306
      Socket = /var/run/mysqld/mysqld.sock
      Database = bcms
  • Install your system DSN
  • sudo odbcinst -i -s -l -f /etc/odbc.ini
  • Create user and copy files
  • sudo useradd bcmssvr
  • sudo mkdir /usr/local/bcmssvr
  • sudo cp bcmsSVR /usr/local/bcmssvr
  • sudo chmod +x /usr/local/bcmssvr/bcmsSVR
  • sudo chown -R bcmssvr.bcmssvr /usr/local/bcmssvr
  • sudo mkdir -p /var/log/bcmssvr
  • sudo chown -R bcmssvr.bcmssvr /var/log/bcmssvr
  • Auto start the daemon after server reboot, add the following before ‘exit 0’ to /etc/rc.local file
  • rm -f /tmp/bcmssvr.log
  • su bcmssvr -c '/usr/local/bcmssvr/bcmsSVR'

Ubuntu 16.04 Installation Notes

  • Follow this guide to install MySQL ODBC driver “libmyodbc” on Ubuntu 16.04

Ubuntu 18.04 Installation Notes

  • Install librdkafka-dev package
    • sudo apt-get install librdkafka-dev
  • Follow this guide to install MySQL ODBC driver “libmyodbc” on Ubuntu 18.04
  • Follow this guide to create the /etc/rc.local file

Debian 10.x Installation Guide

  • The following is for Debian 10.x only
  • Install the following packages
  • sudo apt-get install mariadb-server mariadb-client
  • sudo apt-get install unixodbc unixodbc-bin
  • sudo apt-get install libssh-4 libssh2-1 openssl librdkafka-dev
  • mkdir odbc_package
  • cd odbc_package
  • wget https://downloads.mariadb.com/Connectors/odbc/latest/mariadb-connector-odbc-3.1.9-debian-buster-amd64.tar.gz
  • tar xzvf mariadb-connector-odbc-3.1.9-debian-buster-amd64.tar.gz
  • cd mariadb-connector-odbc-3.1.9-debian-buster-amd64
  • sudo install lib/mariadb/libmaodbc.so /usr/lib64/
  • sudo install -d /usr/lib64/mariadb/
  • sudo install -d /usr/lib64/mariadb/plugin/
  • sudo install lib/mariadb/plugin/auth_gssapi_client.so /usr/lib64/mariadb/plugin/
  • sudo install lib/mariadb/plugin/caching_sha2_password.so /usr/lib64/mariadb/plugin/
  • sudo install lib/mariadb/plugin/client_ed25519.so /usr/lib64/mariadb/plugin/
  • sudo install lib/mariadb/plugin/dialog.so /usr/lib64/mariadb/plugin/
  • sudo install lib/mariadb/plugin/mysql_clear_password.so /usr/lib64/mariadb/plugin/
  • sudo install lib/mariadb/plugin/sha256_password.so /usr/lib64/mariadb/plugin/
  • Create database and user
  • sudo mysql -u root -p
  • create database bcmssvr;
  • create user 'tcpgate'@'localhost' identified by 'tcpgate';
  • grant all on bcmssvr.* to 'tcpgate'@'localhost';
  • create database bcms;
  • grant all on bcms.* to 'tcpgate'@'localhost';
  • flush privileges;
  • quit
  • mysql -h localhost -u tcpgate -p bcmssvr < bcmssvr.sql
  • mysql -h localhost -u tcpgate -p bcms < bcms_MYSQL.sql
  • Create a template file  MariaDB_odbc_driver_template.ini
    • [MariaDB ODBC 3.0 Driver]
      Description = MariaDB Connector/ODBC v.3.0
      Driver = /usr/lib64/libmaodbc.so
  • Install the ODBC driver
  • sudo odbcinst -i -d -f MariaDB_odbc_driver_template.ini
  • Create a template file bcmssvr_template.ini
    • [BCMSSVRCFG]
      Description = MariaDB connection to bcmsSVR configuration
      Driver = MariaDB ODBC 3.0 Driver
      Server = localhost
      Port = 3306
      Socket = /var/run/mysqld/mysqld.sock
      Database = bcmssvr
    • [BCMSSVRDBCFG]
      Description = MariaDB connection to bcmsSVR DB
      Driver = MariaDB ODBC 3.0 Driver
      Server = localhost
      Port = 3306
      Socket = /var/run/mysqld/mysqld.sock
      Database = bcms
  • Install your system DSN
  • sudo odbcinst -i -s -l -f bcmssvr_template.ini
  • Create user and copy files
  • sudo useradd bcmssvr
  • sudo mkdir /usr/local/bcmssvr
  • sudo cp bcmsSVR64 /usr/local/bcmssvr
  • sudo chmod +x /usr/local/bcmssvr/bcmsSVR64
  • sudo chown -R bcmssvr.bcmssvr /usr/local/bcmssvr
  • sudo mkdir -p /var/log/bcmssvr
  • sudo chown -R bcmssvr.bcmssvr /var/log/bcmssvr
  • Follow this guide to create /etc/rc.local file
  • Auto start the daemon after server reboot, add the following before ‘exit 0’ to /etc/rc.local file
  • rm -f /tmp/bcmssvr.log
  • su bcmssvr -c '/usr/local/bcmssvr/bcmsSVR64'

Dictionary 

  • The program supports dictionary for objects such as agentid, split/skill and vdn so your mapped name are presented in the resulting XML string.
  • To add new dictionary, enter the following command
    • add dict
    • Hint: Enter the acdid and mappedName when they are prompted

REST Query API 

C++ API Interface 

  • Start from version 2.0.0, the api for bcms report is prefix with “bcmsapi_” which is used to distinguish with other reports
  • To enable C++ API interface, enter the following command in the program console
    • add tcp 5050 * * custom bcmsapi
      • Hint: 5050 is the port number for the C++ API interface, choose one that fits your environment
  • Sample code is provided
// 
// bcmsApp.cpp
//

#include "bcms.h"
#include 
#include 
#include 
using namespace std;

int main(int argc, char** argv)
{
    BCMS_HANDLE handle; 
    BCMSLogin_t login; 
    BCMSMonitorSplit_t monitorSplit; 
    BCMSMonitorSystem_t monitorSystem; 
    BCMSMonitorVdn_t monitorVdn; 
    BCMSStatusTrunk_t statusTrunk; 
    BCMSListSplit_t listSplit; 
    BCMSListVdn_t listVdn; 
    BCMSListAgent_t listAgent; 
    BCMSListTrunk_t listTrunk; 
    BCMSListSummarySplit_t listSummarySplit; 
    BCMSListSummaryVdn_t listSummaryVdn; 
    BCMSListSummaryAgent_t listSummaryAgent; 
    BCMSListSummaryTrunk_t listSummaryTrunk; 
    BCMSDisplayVariables_t displayVariables; 
    BCMSChangeVariables_t changeVariables; 
    BCMSDisplayAlarms_t displayAlarms; 
    BCMSListMeasurementsHuntGroup_t measHuntGroup;
    BCMSDisplayAgent_t displayAgent;
    BCMSChangeAgentBasic_t changeAgentBasic;
    BCMSAddAgentSkill_t addAgentSkill;
    BCMSDeleteAgentSkill_t deleteAgentSkill;
    BCMSUpdateAgentSkill_t updateAgentSkill;
    unsigned int bufferSize; 

    memset(&login, 0x00, sizeof(BCMSLogin_t)); 
    strcpy(login.username, "app");
    strcpy(login.passwd, "app"); 
    if (bcmsapi_Login(&handle, "127.0.0.1", 5050, &login)==BCMSRC_SUCC) {
    // update agent skill
    memset(&updateAgentSkill, 0x00, sizeof(BCMSUpdateAgentSkill_t));
    updateAgentSkill.acd = 6; 
    strcpy(updateAgentSkill.agent, "50101");
    strcpy(updateAgentSkill.skill[0].sn, "910");
    strcpy(updateAgentSkill.skill[0].sl, "1"); 
    strcpy(updateAgentSkill.skill[1].sn, "911");
    strcpy(updateAgentSkill.skill[1].sl, "1"); 
    if (bcmsapi_UpdateAgentSkill(handle, &updateAgentSkill, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            string xml = string((char*)&buffer[0], buffer.size());
            cout << &buffer[0] << endl; 
        }
    }
    // delete agent skill
    memset(&deleteAgentSkill, 0x00, sizeof(BCMSDeleteAgentSkill_t));
    deleteAgentSkill.acd = 6; 
    strcpy(deleteAgentSkill.agent, "50101");
    strcpy(deleteAgentSkill.skill[0].sn, "910");
    strcpy(deleteAgentSkill.skill[1].sn, "911");
    if (bcmsapi_DeleteAgentSkill(handle, &deleteAgentSkill, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            string xml = string((char*)&buffer[0], buffer.size());
            cout << &buffer[0] << endl; 
        }
    }
    // add agent skill
    memset(&addAgentSkill, 0x00, sizeof(BCMSAddAgentSkill_t));
    addAgentSkill.acd = 6; 
    strcpy(addAgentSkill.agent, "50101");
    strcpy(addAgentSkill.skill[0].sn, "910");
    strcpy(addAgentSkill.skill[0].sl, "1"); 
    strcpy(addAgentSkill.skill[1].sn, "911");
    strcpy(addAgentSkill.skill[1].sl, "1"); 
    if (bcmsapi_AddAgentSkill(handle, &addAgentSkill, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            string xml = string((char*)&buffer[0], buffer.size());
            cout << &buffer[0] << endl; 
        }
    }
    // display agent 
    memset(&displayAgent, 0x00, sizeof(BCMSDisplayAgent_t));
    displayAgent.acd = 6;
    strcpy(displayAgent.agent, "50101");
    if (bcmsapi_DisplayAgent(handle, &displayAgent, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            cout << &buffer[0] << endl; 
        }
    }
    // change agent basic 
    memset(&changeAgentBasic, 0x00, sizeof(BCMSChangeAgentBasic_t));
    changeAgentBasic.acd = 6;
    strcpy(changeAgentBasic.agent, "50101");
    strcpy(changeAgentBasic.name, "Hello World");
    strcpy(changeAgentBasic.tn, "3");
    strcpy(changeAgentBasic.cor, "5"); 
    if (bcmsapi_ChangeAgentBasic(handle, &changeAgentBasic, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            string xml = string((char*)&buffer[0], buffer.size());
            cout << &buffer[0] << endl; 
        }
    }
 
    // list measurement hunt group 
    memset(&measHuntGroup, 0x00, sizeof(BCMSListMeasurementsHuntGroup_t));
    measHuntGroup.acd = 1;
    if (bcmsapi_ListMeasurementsHuntGroupLastHour(handle, &measHuntGroup, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            cout << &buffer[0] << endl; 
        }
    }
    memset(&measHuntGroup, 0x00, sizeof(BCMSListMeasurementsHuntGroup_t));
    measHuntGroup.acd = 1;
    if (bcmsapi_ListMeasurementsHuntGroupYesterdayPeak(handle, &measHuntGroup, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            cout << &buffer[0] << endl; 
        }
    }
    memset(&measHuntGroup, 0x00, sizeof(BCMSListMeasurementsHuntGroup_t));
    measHuntGroup.acd = 1;
    if (bcmsapi_ListMeasurementsHuntGroupTodayPeak(handle, &measHuntGroup, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            cout << &buffer[0] << endl; 
        }
    }
    // monitor split
    memset(&monitorSplit, 0x00, sizeof(BCMSMonitorSplit_t)); 
    monitorSplit.acd = 1; 
    strcpy(monitorSplit.split, "640");
    if (bcmsapi_BcmsMonitorSplit(handle, &monitorSplit, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            cout << &buffer[0] << endl; 
        }
    }
    // monitor system
    memset(&monitorSystem, 0x00, sizeof(BCMSMonitorSystem_t)); 
    monitorSystem.acd = 1; 
    strcpy(monitorSystem.split, "640");
    if (bcmsapi_BcmsMonitorSystem(handle, &monitorSystem, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            cout << &buffer[0] << endl; 
        }
    }
    // monitor vdn
    memset(&monitorVdn, 0x00, sizeof(BCMSMonitorVdn_t)); 
    monitorVdn.acd = 1; 
    strcpy(monitorVdn.vdn, "10800");
    if (bcmsapi_BcmsMonitorVdn(handle, &monitorVdn, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            cout << &buffer[0] << endl; 
        }
    }
    // status trunk 
    memset(&statusTrunk, 0x00, sizeof(BCMSStatusTrunk_t)); 
    statusTrunk.acd = 1; 
    strcpy(statusTrunk.trunk, "26");
    if (bcmsapi_StatusTrunk(handle, &statusTrunk, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            cout << &buffer[0] << endl; 
        }
    }
    // list split
    memset(&listSplit, 0x00, sizeof(BCMSListSplit_t)); 
    listSplit.acd = 1; 
    strcpy(listSplit.split, "640");
    if (bcmsapi_BcmsListSplit(handle, &listSplit, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            cout << &buffer[0] << endl; 
        }
    }
    // list summary split
    memset(&listSummarySplit, 0x00, sizeof(BCMSListSummarySplit_t)); 
    listSummarySplit.acd = 1; 
    strcpy(listSummarySplit.split, "640");
    if (bcmsapi_BcmsListSummarySplit(handle, &listSummarySplit, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            cout << &buffer[0] << endl; 
        }
    }
    // list vdn
    memset(&listVdn, 0x00, sizeof(BCMSListVdn_t)); 
    listVdn.acd = 1; 
    strcpy(listVdn.vdn, "10800");
    if (bcmsapi_BcmsListVdn(handle, &listVdn, &bufferSize)==BCMSRC_SUCC) {
       vector<unsigned char> buffer(bufferSize); 
       if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
           cout << &buffer[0] << endl; 
       }
    }
    // list summary vdn
    memset(&listSummaryVdn, 0x00, sizeof(BCMSListSummaryVdn_t)); 
    listSummaryVdn.acd = 1; 
    strcpy(listSummaryVdn.vdn, "10800");
    if (bcmsapi_BcmsListSummaryVdn(handle, &listSummaryVdn, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            cout << &buffer[0] << endl; 
        }
    }
    // list agent
    memset(&listAgent, 0x00, sizeof(BCMSListAgent_t)); 
    listAgent.acd = 1; 
    strcpy(listAgent.agent, "40004");
    if (bcmsapi_BcmsListAgent(handle, &listAgent, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            cout << &buffer[0] << endl; 
        }
    }
    // list summary agent
    memset(&listSummaryAgent, 0x00, sizeof(BCMSListSummaryAgent_t)); 
    listSummaryAgent.acd = 1; 
    strcpy(listSummaryAgent.agent, "40004");
    if (bcmsapi_BcmsListSummaryAgent(handle, &listSummaryAgent, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            cout << &buffer[0] << endl; 
        }
    }
    // list trunk
    memset(&listTrunk, 0x00, sizeof(BCMSListTrunk_t)); 
    listTrunk.acd = 1; 
    strcpy(listTrunk.trunk, "26");
    if (bcmsapi_BcmsListTrunk(handle, &listTrunk, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            cout << &buffer[0] << endl; 
        }
    }
    // list summary trunk
    memset(&listSummaryTrunk, 0x00, sizeof(BCMSListSummaryTrunk_t)); 
    listSummaryTrunk.acd = 1; 
    strcpy(listSummaryTrunk.trunk, "26");
    if (bcmsapi_BcmsListSummaryTrunk(handle, &listSummaryTrunk, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            cout << &buffer[0] << endl; 
        }
    }
    // display variables 
    memset(&displayVariables, 0x00, sizeof(BCMSDisplayVariables_t));
    displayVariables.acd = 4; 
    strcpy(displayVariables.variables, "all"); 
    if (bcmsapi_DisplayVariables(handle, &displayVariables, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            cout << &buffer[0] << endl; 
        }
    }
    // change variables 
    memset(&changeVariables, 0x00, sizeof(BCMSChangeVariables_t));
    changeVariables.acd = 4; 
    strcpy(changeVariables.variable, "A"); 
    strcpy(changeVariables.description, "BadWeather");
    strcpy(changeVariables.type, "collect");
    strcpy(changeVariables.scope, "G");
    strcpy(changeVariables.length, "5");
    strcpy(changeVariables.start, "1");
    strcpy(changeVariables.assignment, "12345");
    if (bcmsapi_ChangeVariables(handle, &changeVariables, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            cout << &buffer[0] << endl; 
        }
    }
    // display alarms 
    memset(&displayAlarms, 0x00, sizeof(BCMSDisplayAlarms_t));
    displayAlarms.acd = 4; 
    displayAlarms.active = true; 
    displayAlarms.resolved = false; 
    displayAlarms.major = true; 
    displayAlarms.minor = true; 
    displayAlarms.warning = false; 
    if (bcmsapi_DisplayAlarms(handle, &displayAlarms, &bufferSize)==BCMSRC_SUCC) {
        vector<unsigned char> buffer(bufferSize); 
        if (bcmsapi_GetResultXML(handle, &buffer[0], bufferSize)==BCMSRC_SUCC) {
            cout << &buffer[0] << endl; 
        }
    }
    bcmsapi_Logout(handle); 
 }
 return 0;
}

XMPP Connection

bcmsxmpp

  • Modify the following parameters in bcmsSVR.mdb for the XMPP feature
    • bcms_xmpp_jid
      • jid such as “yourname@company.com”
    • bcms_xmpp_username
      • username is used if  bcms_xmpp_jid is not used for authentication
    • bcms_xmpp_passwd
      • use the utility encryptpasswd.exe to generate an encrypted password
    • bcms_xmpp_server
      • xmpp server IP or hostname
    • bcms_xmpp_port
      • xmpp server port
    • bcms_xmpp_saslmethod
      • authentication methods such as plain, digestmd5 and crammd5
  • Supported XMPP servers
    • Openfire 3.91.

Splunk Connection

  • Create index for bcmsSVR
  • bcmsindex
  • Create TCP input for bcmsSVR
  • bcmstcpinput
  • Login bcmsSVR program console and update two parameters
    • update parameter bcms_splunk_host 10.10.10.123
      • Hint: 10.10.10.123 is the IP address of Splunk
    • update parameter bcms_splunk_port 14017
      • Hint: 14017 is the port number that defined in Spunk for bcmsSVR data
    • update parameter bcms_splunk_allreport true
      • Hint: Set it to true if you want all report data are sent to Splunk. Set it to false if you to control it by “add splunkreport” command
    • reload
  • Search the report in Splunk
  • bcmssearch
  • Graphs can be plotted easily using the report data, for example
  • agentAvailableGraph
  • agentsAuxGraph
  • agentsExtnCallsGraph
  • percentWithinServiceLevelGraph
  • avgSpeedAnsGraph
  • acdCallsGraphavgTimeTalkHoldGraph

Know Problem

  • During the restart process of Splunk, bcmsSVR is unable to send raw data to Splunk and missing data will be anticipated

Support and License

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s