cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
227
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Praful Kapadia on 14-04-2009 06:35:38 PM
Hi
 
I've written a caller info app. It sends a <CiscoIPPhoneText> object to the phone when a call is made. When this object is displayed (in my case with the caller's details), it has associated softkeys. That means that the Answer softkey for the call is obscured. Therefore, the user has to press the Exit softkey of the <CiscoIPPhoneText> object before being able to press Answer. Of course, the user can pick up the phone but this is not what the user always wants eg when using a headset.
 
Ideally, I would like to display what the phone displays when there is an internal call with the same softkeys, that is,


   From
   <number>               <timer>

 
However, there is no Answer URI that I can send with the <CiscoIPPhoneText> object.

Is there a way of displaying text whilst still showing the softkeys associated with a phone call?

Any help appreciated.
 
Thanks
 
Praful

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: David Staudt on 14-04-2009 08:51:06 PM
The ability for the application plane to interact with the call-control plane is a commonly requested feature, but so far is not possible.

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: Praful Kapadia on 16-04-2009 01:47:48 PM
Thanks David.
 
1. I assume that means that I can't have in my application a softkey with Answer on it.
 
2. However, how do I display a message without any softkeys? At the moment the XML caller info message I send to the phone has its own default softkeys (Update and Exit) and this hides the Answer softkey of the incoming call. Given that the XML message tells the user who's calling, it would nice to be able to answer the call without having to press Exit first (to get rid of the caller info message) then press Answer.
 
3. By the way, there is a mention in the IP Phones Services doc that it documents only XML messages not HTML. I tried sending an HTML message to the phone as content type "text/html". The message was "<html> <body> <h1>Test</h1> </body> </html>" and all the message appeared on the phone not just "Test"! Is there any documentation about sending HTML because I'd like to send formatted text to the phone instead of the XML which appears in one font and size.
 
Thanks again.
 
Praful

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: David Staudt on 16-04-2009 04:57:25 PM
You can create a custom soft key with the text 'Answer' on it, but there is no URI you can use to cause a call to be answered.
 
If no custom softkeys are specified, the phone supplies a default set.  This is not configurable, and even so the result would be no softkeys - not call-plane softkeys 'showing through.'
 
