-1

I wanted to know how to get the status of a phone using Jtapi. I am familiar with the addressChangedEvent and terminalChangedEvent methods of address and terminal observers. However, I am having a hard time trying to get the status of an address (phone). Any help would be greatly appreciated.

1 Answers1

0

You may use javax.telephony.callcontrol.CallControlTerminal

This provides functions like : getAdresses, and getTerminalConnections

From an Address you can get a Conncetions and a connection is bound to a call and this provides a state.

A TerminalConnection also provides a state

    Address adr[] = terminal.getAddresses();
    int callState = adr[0].getConnections()[0].getCall().getState();
    TerminalConnection tcs[] = terminal.getTerminalConnections();
    int conState = tcs[0].getState();

getConnections and getTerminalConnection may retun null!

Hajo Thelen
  • 1,095
  • 1
  • 11
  • 16
  • What about something like CiscoAddress adr = (CiscoAddress) provider.getAddress("phone number") Would adr.getState() give the state of the phone? – curry warrior Dec 18 '15 at 15:34
  • This may give the state of the phone (what ever that means in CISCO world, see CISCO Docs). I prefer using portable features as long as possible. – Hajo Thelen Jan 11 '16 at 13:34