Archive for March, 2013

T&C Player for Call Center

Posted: March 29, 2013 in Asterisk, TSAPI

Background

Some outbound programs required agent to play a voice  file (Terms and Conditions) together with his/her customer during the call. This is a mandatory requirement for selling insurance or finance products in some countries.  I’m looking for this solution quite a long time. When I read this Asterisk post that a patch was added to provide fine control of a playback using Asterisk Manager Interface (AMI), I believe I can make such solution in my Avaya platform. The work is so simple, barge-in the agent phone using TSAPI, conference the Asterisk extension which plays the voice file, then have the fine control using AMI.

I finally implemented the server module (TcPlayer) and the API (TcAPI32). The API is in the form of DLL and OCX, great!

Thanks Matt Jordan.

Introduction 

The TcPlayer is a server module that barge-in an agent’s call with an Asterisk extension which is response for the playing of Terms and Conditions voice file, the software also provides API to control the playback. By using the API, you can PLAY, PAUSE, STOP, RESTART, FORWARD and REWIND of your voice file. This is very useful for outbound selling in call center.

The TcPlayer server module uses TSAPI library for the barge-in function, please make sure you meet the following requirements before installation of this software:

  • CVCT or AE Server installed
  • Avaya CM with AVAYA ASAI CTI STATION SFTW LIC
  • Avaya CM with AVAYA ASAI PHANTOM CALLS SFTW LIC
  • Asterisk Server (specific version) installed and tie with Avaya, check with your vendor how to tie Asterisk with Avaya

Preparation and Password Encryption

  • The access MDB file stored the the username and password of AE and Asterisk servers. 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 passwords for users of AE and Asterisk server, then paste the encrypted password to parameter tc_tlink and tc_ami. 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++ 2005 Service Pack 1 Redistributable Package MFC Security Update, http://www.microsoft.com/en-us/download/details.aspx?id=26347
    • Configure ODBC System DSN using
      C:\Windows\SysWOW64\odbcad32.exe
    • Stop the Windows firewall because it enables by default and I don’t have time to figure out what ports are required to open, you need to find it out yourself.

Installation 

  • Download the TSAPI client for Windows 32-bit from Avaya web site, it contains the library files. You need to register DevConnect before you can access the download page.
  • Download the TcPlayer zip file here.
  • Follow the installation steps below to install the software.
    • Extract all the files into directory c:\program files\tcplayer
    • Open Windows Command Prompt, enter the following commands to register the program as Windows Service
      • cd c:\program files\tcplayer
      • tcplayer -i
    • Open ODBC Setting, create a System DSN called TCPLAYERCFG for Microsoft Access Driver and point the DB to tcplayer.mdb which is located in the directory c:\program files\tcplayer
    • Open the Access file, edit the value of parameters tc_tlink_01 and tc_tlink_02 to the TLINK of your AE servers in the tParameter table, take care the encrypted password for AE server
    • Edit the value of parameters tc_ami_01 and tc_ami_02 to define IP address, port number, username and encrypted password of your Asterisk Manager Interface, take care the encrypted password for Asterisk Manager Interface
    • Edit the value of parameter tc_extprefix to define the Asterisk extension prefix for T&C voice files
    • Edit the value of parameter tc_appendphantomext to define appending of phantom extension number to the T&C extension, the default value is true
    • Edit the value of parameter tc_phantomdigits to define the number of digits of phantom device
    • Start the Windows Service TcPlayer
    • Telnet to localhost and port number 14009, enter username tcpgate and password tcpgate01 to access the program console
    • Enter the following command to add one phantom device
      • add phantom 41101
      • Hint: 41101 is a phantom extension, we use phantom device for the barge-in function, it only takes 1-2 seconds to perform the barge-in function, so 10 phantom devices can serve 100+ call center agents
    • Or, enter the following command to add a range of phantom devices
      • bulkadd phantom 41101-41110
      • Hint: this command add 10 phantom devices
    • Enter the following command in the program console, you will receive debug information.
      • trace on asc
    • Enter the following command in the program console, you will get the help message
      • help

Asterisk Configuration

  • You need specific version of Asterisk until the patch mentioned in the background section merged into the Asterisk main stream. Please follow the steps to download that specific version of Asterisk.
  • Edit the extension_custom.conf file to include the following dialplan. 
  • tcplayerasterisk
  • 45141 is the extension prefix for T&C player, create each of your T&C extension in Asterisk and upload your voice file to the default voicemail location. My Asterisk T&C extension is 8 digits length, so you see the ${EXTEN:0:8} in the dialplan.
  • I don’t want agent or caller can control the playback via DTMF, so I specify invalid DTMF tone ‘a’, ‘b’, ‘c’, ‘d’ and ‘e’ in the dialplan.
  • Edit the manager_custom.conf to add your username and password for TcPlayer. For example, username astapi is added. Consult Asterisk system administrator to add AMI user. Only call read and write privilege is required.
  • tcplayerasterisk2

TcAPI32

  • TcAPI32 is for application development, we provide C++ header, DLL and OCX files 
  • Sample application is also provided, it contains sample source code, header files and libraries, follow this link to download the zip file

Redundancy Configuration

  • To setup multiple TcPlayer servers and using LVS as the load balancer, each TcPlayer need to have its own set of Phantom devices
  • TcPlayer supports multiple AE and Asterisk servers for redundancy purpose. You need to define multiple tc_tlink and tc_ami parameters to enable this feature
  • You also need to configure Avaya routing to hunt multiple ties with the Asterisk servers

Uninstallation

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