Archive for the ‘TSAPI’ Category

Twilio WhatsApp Using Avaya CallBack

Posted: December 10, 2019 in News, TSAPI

Introduction

Using Twilio WhatsApp API to create a chat application is easy and powerful. In some scenarios, we need to enable the contact center to callback a customer using company’s hotline number with specific skillset of agent who has login to Avaya. The UPINGET ctiSVR has REST API which can integrate Twilio with Avaya for that particular callback scenario.

When you programming your WhatsApp chat application using the Twilio Studio, you can add a HTTP Request Widget and enter the REQUEST URL and parameters as following to integrate the ctiSVR which implements the callback function on the Avaya platform.

    • http://server:port/makecallbackcall?
    • With parameters
      • extension=xxxxx
      • destination={{trigger.message.From}}
      • callto=true
      • payload=json
      • duration=5
      • ctiToken=xxxxxxxxxx
    • The extension can be vdn, hunt group extension, agent extension or agent id
    • The destination is the mobile number which triggers the WhatsApp messages
    • The callto=true parameter tells ctiSVR to parse the destination number by configuration rules
    • The payload=json parameter tells ctiSVR to return HTTP payload in JSON format
    • The duration=5 parameter tells ctiSVR must return result in 5 seconds because it is function requirement of the Twilio HTTP Request
    • The ctiToken=xxxxxxxxxx enhance the security of ctiSVR because ctiSVR only makes call by valid token
    • Output variables
      • widgets.MY_WIDGET_NAME.parsed.result
        • The possible result is success or error
      • widgets.MY_WIDGET_NAME.parsed.error
        • The error message of the HTTP Request when the result is error
      • widgets.MY_WIDGET_NAME.parsed.callid
        • The call id of the call
      • widgets.MY_WIDGET_NAME.parsed.ucid
        • The UCID of the call
      • widgets.MY_WIDGET_NAME.parsed.phantom
        • The phantom device which makes the call
      • widgets.MY_WIDGET_NAME.parsed.answering
        • The Avaya answering device which the call is connected
      • widgets.MY_WIDGET_NAME.parsed.destination
        • The destination number after parsed by the ctiSVR

Introduction

The AutoBridge enables Home Agent solution for Avaya contact center. The tool monitors a pool of Avaya extensions in the contact center, it bridges Avaya and Asterisk extensions together whenever any of the Avaya extension has incoming or outgoing call. This enables home agent who is stayed at home can operate his/her CRM application via a VPN connection and speaks to his/her customer using an Internet SIP phone.

This solution required SIP trunks setup between the Avaya and Asterisk. Home agent using SIP phone (a hard SIP phone is preferred for better voice quality and easy of control) to connect to the Asterisk over the Internet. When the home agent login to ACD using his/her CRM application, the AutoBridge knows which Asterisk extension to be bridged with the Avaya extension that the agent is engaging in a call. The AutoBridge protects your existing Avaya investment, no modification of your CTI or CRM is required to implement the Home Agent solution.

Windows Preparation and Password Encryption

  • An access MDB file which stored the CT username and password of AE server. 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 the CT user of AE server, then paste the encrypted password to parameter ab_tlink. For example, the encrypted password for “p@ssword” is “R3NIw1yJMLlnPFzEQtuh2A==”

Windows 64 bit System 

  • For 64 bit Windows system, please follow the steps below
    • Configure ODBC System DSN using 32 bit version of ODBC Admin tool.
      C:WindowsSysWOW64odbcad32.exe

