05-11-2015 08:44 PM
Hi All,
I want to simulate the "mute" button actions as bellow:
String muteDataString = "<CiscoIPPhoneExecute><ExecuteItem Priority=\"0\" URL=\"Key:Mute\"/></CiscoIPPhoneExecute>";
byte[] muteDataBytes = muteDataString.getBytes();
for (Call call : callArray) {
CiscoCallID id = ((CallImpl) call).getCallID(); //((CallControlCall)call).drop();
int gid = id.getGlobalCallID();
int mid = id.getCallManagerID();
System.out.println("Call " + index + ": " + gid + "/" + mid);
Connection[] connections = call.getConnections();
if (connections != null && connections.length > 0) {
Connection conn = connections[0];
TerminalConnection[] terminalConnections = conn.getTerminalConnections();
if (terminalConnections != null && terminalConnections.length >0) {
TerminalConnection terminalConn = terminalConnections[0];
CiscoTerminal ternimal = (CiscoTerminal) terminalConn.getTerminal();
ternimal.sendData(muteDataBytes);
}
}
}
but it does not work, it always throws following errors when it executes the line "....sendData(muteDataBytes);":
Call 1: 1059/1
com.cisco.jtapi.PlatformExceptionImpl: Cti request timed out
at com.cisco.jtapi.TerminalImpl.sendData(TerminalImpl.java:1175)
Any suggestion is appreciated.
Thanks in advance!
Simon.
05-12-2015 10:24 AM
All I can suggest is to read the XSI Object Pass Through section of the developer guide at https://developer.cisco.com/fileMedia/download/456df613-07bd-4bce-8904-f3bd0b415e53 and be sure you're meeting the requirements cited there.
Also, note this caveat from the guide: IfJTAPI applications make simultaneous back to back requests for sendData() API on the same CiscoTerminal, without any delay between requests, then some of these requests may fail. Applications cannot determine whether a request wassuccessful or not, as Cisco JTAPI API returnssuccessfully assoon asthe phone receives data and does not wait for a response from the phone. Also, the IP phone might display a blank screen on sending simultaneous requests to send data. To avoid these issues, JTAPI applications should ensure some time delay between two successive sendData() requests while pushing XSI data to the IP phones via Cisco JTAPI.
05-15-2015 11:09 PM
Hi Nicholas,
Thanks for your reply.
The XSI Object Pass Through" has little information for me, but it says that "CiscoTerminal must be in the <CODE>CiscoTerminal.REGISTERED</CODE> state", while when I invoke CiscoTerminal.getState(), it returns "IN_SERVICE", CiscoTerminal.getDeviceState(), it returns DEVICEDTATE_IDLE, I'm not sure it is in the sate "REGISTERED", could you give more details about that?
And I debug the code, in fact, the root cause error is "com.cisco.cti.client.CCNException: deviceDataPassThrough request failed"
Simon
06-25-2020 07:21 PM
Hi Simon,
Did this work for you later..?
06-25-2020 07:20 PM
Hi Simon,
I was facing the same issue when I was working with Cisco Jabber phone. But when I tried to work it on a Cisco IP Communicator, it worked.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide