Passing CTI Data between Avaya and Asterisk

Posted: October 6, 2018 in Asterisk, TSAPI

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.

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 )

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s