Windows 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 AutoBridge zip file here.
  • Follow the steps below to install the software.
    • Extract all the files into directory c:\program files\autobridge
    • Open Windows Command Prompt, enter the following commands to register the program as Windows Service
      • cd c:\program files\autobridge
      • AutoBridge -i
    • Open ODBC Setting, create System DSN called AUTOBRIDGECFG for Microsoft Access Driver and point to autobridge.mdb which is located in the directory c:\program files\autobridge
    • Open the Access file, edit the value of parameters ab_tlink_01 and ab_tlink_02 to the TLINK of your AES servers in the tParameter table
    • Start the Windows Service AutoBridge
    • Telnet to localhost and port number 14022, enter username tcpgate and password tcpgate01 to access the program console
    • Enter the following command in the program console to add extensions
      • add extension 61101
      • Hint: 61101 is agent extension
    • Enter the following command in the program console to add ACD monitoring
      • add acd 51101
      • Hint: 51101 is ACD
    • Enter the following command in the program console to add phantom devices
      • add phantom 41101
      • Hint: 41101 is phantom device
    • Enter the following command in the program console to add mapping between Avaya and Asterisk extension
      • add autobridge 10001 4511001
      • Hint: 10001 is Avaya extension, 4511001 is dialing string from Avaya to the Asterisk extension
    • 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

RedHat/CentOS 6.x Installation Guide

  • centosredhat
  • The following is for RedHat/CentOS 6 32 bit and 64 bit only, other Linux distributions are not supported.
  • Avaya provides only 32 bit version of TSAPI SDK, the executable filename of AutoBridge is called “AutoBridge”.
  • Login as root and execute the following commands
  • Install the following packages for 64 bit OS
  • yum install libstdc++.i686 expat.i686 openssl.i686 unixODBC.i686 mysql-libs.i686
  • wget http://mirror.centos.org/centos/6/os/i386/Packages/mysql-connector-odbc-5.1.5r1144-7.el6.i686.rpm
  • rpm -ivh mysql-connector-odbc-5.1.5r1144-7.el6.i686.rpm
  • Download Avaya Aura AE Services 7.0 TSAPI Client for RHEL 6 from DevConnect
  • chmod +x tsapi-client-linux-7.0.0-131.bin
  • Execute the installation file tsapi-client-linux-7.0.0-131.bin
    • ./tsapi-client-linux-7.0.0-131.bin
  • Edit /usr/lib/tslibrc, change 127.0.0.1 to the IP address of your Avaya AES
  • Install the following packages for 32 bit and 64 bit OS
  • yum install mysql-server mysql
  • yum install mysql-connector-odbc unixODBC
  • Config and start MySQL
  • chkconfig mysqld on
  • service mysqld start
  • Create database and user
  • mysql -u root -p
  • > create database autobridge;
  • > create user 'tcpgate'@'localhost' identified by 'tcpgate';
  • > grant all on autobridge.* to 'tcpgate'@'localhost';
  • > flush privileges;
  • > quit
  • mysql -h localhost -u tcpgate -p autobridge < autobridge.sql
  • Copy the following to /etc/odbc.ini file
    • [AUTOBRIDGECFG]
      Description = MySQL connection to AutoBridge
      Driver = MySQL
      Server = localhost
      Port = 3306
      Database = autobridge
  • Create user and copy files
  • useradd autobridge
  • mkdir /usr/local/autobridge
  • cp AutoBridge /usr/local/autobridge
  • chmod +x /usr/local/autobridge/AutoBridge
  • chown -R autobridge.autobridge /usr/local/autobridge
  • mkdir -p /var/log/autobridge
  • chown -R autobridge.autobridge /var/log/autobridge
  • Auto start the daemon after server reboot
  • echo "rm /tmp/autobridge.log" >> /etc/rc.local
  • echo "su autobridge -c '/usr/local/autobridge/AutoBridge'" >> /etc/rc.local

CallAnalytics 2.0.9 Released

Posted: August 30, 2019 in News, TSAPI

CallAnalytics 2.0.9 just released, this version has the following updates.

1. Update the “origucid” field of callinfo object using the CSTA transfer event.
2. Update the “vdn” field for VDN callinfo object.
3. Add setuserdata REST API, the userdata, ucid or callid or uui as parameter.
4. The callinfo REST API supports hexucid as parameter. The hexucid can be HEX UUI sent to Asterisk in the SIP header.

ctiSVR Click to Call for SuiteCRM

Posted: January 12, 2019 in News, TSAPI

Introduction

A SuiteCRM module is developed to support Click to Call in SuiteCRM, this module is open source and the source code can be found in github.

Install SuiteCRM Click to Call Module 

  1. Download the module package from here
  2. Upload and install the module in SuiteCRM

