Archive for the ‘TSAPI’ Category

This post is about using Nagios plugin check_json to monitor system status. Since CtiSVR can return XML or JSON as payload over the REST interface, we can use the check_json plugin to monitor Avaya resource such as Trunk Group and ACD Hunt Group.

For example, the following command is to query Avaya Trunk Group (TAC) 3491, the result is is WARNING if the used trunks over 15 and CRITICAL if the used trunk over 20. The threshold format for Nagios is here.

check_json.pl --url 'http://$HOSTADDRESS$:9001/querytrunkgroup?tac=3491&payload=json' --attribute '{usedtrunks}' -w15 -c20 --perfvars 'idletrunks,usedtrunks'

To monitor Avaya Hunt Group such as the number of call queued, we can use the following command to monitor ACD Hunt Group 20666, the result is WARNING when the number of call queued over 0 and it is CRITICAL when the number of call queued over 5.

check_json.pl --url 'http://$HOSTADDRESS$:9001/queryacdsplit?split=20666&payload=json' --attribute '{callsqueue}' -w0 -c5 --perfvars 'callsqueue'
Advertisements

AstLogger 1.4.13 and DMCCLogger 1.0.2 just released. The updates are

1. Fixed AES 7.0 SingleStepConference failed issue in AstLogger.
2. Supports waveform display in the AstLoggerWeb and DMCCLoggerWeb applications.

Call Analytics

Posted: April 30, 2017 in TSAPI

Introduction

Call Analytics tool is a server program that monitors Avaya VDNs, ACD Hunt Groups and Extension objects, it extracts useful information from monitoring events and outputs call and agent records for applications such as reporting, wallboard integration and call log analysis. The Call Analytics tool is a CTI reporting and real time monitoring engine and it is an ideal tool when CMS is not in placed for call center environment.

callanalytics

The Call Analytics tool uses Avaya TSAPI library, it monitors these Avaya objects and produces the data for real time reports, splunk and database logging. Also, the data can be accessed by various interfaces such as API DLL, database and REST interface. The Call Analytics tool is useful in the following areas:

  • To detect nuisance call attacks by monitoring abandon calls and short duration calls
  • To detect fraud activities such as KPI manipulation which caused by agent short duraton calls
  • To identify the callers of the abandon and short duration calls
  • To capture user data from TSAPI UUI and store the user data together with the call data in Splunk and database
  • To provide real time data for building of real time reports and dashboards
  • To trace a call from its beginning to end, multiple call records can be correlated by common key such as UCID
  • To list customers waiting in queue together with their calling number and waiting time
  • To find out how long each customer waits for an agent
  • To find out the frequency and duration of an agent to perform hold call
  • To find out agent or customer who hangups a call first
  • Uses the VDN detail call logging which stored in the database for different kind of reports
  • Uses the abandon and short duration data for different kind of CRM application

Preparation and Password Encryption

  • The access MDB file stored the username and password of AE server. For security reason, a tool called encryptpasswd.exe is provided to generate an encrypted password for the installation and configuration of the software in Windows environment
  • Execute the program, generate an encrypted password for the AE server CTI user, then paste the encrypted password to parameter ca_tlink01 or ca_tlink02. 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

