Archive for September, 2014

Introduction

bcmssvr

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 development of call center reports and wallboard applications. The bcmsSVR retrieves BCMS and other reports at an interval that specified by you, it stores the real time and historical data in database, Splunk and memory which enables multiple programs access the data via REST query API, OCX and C/C++ DLL interfaces. The data is presented in XML format, 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 server such as Openfire
  • Supports logging of report data to Splunk
  • 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 system
    • monitor bcms vdn
    • list bcms split
    • list bcms vdn
    • list bcms agent
    • list bcms trunk
    • list bcms summary split
    • list bcms summary vdn
    • list bcms summary agent
    • list bcms summary trunk
  • 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
    • change agent basic information
    • add agent skills
    • delete agent skills
    • update agent skills
    • list station
    • list agent
    • list vdn
    • list history
  • Supported OS
    • Windows
    • CentOS 6.x
    • Ubuntu 14.04

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
    • Download and install the Microsoft Visual C++ 2008 Service Pack 1 Redistributable Package MFC Security Update (x86 version) http://www.microsoft.com/en-hk/download/details.aspx?id=26368
    • 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

  • IP address of the CentOS VM
  • 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
    • 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 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 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 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 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 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

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

CentOS 6.x Installation Guide

  • 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
  • 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

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 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'

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 

  • Start from version 2.0.0, the command for bcms report is prefix with “bcms” which is used to distinguish with other reports
  • To enable REST query API, enter the following command in the program console
    • add tcp 8088 * * custom bcmsrest
      • Hint: 8088 is the port number for the REST query API, choose one that fits your environment
  • The URL syntax for Monitor Split is
    • http://bcmsSVRIP:8088/bcmsmonitorsplit?acd=1&split=640
    • http://bcmsSVRIP:8088/bcmsmonitorsplit?acd=1&description=split_640
    • Hint: The Monitor Split report is retrieved from cache or directly from CM
    • Hint: The report is searchable by split and description parameters, make sure the description value is uniquely identified
    • The browser will display the following XML result
    • monitorsplit
  • The URL syntax for Monitor System Report is
    • http://bcmsSVRIP:8088/bcmsmonitorsystem?acd=1&split=129;640
    • http://bcmsSVRIP:8088/bcmsmonitorsystem?acd=1&description=projectA
    • Hint: 1 is the ACD number
    • Hint: The report is also searchable by description parameter, make sure the description value is uniquely identified
    • Hint: The browser will display the following XML result
    • monitorsystem
  • The URL syntax for Monitor VDN is
    • http://bcmsSVRIP:8088/bcmsmonitorvdn?acd=1&vdn=10080;10801
    • Hint: The report is also searchable by description parameter, make sure the description value is uniquely identified
    • Hint: The browser will display the following XML result
    • monitorvdn
  • The URL syntax for Status Trunk Report is
  • The URL syntax for List Split Report is
    • http://bcmsSVRIP:8088/bcmslistsplit?acd=1&split=640
    • http://bcmsSVRIP:8088/bcmslistsplit?acd=1&description=listsplit_640
    • The browser will display the following XML result
    • listsplit
  • The URL syntax for List Summary Split Report is
    • http://bcmsSVRIP:8088/bcmslistsummarysplit?acd=1&split=640
    • http://bcmsSVRIP:8088/bcmslistsummarysplit?acd=1&description=listsummarysplit_640
    • The browser will display the following XML result
    • listsummarysplit
  • The URL syntax for List VDN Report is
    • http://bcmsSVRIP:8088/bcmslistvdn?acd=1&vdn=10800
    • http://bcmsSVRIP:8088/bcmslistvdn?acd=1&description=listvdn_10800
    • The browser will display the following XML result
    • listvdn
  • The URL syntax for List Summary VDN Report is
    • http://bcmsSVRIP:8088/bcmslistsummaryvdn?acd=1&vdn=10800
    • http://bcmsSVRIP:8088/bcmslistsummaryvdn?acd=1&description=listsummaryvdn_10800
    • The browser will display the following XML result
    • listsummaryvdn
  • The URL syntax for List Agent Report is
    • http://bcmsSVRIP:8088/bcmslistagent?acd=1&agent=40004
    • http://bcmsSVRIP:8088/bcmslistagent?acd=1&description=listagent_40004
    • The browser will display the following XML result
    • listagent
  • The URL syntax for List Summary Agent Report is
    • http://bcmsSVRIP:8088/bcmslistsummaryagent?acd=1&agent=40004
    • http://bcmsSVRIP:8088/bcmslistsummaryagent?acd=1&description=listsummaryagent_40004
    • The browser will display the following XML result
    • listsummaryagent
  • The URL syntax for List Trunk Report is
    • http://bcmsSVRIP:8088/bcmslisttrunk?acd=1&trunk=26
    • http://bcmsSVRIP:8088/bcmslisttrunk?acd=1&description=listtrunk_26
    • The browser will display the following XML result
    • listtrunk
  • The URL syntax for List Summary Trunk Report is
    • http://bcmsSVRIP:8088/bcmslistsummarytrunk?acd=1&trunk=26
    • http://bcmsSVRIP:8088/bcmslistsummarytrunk?acd=1&description=listsummarytrunk_26
    • The browser will display the following XML result
    • listsummarytrunk
  • The URL syntax for Display Variables
    • http://bcmsSVRIP:8088/displayvariables?acd=4&variables=A;B
    • displayvariables
  • The URL for Change Variables
    • http://bcmsSVRIP:8088/changevariables?acd=4&variable=A&description=BadWeather&type=collect&scope=G&length=1&start=1&assignment=8
    • changevariables
  • The URL for Display Alarms
    • http://bcmsSVRIP:8088/displayalarms?acd=4&active=y&resolved=n&major=y&minor=y&warning=n
    • displayalarm
  • The URL for Display Agent
  • The URL for Change Agent Password
  • The URL for List Measurements Hunt Group
  • The URL for Change Agent Basic
  • The URL for Add Agent Skills
  • The URL for Delete Agent Skills
  • The URL for Update Agent Skills

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