09-28-2014 11:55 AM
I have been searching this site but I could not find a link which explains how to send a simple text message to IP Phone? What are the pre requites?
Thanks
09-29-2014 08:48 AM
Hi Jayakumar,
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.
Thanks,
Adrienne
10-05-2014 03:13 PM
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?
Thx
10-06-2014 04:03 PM
Hi Jayakumar,
STEP 1:
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.
<HTML>
<BODY>
<FORM action="http://192.168.168.185/CGI/Execute" Method="POST">
<TEXTAREA NAME="XML" style="width:500px;height:300px">
<CiscoIPPhoneText>
<Title>Title</Title>
<Text>Text</Text>
<SoftKeyItem>
<Name>Exit</Name>
<URL>Init:Services</URL>
<Position>1</Position>
</SoftKeyItem>
</CiscoIPPhoneText>
</TEXTAREA>
<BR>
<input type="submit" value="POST">
</FORM>
</BODY>
</HTML>
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.
STEP 2:
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:
<CiscoIPPhoneText>
<Title>Title</Title>
<Text>Text</Text>
<SoftKeyItem>
<Name>Exit</Name>
<URL>Init:Services</URL>
<Position>1</Position>
</SoftKeyItem>
</CiscoIPPhoneText>
Thanks,
Adrienne
10-07-2014 02:16 PM
Adrienne,
Thanks for you post above! Very good information. Would you have the HTML code to send it to multiple phones?
Thanks,
Mike Cloud
10-07-2014 05:45 PM
Adrienne,
Thank you very much ad this is very useful, I will try.
Thanks
10-07-2014 06:09 PM
I could not find documentation on sendData, could you please help?
Thx
10-08-2014 12:31 AM
I looked at the following documentation and confused.
Any help is appreciated.
Thx
10-21-2014 09:24 AM
Hi Jayakumar,
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_SERVICE
state, and its Provider must be in the Provider.IN_SERVICE
state. 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.10-26-2014 03:23 PM
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?
Thx
10-26-2014 09:18 PM
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-
try
{
conditionInService = new Condition ();
String providerString =createProviderString();
JtapiPeer peer = JtapiPeerFactory.getJtapiPeer ( null );
provider = peer.getProvider (providerString );
provider.addObserver (this);
conditionInService.waitTrue();
try
{
((CiscoProvider)provider).registerFeature(CiscoProvFeatureID.TERMINAL_REGISTER_UNREGISTER_EVENT_NOTIFY);
} catch (InvalidStateException ec)
{
objLoger.error("createProvider","[registerFeature Execption-1="+ec.getMessage()+"]");
}
conditionInService.waitTrue ();
catch(Exception e)
{
objLoger.error("createProvider","[Execption-3="+e+"]");
}
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.
Regards,
Umesh
06-13-2017 02:47 PM
Hi Adrienne
Do you know how this could be sent to multiple phones?
Thanks
06-13-2017 03:05 PM
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.
08-07-2017 06:42 AM
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.
Thanks
08-07-2017 09:48 AM
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."
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