How to Check if State of Cisco Phone is Ringback - Cisco JTapi

235 views Asked by At

I am using JTapi to control Cisco phones. I am familiar with the various states of connections, terminals, calls etc. However, I have noticed that there is no state similar to ringback. Is there a way to determine if the status of the phone is "ringback"? From what I understand, a calling phone should have "ringback" status when the called phone has the status "alerting". Any help would be greatly appreciated.

By the way, this is what I have so far. Not sure if it is right.

int counter = 0;

CallControlCall abc = (CallControlCall)provider.getAddress(phone).getConnections()[0].getCall();

for(Connection conn: abc.getConnections()){
    if(abc.getCallingAddress().equals(conn.getAddress()) && conn.getState() == Connection.CONNECTED)
                counter++;
    if(abc.getCalledAddress().equals(conn.getAddress()) && conn.getState() == Connection.ALERTING)
                counter++;
        }
if(counter == 2)
    System.out.println("The state of the calling phone is ringback!");
1

There are 1 answers

1
Hajo Thelen On BEST ANSWER

Have you already looked at the CallControl Package? The CallControlConnection has a state NETWORK_ALERTING. If this is supported by CISCO implementation, this should be the what you're looking for.

see CallControl package_summary for details