Installation

  • Download the TSAPI client for Windows 32-bit from Avaya web site, it contains the TSAPI library files. DevConnect registration is required before you can access the download page.
  • Download the Call Analytics Tool zip file here.
  • Follow the installation steps below to install the software.
    • Extract all the files into directory c:\program files\callanalytics
    • Open Windows Command Prompt, enter the following commands to register the program as Windows Service.
      • cd c:\program files\callanalytics
      • callanalytics -i
    • Open ODBC Setting, create System DSN called CALLANALYTICSCFG for Microsoft Access Driver and point to callanalytics.mdb which is located in the directory c:\program files\callanalytics
    • Open the Access file, edit the value of parameters ca_tlink_01 and ca_tlink_02 to the TLINK of your AES servers in the tParameter table.
    • Edit the value of parameter ca_movingavgmin to define the moving average period for the calculation of abandon and short duration call rate. The default value is 15 minutes.
    • Edit the value of parameter ca_intervalstatmin to define the interval statistics period for the calculation of abandon and short duration call rate. The default value is 30 minutes.
    • Edit the value of parameter ca_shortduration to define the number of seconds for short duration calls. The default value is 3 seconds.
    • Edit the value of parameter ca_agentstatechecksplit to true when you want to poll agent state of agents that login to split, the default value is true
    • Edit the value of parameter ca_agentstaterefreshrate to the number of seconds for each polling, the default value is 15 seconds, the minimum value is 5 seconds.
    • Edit the value of parameter ca_cache_timeout to define the number of seconds as cache time for real time reports. This setting reduce the AES loading when multiple clients retrieve the same report during the cache period.
    • Edit the value of parameters ca_splunkhost and ca_splunkport with IP address of Splunk and port number for TCP data input.
    • Start the Windows Service callanalytics
    • Telnet to localhost and port number 14003, enter username tcpgate and password tcpgate01 to access the program console.
    • Enter the following command in the program console, you will receive information when there is call abandon and short duration call.
      • trace on asc
    • Enter the following command to add your VDN
      • add vdn xxxxx
    • Enter the following command to add your ACD
      • add acd xxxxx
    • Enter the following command to add your Extension
      • add extension xxxxx
    • Enter the following command to display help message
      • help
  • After installation, we can use Splunk to implement real time and historical reports. These reports can be viewed as Splunk Dashboards. Also we can use to send Alert when certain predefined condition is occurred. The following is description is for each of the scenario and the Splunk search command and Visualization are provided for your easy reference.

Real Time Agent Snapshot  

  • You need to add a report agent to execute agent snapshot report in order to generate the data to Splunk, the command to add this report in tcpgate console is
    •  add agentsnapshot all 15 agent_snapshot_every_15s
    • Hint: Execute agent snapshot report every 15 seconds
  • To snapshot the current status of each agent, the Splunk command is
  • index=callanalytics logtype=agentsnapshot [search index=callanalytics logtype=agentsnapshot progress=end | head 1 | fields + timestamp] progress=start | chart count by mode, talkstate
  • The Splunk Visualization is
  • We can add the report to Spunk Dashboard with refresh rate 15 seconds, the final result is

Real Time Calls in Queue for Specific Split

  • You need to add a report agent to execute the SplitSkillStatus report in order to generate data to Splunk, the command to add this report in tcpgate console is
    • add splitskillstatus xxxxx 15 SplitSkillStatus_15s
    • Hint: Execute SplitSkillStatus report every 15 seconds
  • To find calls in queue for a specific split, the Splunk command is
  • index=callanalytics logtype=splitskillstatus  split=xxxxx | head 1 | stats values(callsqueue) as CallQueued 
  • Replace the xxxxx with the specific split, the Splunk Visualization is
  • We can add the report to Spunk Dashboard with refresh rate 15 seconds, the final result is

Real Time Top 10 AUX Agents with Reason Code

  • To find out the top 10 AUX agents with longest duration, the Splunk command is
  • index=callanalytics logtype=agentsnapshot [search index=callanalytics logtype=agentsnapshot progress=end | head 1 | fields + timestamp] progress=start mode=AUX | table agentid, duration, reasoncode | sort - duration limit=10
  • The Splunk Visualization is
  • We can add the report to Spunk Dashboard with refresh rate 15 seconds, the final result is

Real Time Split Skill Status Summary – Moving Statistics

  • To display major moving statistics of all splits , the Splunk command is
  • index=callanalytics logtype=splitskillstatus | dedup split sortby -time | table split, agentsavailable, agentslogon, callsqueue, awt, lwt, ms_asa, ms_acdcalls, ms_avgacdtime, ms_abancalls, ms_abanrate
  • The Splunk Visualization is
  • We can add the report to Spunk Dashboard with refresh rate 15 seconds, the final result is

Real Time Split Skill Status Summary – Interval Statistics

  • To display major current interval statistics of all splits , the Splunk command is
  • index=callanalytics logtype=splitskillstatus | dedup split sortby -time | table is_starttime, is_endtime, split, agentsavailable, agentslogon, callsqueue, awt, lwt, is_asa, is_acdcalls, is_avgacdtime, is_abancalls, is_abanrate
  • The Splunk Visualization is
  • We can add the report to Spunk Dashboard with refresh rate 15 seconds, the final result is