Configure SuiteCRM Click to Call CTI

  • Administrator -> Admin -> SuiteCRM Click To Call -> Click to Call Configuration
  • Enter CTI IP Address and Port number of ctiSVR

Configure SuiteCRM User Extension 

  • User Profile -> SuiteCRM Click To Call -> CTI Extension
  • Enter the extension of the user

Click To Call  

Once the module is installed, a small telephone icon appeared next to any telephone number. Click on the telephone icon will trigger Click to Call feature of the module.

ctiSVR 1.2.11 Released

Posted: December 3, 2018 in News, TSAPI

ctiSVR 1.2.11 just released, this version has the following updates:

1. Supports secure WebSocket and secure RESTful interfaces.
2. Two parameters to load the certificate and key files, they are “ivr_sslcertfilename” and “ivr_sslkeyfilename”.
3. To further improve IT security, a parameter called “ivr_enabletoken” is added to enable token in the REST and WebSocket interfaces.

CallAnalytics 2.0.7 Released

Posted: November 13, 2018 in News, TSAPI

CallAnalytics 2.0.7 just released, this version has the following update.

1. Supports sending data to Splunk using HTTP Event Collector protocol.
2. Add listacdsplit REST interface.
3. Add callinfo REST interface by hex UUI parameter.
4. Supports sending of qacdsplit data to Splunk and database.
5. Add qtrunkgroup REST interface.
6. Supports sending of qtrunkgroup data to Splunk and database.

Introduction

There are two methods which allow Asterisk to get call information from Avaya, CallAnalytics and RouteManager are using in the two methods respectively.

CallAnalytics Method

The first method can be found from this Avaya documentation, the UCID is passing from Avaya to Asterisk using the SIP UUI header. By sending the UUI field as parameter to CallAnalytics, we can get the information details related to the call which is dialed from Avaya to Asterisk. The REST API of the CallAnalytics is http://IP.PORT/callinfo?hexucid=SIPHEADER_UUI

The SIP header under different call scenario is extracted and the REST API to the call information is provided for your reference.

Manual dial without using CTI
INVITE sip:52001@asterisk SIP/2.0
From: “E.50001” <sip:50001@upinget.com>;tag=042529099c9e914aab5cea912500
To: <sip:52001@asterisk>
Call-ID: 042529099c9e914bab5cea912500
CSeq: 1 INVITE
Max-Forwards: 71
Via: SIP/2.0/TCP 10.10.1.100;branch=z9hG4bK042529099c9e914cab5cea912500
Supported: 100rel,histinfo,join,replaces,sdp-anat,timer
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REFER,INFO,PRACK,PUBLISH,UPDATE
User-Agent: Avaya/R016x.03.3.256.0
Contact: “E.50001” <sip:50001@10.10.1.100;transport=tcp>
Route: <sip:10.10.1.200;transport=tcp;lr;phase=terminating>
Accept-Language: en
Alert-Info: <cid:internal@asterisk>;avaya-cm-alert-type=internal
Min-SE: 1200
P-Asserted-Identity: “E.50001” <sip:50001@upinget.com>
Record-Route: <sip:10.10.1.100;transport=tcp;lr>
Session-Expires: 1200;refresher=uac
User-to-User: 00FA080002175F5D676591;encoding=hex
Diversion: <sip:40001@upinget.com>;reason=”unknown”
Content-Type: application/sdp
Content-Length: 208

To get the call information of Avaya, using the CallAnalytics REST API
http://IP.PORT/callinfo?hexucid=00FA080002175F5D676591
or
http://IP.PORT/callinfo?hexucid=0002175F5D676591