The phone will attempt to parse text/xml - this is the normal XML object display behaviour.  If other text/* content-types (like text/plain or text/html) are encountered, the phone will just dump the raw text to the display without modification - this is why you see the full HTML markup.
 
The phones do not support HTML markup and cannot render fonts/sizes, etc., currently.

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: Shameer AbdulRasheed on 20-04-2009 11:00:26 AM
Hi Praful,
 
If you are using 3'rd party control of your IP phone, then you can use the custom 'Answer' button to call an application that answers the call via TAPI or JTAPI.
 
Just a suggestion, in case if it helps.
 
Regards,
Shameer.

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: Praful Kapadia on 20-04-2009 10:18:46 PM
Thanks David and Shameer.
 
Another answer, I've discovered, is to use the <CiscoIPPhoneStatus> tag. This runs on the Call plane rather than the Services plane of the phone. Therefore, showing a <CiscoIPPhoneStatus> object when there's a call allows the user to press the orignal Answer softkey.
 
The problem I'm having is creating an image for the <CiscoIPPhoneStatus> object that is large enough to display the caller's info. The manual says the max size for the 7965 phone is 252x50. However, nothing is displayed if I send an image that size to the phone. If the image is smaller (about 100x20), it is displayed but that's not big enough and it's also very coarse.
 
There are no examples of creating an image for the <CiscoIPPhoneStatus> object. However, the manual says that the format is the same as that of the image in a <CiscoIPPhoneImage> object. I've looked at the PhotoDirectory JSP example in the SDK, which generates an image for <CiscoIPPhoneImage>. However, this just does not work. No image displays on the phone.
 
I think the manual may be wrong when it says that the image formats for <CiscoIPPhoneImage> and <CiscoIPPhoneStatus> are the same. The reason for this is that the manual says the <CiscoIPPhoneStatusFile> tag is like the <CiscoIPPhoneStatus> tag except the first is colour and the second greyscale. Given the <CiscoIPPhoneImage> uses colour, how can the image format of <CiscoIPPhoneStatus> be the same? Also the SDK's CIPImage class used in the PhotoDirectory example has a hard-coded reference to image type TYPE_INT_ARGB for the Java class BufferedImage. This is a colour image type, which <CiscoIPPhoneStatus> does not accept according to the manual.
 
The problem could be that the CIPImage class was designed to create images for the <CiscoIPPhoneImage> tag not the <CiscoIPPhoneStatus> tag. There is some hint of this because the CIPImage class has a method that returns the CIP image as hex together with the associated XML tags for <CiscoIPPhoneImage>.
 
Has anyone got the PhotoDirectory example to work?
Does anyone have an example of using <CiscoIPPhoneStatus> to create a full-size image?
 
Thanks again
 
Praful

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: David Staudt on 21-04-2009 02:03:24 AM
The image data format of the Status object is the same as the Image object, but the size is definitely different.  Checking the XSD schema file for the IP Phone Services, it looks like:
 
CiscoIPPhoneStatus...max width = 106
                               max height = 21
 
The IPPS document indicates CiscoIPPhoneStatusFile varies by model
               for 7970      max width = 262
                                 max height = 50
 
The output of the CIPImage class will not be suitable for the Status object.
 
 

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: Praful Kapadia on 21-04-2009 01:56:47 PM
Thanks David.
 
If the CIPImage class is not suitable, how do I generate the data for the Status object?
 
Do you know why the PhotoDirectory example does not work? The generated Image object is not displayed. The whole SDK looks dated. Even the CallerInfoServer is broken (it gets caller and called mixed up).
 
Praful

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: David Staudt on 21-04-2009 02:53:08 PM
I was thinking of the command-line tools for CIP format conversion.  Looking again at CIPImage, it has the ability to accept and resize images, so you should be able to use it to create images that work with CiscoIPPhoneStatus.
 
Unfortunately we haven't had a refresh of the SDK since CM4.1, and many of the samples and helper code modules don't work straight off the bat with CM5 and higher without some modification.  However, looking at the PhotoDirectory sample, I don't see anything that shouldn't work with the existing phones.
 
Are you seeing any exceptions or error messages when running?  Looking at a network packet capture to see the actual HTML/XML reaching the phone may be helpful - feel free to attach the capture here.

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: Praful Kapadia on 22-04-2009 07:17:09 PM
Hi David
 
The problem I had with the PhotoDirectory example is that the image it creates doesn't display on the phone. Try it! Just take the code to generate the image (you can remove LDAP references and put some dummy values in) and send it to a phone.   I tried on a 7965 phone.
 
It doesn't matter now though. I've decided to use the CiscoIPPhoneStatusFile tag. This requires the same code and appears on the Call plane.
 
Instead of the observer sending an Execute command to the phone, I send a CiscoIPPhoneStatusFile object with the PNG URL to an app that looks up the number and returns a PNG image instead of a text object.
 
If I'd used the technique in the CallerInfo SDK example, the phone would end up making two HTTP calls: one to lookup the number and the other for the PNG URL.
 
This works how I want it with the Answer button still enabled and the caller info PNG image appearing under the phone number as displayed by the phone.
 
 
Thanks for your help.
 
Praful

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: Vladimir Banker on 15-06-2009 02:24:02 PM
I would like to clear CiscoIPPhoneStatus object .According to SDK: In order to clear the object, the phone must execute the Init:AppStatus URI.
But when I send request as:
<CiscoIPPhoneExecute><ExcecuteItem URL='Init:AppStatus' /></CiscoIPPhoneExecute>

CiscoIPPhoneError Number="1"
Please help ASAP.

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: Jonathan Withers on 15-06-2009 02:26:58 PM
Getting a  CiscoIPPhoneError Number="1" probably means that you have not got the body of the message encoded correctly before sending to the IP Phone.

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: David Staudt on 15-06-2009 03:24:56 PM
Yep, sounds like the data is probably not HTTP Form encoded.  The actual text POSTed should look something like:
 
xml%3D%3CCiscoIPPhoneExecute%3E%3CExcecuteItem%20URL%3D'Init%3AAppStatus'%20%2F%3E%3C%2FCiscoIPPhoneExecute%3E
 
This is a simple online tool for encoding/decoding form/URL strings: http://meyerweb.com/eric/tools/dencoder/
 
Depending on your language/script development environment, there is likely a library/function to do this programmatically.

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: Vladimir Banker on 16-06-2009 06:25:47 AM
Hi!
I believe that you are right.
I used sample from below URL and it works fine, when I sending CiscoIPPhoneExecute request with URL address.
When I change it to URI request with Dial:05555 or Init:AppStatus it failed with error.
http://blog.crowe.co.nz/archive/2008/10/28/Sending-a-CISCO-IP-Phone-a-simple-command-using-C.aspx
 
May be you could check where a mistake?
Thanks.

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: David Staudt on 16-06-2009 02:35:57 PM
Can you post the full/actual XML object as it's sent to the phone?

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: Vladimir Banker on 18-06-2009 06:44:08 PM
Below result XML:
  XML=%3cCiscoIPPhoneExecute%3e%3cExcecuteItem+URL%3d'Init%3aAppStatus'%09Priority%3d'0'+%2f%3e%3c%2fCiscoIPPhoneExecute%3e
Now I have new problem, when excute URI with resulting CiscoIPPhoneStatus message it is appear only after call disconnecting.
Is exist any solution for message will apper immediatly?
 
<CiscoIPPhoneStatus>
<Text> test</Text>
<LocationX>0</LocationX>
<LocationY>0</LocationY>
<Width>10</Width>
<Height>10</Height>
<Depth>1</Depth>
<Data></Data>
</CiscoIPPhoneStatus>
<LocationX>0</LocationX>
<LocationY>0</LocationY>
<Width>106</Width>
<Height>21</Height>
<Depth>2</Depth>
<Data></Data>
</CiscoIPPhoneStatus>

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: David Staudt on 18-06-2009 10:02:08 PM
Can you clarify the order of events and provide the XML at each step?  If your CiscoIPPhoneExecute items have Priority=0 then they should be performed immediately.  If Priority=1 then the URL will be retrieved after any active call clears.

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: Vladimir Banker on 19-06-2009 09:51:46 AM
Below list of events:
 
1.7960 Phone is ringing
2.CiscoIPPhoneExecute with URL of my web site
3.My web site get request immediatly and return CiscoIPPhoneStatus message
4.Nothing appear on Phone
5.Call answered,Nothing appear on Phone
6.Call disconnected and appear my  CiscoIPPhoneStatus message.
 
What is can be error.I put Priority=0 as well.
Is it possible to debug ?
Thanks

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: David Staudt on 19-06-2009 01:25:55 PM
That doesn't sound like what I would expect to happen.  What is the model/firmware version of the phone?  Have you tried upgrading the firmware to the latest available release?
 
The first step to debugging an issue would be to get a network packet capture, i.e. vai Wireshark on a PC connected to the phone's extra switch port.  This will allow you to see the actual data sent to/from the phone - pls attach here if you do not spot anything unusual.

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: Vladimir Banker on 22-06-2009 03:28:34 PM
Hi!
First of all I would like to explain, what I try to achive:
I would like to put CiscoIPPhoneStatus message on top of display when phone is ringing and when phone is answered.
If it is possible, I continue with my problem:
The message appear on phone, but it present at bottom of ringing message and only after call is answered and disconnected it apper with timer value - calculated from start.
The Model - CP-7940G,App LoadID PC0303010001,Boot LoadId PC0303010001
Firmware 8.1(1.0)
xml of CiscoIPPhoneStatus attached in file
packet capture attached in file
Thanks

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: Vladimir Banker on 25-06-2009 02:06:32 PM
Any help,
it so urgent for us.
thanks

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: Vladimir Banker on 20-07-2009 12:29:59 PM
Is it mean, that there is no way to show status message after call anwered or ringing?

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: HAritha KAvuri on 24-08-2009 06:10:06 PM
Did you get any solution. I am trying to work on something similar to this.
 
When there is an incoming call
 
I need to get the phone number and check our oracle database, get the information and send the data back to phone again to display the message I sent.
 
Can you provide me some help doing this. thank you.
 
Regards

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: Chandan Agrawal on 28-09-2010 10:44:32 AM
Did you get any solution. I am trying to work on something similar to this.
 
When there is an incoming call
 
I need to get the phone number and check our oracle database, get the information and send the data back to phone again to display the message I sent.
 
Can you provide me some help doing this. thank you.
 
Regards


Hi,
 
Any resolutions to this?
Any help much appreciated.
 
Thanks,
Chandan
 

Subject: RE: How do I send text to a phone without hiding currently displayed softke
Replied by: Stefan Slominski on 04-10-2010 09:35:41 AM

However, there is no Answer URI that I can send with the <CiscoIPPhoneText> object.


 
what about:
 
<SoftKeyItem>
<Name>Answer</Name>
<URL>Key:Line<x></URL>
<Position>1</Position>
</SoftKeyItem>

where <x> is the lineindex on which the call is incoming
 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links