Frequently asked Questions

Correlation between JTAPI and TAPI CallID

JTAPI CallID calculation formula

JTAPI Calculates CallID using the below logic:- JTAPI Call Id = First 8 bits for CallManagerID and 24 bits for CallID -> ((callManagerID & 0x00ff) << 24) | (globalCallID & 0x00ffffff)

For example, if the CallManagerID= 1 (0x01) and the CallID=3884 (0x00000F2C), then using the above formula JTAPI CallID becomes 0x01000F2C which is 16781100 in decimal.

TAPI CallID calculation formula

TAPI Calculates CallID using the below logic:- TAPI CALLID = First 10 bits for CallManagerID and 22 bits for CallID -> ((callManagerID & 0x03ff) << 22) | (globalCallID & 0x003fffff)

For example, if the CallManagerID= 1 (0x01) and the CallID= 0x00000F2C, then using the above formula TAPI CallID becomes 0x00400F2C.

From this we can find, TAPI CallID is different from that of JTAPI CallID.

More info:- JTAPI exposes two interfaces that expose call id. However the integer value of call id exposed by JTAPI already is deprecated in 8.0. So from 8.0 onwards, JTAPI application should use non-integer interface to obtain call id, and TAPI app should use new info in LineCallInfo::DevSpecific which exposes both CallManagerID and CallID. However the old interface is deprecated but not removed yet. If the developers want, they still can use the above formulas to correlate call ids for pre-8.0 CUCM releases. The deprecation only applies to 8.0 and onwards.


Determine Phone Hook Status

Steps for identifying a specific device and finding call status:

1. Start TAPI application initialization which includes provider open request, get device info, get line info, etc.
- lineInitializeEx

2. Open line
- lineOpen, Line1

3. Enable device state server feature which provides the states of all of the lines on a device.
- lineDevSpecific SLDST_SET_STATUS_MESSAGES request
- PhoneDevSpecific CPDST_SET_DEVICE_STATUS_MESSAGES

4. When Cisco TSP receives the DEVICE_STATE events from CTI, it notifies the application about the accumulative state of all the lines on the device using the PHONE_DEVSPECIFIC and LINE_DEVSPECIFIC events.