我正在使用 JTapi 来控制 Cisco 电话。我熟悉连接、终端、呼叫等的各种状态。但是,我注意到没有类似于回铃的状态。有没有办法判断手机状态是否为“回铃”?据我了解,当被叫电话处于“警报”状态时,主叫电话应该具有“回铃”状态。任何帮助将不胜感激。
顺便说一句,这就是我到目前为止所拥有的。不确定是否正确。
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!");