The CiscoIPPhoneText XML object displays ordinary 8-bit ASCII text on the phone display.(see https://developer.cisco.com/web/ipps). This isn't SMS. Instead what you are sending is XML to the IP Phone. If you want JTAPI to send this XML to the phone you will need to use sendData() method.
I am using CISCO IPPS and sending a message using CiscoIPPhoneText but i am getting connection timeout. I am using http://" + phoneIP + ":port/CGI/Execute and sending the above object in the post. I don't find any senddata in IPSS. Can you please give some guidace or point me to correct location of the documentation?
First verify the CiscoIPPhoneText you are pushing to the phone works. You will need to associate the device to an end user before pushing the XML to the phone.
Use this HTML to push the XML to the phone via a form post. Make sure you replace the IP Address in this example with the IP Address of your phone.
<FORM action="http://192.168.168.185/CGI/Execute" Method="POST">
<TEXTAREA NAME="XML" style="width:500px;height:300px">
<input type="submit" value="POST">
After clicking on the POST button, you will be asked for the end user's credentials. After entering them, you should see a successful response in XML.
To use JTAPI to send the XML to the phone instead of a form post, use the sendData() method, and insert the XML into the request:
I looked at the following documentation and confused.
Any help is appreciated.
I forgot to mention that you can download the sample app to push text to the phone on the downloads page - JTAPI XSI Device Data Pass Through Sample Application.zip
To understand the JTAPI methods, I highly recommend downloading the JavaDocs Interface Specs on the download page here - https://developer.cisco.com/site/collaboration/call-control/jtapi/documentation/
sendData(String) has been deprecated, and has been replaced by sendData(byte).
Here's information about sendData(byte) taken from the JavaDocs:
byte sendData(byte terminalData)
throws javax.telephony.InvalidStateException, javax.telephony.MethodNotSupportedException
CiscoTerminal.IN_SERVICEstate, and its Provider must be in the
Provider.IN_SERVICEstate. Applications can push the XSI object in the byte format to the phone with this interface. If the phone receives the data, this method returns successfully. Applications may only send 2000 bytes of data with this interface. Requests carrying excess data get rejected.
Thanks for all the information. I am getting provider is null error when I try to execute my program and I am passing destination IP address, user name and password.
provider = peer.getProvider ( providerString );
Am I missing any configuration?
You need to follow below steps to connect with CUCM CTI Manager-
1)Create application user with "Standard CTI Enabled" groups assigned to this user. More groups may require as per your app needs.
2)Assign devices which u want to monitor & control
Then write code as below to connect with CUCM-
conditionInService = new Condition ();
String providerString =createProviderString();
JtapiPeer peer = JtapiPeerFactory.getJtapiPeer ( null );
provider = peer.getProvider (providerString );
} catch (InvalidStateException ec)
Make sure that u r providing IP address of CTI Manager which is currently active.
Also check ur enterprise firewall is not blocking the request.
Each phone is represented by a Cisco Terminal object. You can enumerate all the terminals from Provider and use the API on all terminals.
You need to go through the JTAPI 1.2 spec and Cisco JTAPI developer guide to get an understanding on JTAPI call model and its API.
I'am able to push XML using HTML Post. And its working for me. As per the requirement i need to display same text on multiple phones of same type [about 200 phones]. Is there any way to do that? Any help is appreciated, as it is difficult to do one by one.
See Mohan's response above. You need to enumerate all the terminals and send the text in a loop to each of them. There's no "send text to all these phones" method.
"Each phone is represented by a Cisco Terminal object. You can enumerate all the terminals from Provider and use the API on all terminals. You need to go through the JTAPI 1.2 spec and Cisco JTAPI developer guide to get an understanding on JTAPI call model and its API."