8945, 8941 images issue

Version 1
    This document was generated from CDN thread

    Created by: Miroslav Jasso on 21-02-2012 03:21:21 AM
    Hi, Cisco gurus.
    I'm challenging strange issue on IP Phones 8941 and 8945. I have written simple ASPX (C#, ASP.NET) page, which resizes image for specific IP phone display size. I've attached code snippet below. Whole code is quite complicated and my know-how . This application works fine on 7945G, 8961, 9951. However it doesn't work on 8941 and 8945.
     
    I made some research and I was able to determine, that problem is in ASPX suffix. These IP phones probably don't know what to do if ASPX page returns "image/png" content and crash. Yes, IP phone stucks and has to be restarted.
     
    Am I doing anything wrong or is that a bug?

     1
     2 Response.Charset = "";
     3 Response.Expires = -2000;
     4 Response.ContentType = "image/png";
     5 resizedImage = photoBR.ResizeImage(originalImage, phonePhoto.Resolution);
     6 
     7 MemoryStream memoryStream = new MemoryStream();
     8 resizedImage.Save(memoryStream, ImageFormat.Png);
     9 memoryStream.WriteTo(Response.OutputStream);
    10 Response.AddHeader("content-length", memoryStream.Length.ToString());
    11 Response.Flush();


    Subject: RE: 8945, 8941 images issue
    Replied by: ERIK TAMMINGA on 22-02-2012 03:52:26 AM
    Hi,

    I've seen this before on Cisco routers when doing VXML. The problem is that the phone looks for the extension of the requested file and doesn't understand .aspx.
    Try to use the following URL. This might trick the phone in understanding the output is a PNG and doesn't matter to ASP.NET.

    http://1.1.1.1/picture.aspx/picture.png Or if you're already sending arguments then try http://1.1.1.1/picture.aspx?arg1=0&output=picture.png

    Let me know if this works.

    Regards,
    Erik

    PS. Wouldn't it be great if Cisco just looked at the contentType headers? ;)

    Subject: RE: 8945, 8941 images issue
    Replied by: David Staudt on 21-02-2012 03:28:50 PM
    Can you provide what the full XML request/response is?  A network packet capture (Wireshark) from the phone's extra PC switch port may be very helpful.
     
    Certainly the phone should not go inoperative based on any API call, so there is probably a defect in here somewhere, however perhaps we can spot something that can help you workaround the issue.
     
    - Are you returning the png as part of a CiscoIPPhoneXXXFile object request?
    - What resolution/color depth are you using for the 8941/45?

    Subject: RE: 8945, 8941 images issue
    Replied by: Miroslav Jasso on 22-02-2012 03:24:46 AM
    I've attached wireshark capture to the original post. You can do your own test, its very simple. Use my code to generate PNG picture.

    Has 8941/45 any special color depth? I am using 24bits per pixel. However, I can save generated PNG image on disk/webserver and use it again (without generating in ASPX page) and it works. Let me explain that once more:

    - When I place into CiscoIPPhoneImageFiles URL tag URL with 'png' suffix (e.g. http://1.1.1.1/picture.png) it works. When I place there URL with 'aspx' suffix (http://1.1.1.1/picture.aspx) it doesn't work. Both responses are same.

    And one more thing...I can see this log message in phones console log: DelCiscoImg(): unacceptable params argv[0]

    Subject: RE: How to Configure CSS and Partitions to lock an IP phone
    Replied by: Rizwan ul haq on 22-02-2012 05:19:00 AM
    Hi David,
                   I am using Callmanager 8.0, I want to restrict calling from an ip phone having extension (e.g 2000), I have created a callingsearchspace named "css1" and a partition named "employee" in "css1" ,  Let me know how to configure route pattern , routelist so that the extension 2000 using the css1 unable to call. Let me Know whiich feilds to configure  in Route Pattern and Route List and others if any in CallManager
     
    Thanks 

    Subject: RE: 8945, 8941 images issue
    Replied by: Miroslav Jasso on 22-02-2012 06:52:31 AM
    Yeah, it works!

    http://1.1.1.1/picture.aspx/picture.png - You can use querystring as well, it doesn't change anything. Phone is probably looking at last suffix before '?' or EOL. Because 'http://1.1.1.1/picture.aspx?output=picture.png' doesn't work.

    Thanks you very much Erik

    ps: I agree with you and I hope that next firmware will fix this *** issue . Because this workaround is little bit uncomfortable.