Dial using CTI with User Specific data
INVITE sip:52001@asterisk SIP/2.0
From: “E.50001” <sip:50001@upinget.com>;tag=8090c4e399c9e9120ac5cea912500
To: <sip:52001@asterisk>
Call-ID: 8090c4e399c9e9121ac5cea912500
CSeq: 1 INVITE
Max-Forwards: 71
Via: SIP/2.0/TCP 10.10.1.100;branch=z9hG4bK8090c4e399c9e9122ac5cea912500
Supported: 100rel,histinfo,join,replaces,sdp-anat,timer
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REFER,INFO,PRACK,PUBLISH,UPDATE
User-Agent: Avaya/R016x.03.3.256.0
Contact: “E.50001” <sip:50001@10.10.1.100;transport=tcp>
Route: <sip:10.10.1.200;transport=tcp;lr;phase=terminating>
Accept-Language: en
Alert-Info: <cid:internal@asterisk>;avaya-cm-alert-type=internal
Min-SE: 1200
P-Asserted-Identity: “E.50001” <sip:50001@upinget.com>
Record-Route: <sip:10.10.1.100;transport=tcp;lr>
Session-Expires: 1200;refresher=uac
User-to-User: 00C816FC7C2215000000005D6766210ABB71D013EC00000009FA08000218085D676621;encoding=hex
Diversion: <sip:40001@upinget.com>;reason=”unknown”
Content-Type: application/sdp
Content-Length: 208

To get the call information of Avaya, using the CallAnalytics REST API
http://IP.PORT/callinfo?hexucid=00C816FC7C2215000000005D6766210ABB71D013EC00000009FA08000218085D676621
or
http://IP.PORT/callinfo?hexucid=000218085D676621
To update the user data to CallAnalytics or CTI middleware such as CtiSVR, using the CallAnalytics REST API
http://IP.PORT/setuserdata?userdata=41101234567890&uui=FC7C2215000000005D6766210ABB71D013EC00000009

Dial using CTI with ASCII data
INVITE sip:52001@asterisk SIP/2.0
From: “E.50001” <sip:50001@upinget.com>;tag=8024fa5a9ac9e9110ad5cea912500
To: <sip:52001@asterisk>
Call-ID: 8024fa5a9ac9e9111ad5cea912500
CSeq: 1 INVITE
Max-Forwards: 71
Via: SIP/2.0/TCP 10.10.1.100;branch=z9hG4bK8024fa5a9ac9e9112ad5cea912500
Supported: 100rel,histinfo,join,replaces,sdp-anat,timer
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REFER,INFO,PRACK,PUBLISH,UPDATE
User-Agent: Avaya/R016x.03.3.256.0
Contact: “E.50001” <sip:50001@10.10.1.100;transport=tcp>
Route: <sip:10.10.1.200;transport=tcp;lr;phase=terminating>
Accept-Language: en
Alert-Info: <cid:internal@asterisk>;avaya-cm-alert-type=internal
Min-SE: 1200
P-Asserted-Identity: “E.50001” <sip:50001@upinget.com>
Record-Route: <sip:10.10.1.100;transport=tcp;lr>
Session-Expires: 1200;refresher=uac
User-to-User: 04C809313233343536373839FA08000218EF5D6766E9;encoding=hex
Diversion: <sip:40001@upinget.com>;reason=”unknown”
Content-Type: application/sdp
Content-Length: 208

The ASCII data is 313233343536373839
To get the call information of Avaya, using the CallAnalytics REST API
http://IP.PORT/callinfo?hexucid=04C809313233343536373839FA08000218EF5D6766E9
or
http://IP.PORT/callinfo?hexucid=000218EF5D6766E9

Route Manager Method

The second method is by Avaya Adjunct Routing. TSAPI UUI data can be passing to Asterisk by using of Avaya Adjunct Routing, this enables us to use Asterisk as IVR for call center environment. For example, many IVR applications such as Language Selection, Survey and PIN Verification can be implemented by the Asterisk. Our solution included using tools such is RouteMgr, callAnalytics, ctiSVR and uuiSVR, the architecture diagram is shown below.

The RouteMgr is for routing of incoming calls and creation of UUI data for Avaya and Asterisk integration. RouteMgr required advanced TSAPI license, it creates UUI data when the call has no attached UUI data and routes the call to destination based the routing configuration. Asterisk will see the UUI data in the SIP header, it can retrieve the call information which is in JSON format by sending REST command to callAnalytics. When Asterisk wants to transfer the call to Agent, it can update the user data with the same UUI by sending REST command to ctiSVR. Once call is transferred to Agent, the Agent softphone which has connection to AES will receive the call event with the UUI, the user data can be obtained by sending REST command to ctiSVR.