Real Time Top 10 Connected Calls Sorted by Duration 

  • You need to add a report agent to execute the SplitSkillStatus report in order to generate data to Splunk, the command to add this report in tcpgate console is
    • add vdnsnapshot all 15 vdnsnapshot_every_15s
    • Hint: Execute vdn snapshot report every 15 seconds
  • To display top 10 connected calls sorted by duration , the Splunk command is
  • index=callanalytics logtype=vdnsnapshot [search index=callanalytics logtype=vdnsnapshot progress=end | head 1 | fields + timestamp] progress=start callstate!=queued | eval caller = if (len(calling)>len(origcalling),calling,origcalling) | table vdn, split, caller, agentid, answering, callstate, callduration, trunkgroup, trunkmember | sort - callduration limit=10
  • The Splunk Visualization is
  • We can add the report to Spunk Dashboard with refresh rate 15 seconds, the final result is

Real Time Top 10 Queued Calls Sorted by Duration 

  • To display top 10 queued calls sorted by duration , the Splunk command is
  • index=callanalytics logtype=vdnsnapshot [search index=callanalytics logtype=vdnsnapshot progress=end | head 1 | fields + timestamp] progress=start callstate=queued | eval caller = if (len(calling)>len(origcalling),calling,origcalling) | table vdn, split, caller, agentid, answering, callstate, callduration, trunkgroup, trunkmember | sort - callduration limit=10
  • The Splunk Visualization is
  • We can add the report to Spunk Dashboard with refresh rate 15 seconds, the final result is

Real Time AUX Reason with Average Duration

  • To display the distribution of AUX reason code together with the average duration, the Splunk command is
  • index=callanalytics logtype=agentsnapshot [search index=callanalytics logtype=agentsnapshot progress=end | head 1 | fields + timestamp] | rename reasoncode as "AUX Reason" | chart count as Count, avg(duration) as Duration by "AUX Reason" | eval Duration=round(Duration,0) 
  • The Splunk Visualization is
  • We can add the report to Spunk Dashboard with refresh rate 15 seconds, the final result is

Database Logging

  • The following example is to create MySQL database and tables
  • CREATE DATABASE callanalytics;
    CREATE USER 'callanalytics'@'localhost' IDENTIFIED BY 'analyticscall';
    CREATE USER 'callanalytics'@'%' IDENTIFIED BY 'analyticscall';
    GRANT ALL ON callanalytics.* TO 'callanalytics'@'localhost';
    GRANT ALL ON callanalytics.* TO 'callanalytics'@'%';
    FLUSH PRIVILEGES;
  • Use mysql to import table information as follow:
  • mysql -h localhost -u callanalytics -p callanalytics < callanalytics.sql
  • Open ODBC Setting, create a System DSN called CALLANALYTICSDBCFG for MySQL ODBC Driver, MySQL is used to store callinfo, abandon and short duration calls details information.
  • Edit the parameters follow:
    • ca_dbsqltype, supported database such as mysqlmssql and oracle
    • ca_dbdsn, enter the ODBC System DSN, the default value is CALLANALYTICSDBCFG
    • ca_dbusername, the username used to connect the database, default value is callanalytics
    • ca_dbpasswd, the password used to connect the database, default value is encrypted password spT+9YcyxYwZuoi5z2+8Qg==
    • ca_writecallinfo, set it to true if CALLINFO data logging is required
    • ca_remotedb_errfile, the filename to store temporary SQL statements when database is not reachable
    • ca_dbmssqlobject, if you are using mssql and you want to change the object name of the database, then change the value of this parameter

REST Interface 

Limitation

  • This software requires AE server up and running. Missing events will be occurred when the AE server is down or during the fail over from one AE server to another.

