cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
459
Views
0
Helpful
1
Replies

Function to retrieve device active/idle status

cghareeb
Level 1
Level 1

Is there a way to retrieve a phone's active/idle status? I see how Execute could return status based on the setting of Priority, but that seems a little clunky, especially if you want an app to watch the status of a device and trip an action as it changes.

Any ideas greatly appreciated.

1 Reply 1

jasyoung
Level 7
Level 7

For newer versions of CallManager, the JTAPI Device State Server was made available to do exactly that. A snippet from the Developer Guide:

Device State Server provides the cumulative state of all the addresses on a terminal. These events are delivered as TerminalEvent. Applications need to add TerminalObserver to get these events.

States are defined as follows

•IDLE—If there are no calls on any of the addresses on the terminal, then the DeviceState is considered IDLE, and Cisco JTAPI sends CiscoTermDeviceStateIdleEv toapplications.

•ACTIVE—If any of the addresses on the terminal have an outgoing call (in CTI State Dialtone, Dialing, Proceeding, Ringback, or Connected) or an incoming call (in CTI State Connected), then the DeviceState is ACTIVE and Cisco JTAPI sends CiscoTermDeviceStateActiveEv to the application.

•ALERTING—If none of the addresses on the terminal have an outgoing call (in CTI State Dialtone, Dialing, Proceeding, Ringback, or Connected) or an incoming call (in CTI State Connected) and at least one of the addresses on the terminal has an unanswered incoming call (in CTI State Offering, Accepted, or Tinging), then the DeviceState is ALERTING and Cisco JTAPI sends CiscoTermDeviceStateAlertingEv to the application.

•HELD—If all the calls on any of the address on the terminal are held (in CTI State OnHold) the DeviceState is HELD and Cisco JTAPI sends CiscoTermDeviceStateHeldEv to the application.

Search cisco.com for "JTAPI developer guide" to find out more.