Monday, June 14, 2010

Avaya UCID - Demystified

Avaya UCID consists of three parts:

1) Node ID (N)
2) UCID - Sequence number (S)
3) Timestamp (T)

Node ID (N): A number between 1 and 32767. It is a unique number to identify the switch in the network that generated the call.

UCID - Sequence number (S): A number between 1 and 65535. This number uniquely identifies the call in a given node.

Timestamp (T): This time is the number of seconds since epoch (midnight 1 Jan, 1970) at the time of call origination.

UCID Format

Format of UCID is : NNNNNSSSSSTTTTTTTTTT

Where N stands for Node ID, S for UCID-Sequence number and T for timestamp.

CM generated UCID for all calls originating at the switch. If UCID exists for an incoming call, CM stores the UCID without any modification. For incoming calls without UCID, the switch generate a UCID for the call. For calls spanning multiple switches, the UCID is sent along with call information during call setup scross the network (which would imply PRI with QSIG).

Example: Assume a call has the following information stored in its call record
Node ID: 21; UCID - Sequence Number: 5; Timestamp: 946085673

The generated UCID in ASCII format will be: 00021000050946085673

Friday, June 11, 2010

TAPI vs. TSAPI

TAPI is a telephony API developed by Microsoft, TSAPI is a telephony API developed by the company that eventually became Avaya (AT&T -> Lucent -> Avaya). TAPI's design was oriented torward first party call control (i.e. phones), while TSAPI was oriented torward third party call call control (i.e. PBXes and central office switches). TAPI does have some limited support for dealing with the call audio, TSAPI has none. I'd be very surprised if you could find a TAPI TSP for Avaya AES, and you won't be getting it from Avaya if you do.

If all you're interested in is call events, then you can do the same things with both APIs, but the code will be totally different. Most companies that have products that have to talk to both Avaya AES and Cisco Call Manager have created an generic CTI interface for their product and then write code modules (aka drivers) that translate the TSAPI and TAPI call events to their generic event format. In your case, depending on your OS, you can move your TAPI code into a separate DLL/shared library, then create a separate DLL/shared library that implements the same functions but using TSAPI instead of TAPI.Frotunately, a lot of the smaller PBX manufacturers use either TAPI or TSAPI based APIs for their CTI interfaces, so if you have to connect to a third PBX, chances are good that you can reuse one of the two modules.