Email Notification for Abandon and Short Duration Call

  • Edit the following parameters for email notification
    • Edit the value of parameter ca_emailabancall, set it to true for email notification of abandon calls
    • Edit the value of parameter ca_emailshortcall, set it to true for email notification of short duration calls
    • Edit the value of parameter tg_emailserverip to define the IP address of your email server.
    • Edit the value of parameter tg_emailsmtpport to define the SMTP port number of your email server. The default value is 25.
    • Edit the value of parameter tg_emailusername to define the username of email agent which is responsible to send notification emails.
    • Type genpass in the program console to generate an encrypted password string for the email agent, copy the string for later use.
    • Edit the value of parameter tg_emailpasswd to define the password of the email agent. The password should be in encrypted format, you can use console command genpass to generate the encrypted password.
    • Edit the value of parameter tg_emailsenderdisplay to define the display name of the email agent.
    • Edit the value of parameter tg_emailauth to define whether authentication is required between your CallAnalytics machine and the email server. When your email server trust your machine, set it to false, otherwise set it to true.
    • Edit the value of parameter tg_emailssl to define whether SSL communication is required for the SMTP session. The default value is false, set it to true when SSL is required.
    • Enter the following command in the program console to add your email address
      • add email youremail@company.com
      • Hint: Replace my email address to yours
    • Enter the following command to test the configuration
      • test email

AstLogger 1.4.12 Released

Posted: December 21, 2016 in News, TSAPI

21 Dec 2016, AstLogger 1.4.12 just released. The changes are

1. Linux logging with timestamp.
2. al_callinfodbtest parameter is added to control testing of remote callinfo db connection.
3. AstLogger Web supports searching of voice files by different user logins.
4. Supports encryption of voice files by Linux installation. Parameters al_encryptionenable, al_cmdencryption, al_encryptfileextension and al_decryptdirectory are added for this purpose. Also new tcpgate console “add encryptionkey” is added to add encryption keys.
5. Supports playback of voice records via Avaya extension or external phone.

AstLogger 1.4.11 Released

Posted: November 11, 2016 in News, TSAPI

10 Nov 2016, AstLogger 1.4.11 just released. The changes are

1. Supports CentOS/RedHat 6.
2. Creates recordpath locally by the Linux distribution.

centosredhat

We also create 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 VM
  • Edit /usr/lib/tslibrc, change 127.0.0.1 to the IP address of your Avaya AES
  • Telnet to AstLogger console port 14005, update the parameter called al_tlink_01, al_tlink_02 and other parameters
  • 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
  • AstLogger console: tcpgate/tcpgate01
  • uuiSVR console: tcpgate/tcpgate01
  • alarchived console: tcpgate/tcpgate01

ctiSVR 1.2.7 Released

Posted: November 4, 2016 in News, TSAPI

4 Nov 2016, ctiSVR 1.2.7 just released. The changes are

1. The uuiSVR supports maximum record size from 1024 to 65536.
2. Supports new APIs AddExtension, DelExtension, MakePhantomCall, PinVer.
3. Supports RedHat/CentOs Linux 32bit versions.

centosredhat

We also create 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 VM
  • Edit /usr/lib/tslibrc, change 127.0.0.1 to the IP address of your Avaya AES
  • Telnet to ivrSVR console port 14012, update the parameter called ivr_tlink_01 and ivr_tlink_02
  • 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
  • ivrSVR console: tcpgate/tcpgate01
  • uuiSVR console: tcpgate/tcpgate01

Redundancy Design for AstLogger

Posted: September 24, 2016 in Asterisk, TSAPI

AstLogger Redundancy Design

New version of AstLogger can be configured with redundancy support. Three server roles are designed, they are “active”, “backup” and “parallel”. I use the following diagram to illustrate the different combination of redundancy implementation.

RedundancyDesign.png

Active Hot-Standby Recording

Two AstLogger servers are required for this setup. The two AstLogger instances connect to different AES to avoid single point of failure. Also the two AstLogger instances use different pool of phantom devices. The “active” AstLogger always trigger recording when it is alive. The “backup” AstLogger only trigger recording when it detects the “active” AstLogger is failure. Only one voice file is generated for each call by this implementation.

Active Active Recording

Two AstLogger servers are required for this setup. The two AstLogger instances connect to different AES to avoid single point of failure. Also the two AstLogger instances use different pool of phantom devices. The “active” AstLogger always trigger recording when it is alve. The “parallel” AstLogger always start the recording right after the “active” AstLogger. Two voice files are generated for each call by this implementation.

1.4.10 Beta 1

You can download 1.4.10 beta 1 for testing of this new feature. A new parameter called “al_serverrole” is introduced for this purpose, the value can be “active”, “backup” and “parallel”.