我正在使用JTapi来控制思科手机。我熟悉连接,终端,呼叫等各种状态。但是,我注意到没有类似于回铃的状态。有没有办法确定手机的状态是否为"回铃"?根据我的理解,通话电话应该有"回铃"当被叫电话具有状态"警告"时的状态。任何帮助将不胜感激。
顺便说一句,这就是我到目前为止所拥有的。不确定它是否正确。
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!");
答案 0 :(得分:0)
您是否已经查看过CallControl包? CallControlConnection的状态为NETWORK_ALERTING。如果CISCO实施支持这一点,那么这应该是您正在寻找的。 p>
有关详细信息,请参阅CallControl package_summary