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

Looking for JTAPI example code for monitoring phone state

joergwesely
Level 1
Level 1

Hi all,

I'm trying to write a little Java application to monitor the on hook/off hook state of some phones.

I wrote a class that implements the TerminalObserver interface.

I receive CiscoTermOutOfServiceEv and CiscoTermInServiceEv events, but nothing like a CiscoTermDeviceStateActiveEv event.

Does anyone has a example code snipplet for me how to receive these state change events?

Tanks in advance

Jörg

1 Reply 1

stephan.steiner
Spotlight
Spotlight

Does your monitoring class implement CiscoTerminalObserver? TerminalObserver isn't enough because the device state server is state specific.

Then if you check the jtapi documentation for information on the device state server, you should come across a method CiscoTerminal.getFilter(). It gets you a CiscoTermEvFilter object which has various setters and getters in order to turn on/off various terminal events (like the one you're looking for). Set the appropriate options, then call CiscoTerm.setFilter(filter).