Cookies support for Cisco 79xx phones

Version 1
    This document was generated from CDN thread

    Created by: vikramgvp (simulated) on 28-04-2009 04:56:49 AM
    I am trying to develop a login application on 79xx phones which require client side cookie handling.

    Please let me know if cisco phones support Cookies. From the IP Phone Services Application Development Notes HTTP browser on the phone
    supports upto 4 cookies of 255 bytes length. Also listed in the notes for the phone models 7970,7971,7961,7941 phones clear the session state whenever the application closes.
     
    Phone sends a HTTP GET request to access a resource URI, the server sends back a 200 OK response with Set-Cookie header. The GET request comes with a header Connection:close and the server automatically closes the TCP connection after sending 200 OK response.So when the browser exits on the phone and when the phone tries to access the same resource URI it never sends back the Cookie. Also i have tried different mechanism of sending Expires header value less than of the Date value advertised in 200 OK response so that URL is never pushed on to Phones URL history. Is there a way to maintain persistent HTTP connection on the phone browser and send cookie's dropped by server.
     
    Thanks
    Vicky
     
     
     
     
     
     
     
     

    Subject: RE: Cookies support for Cisco 79xx phones
    Replied by: David Staudt on 28-04-2009 03:45:25 PM
    The phones should support small cookies, per your notes: 255 bytes length, a small number retained, automatically removed after 30 minutes (hard-coded.)
     
    If not operating as expected, I would recommend getting a network packet capture from the phone's extra switch port via Wireshark.  You can attach here if you see something amiss.

    Subject: RE: Cookies support for Cisco 79xx phones
    Replied by: Pentakota Vikram on 29-04-2009 05:11:17 AM
    Hi David,
     
    Sorry for the late reply. Here are the captures for the HTTP request from the phone.
     
    Phone IP : 192.168.38.192
    HTTP Server: 192.168.38.18
     
    The 200 OK response at packte 13 contains two cookies added by the server. When the phone sends back the next request at packet 43 it doesnt send the cookies. Please let me know if i am missing something.
     
    Thanks
    Vicky

    Subject: RE: Cookies support for Cisco 79xx phones
    Replied by: David Staudt on 29-04-2009 06:05:08 AM
    As low-resource platforms, the phones can be particular if things aren't exactly as they expect.  Two items that might bear checking into:
     
    - Two cookies are returned by the server.  Not sure how/if the phone handles multiple cookies.  If you can try with just one, it would be interesting to see if it works.
    - It looks like your Expires header may be immediate or a short time?  It's possible the phone considers page expiry as indication 'session end' and therefore dumps the cookies.  You might try with a longer expiration to see what happens.
     
    If nothing pans out, try the latest firmware load upgrade, and let me know the model/firmware version.

    Subject: RE: Cookies support for Cisco 79xx phones
    Replied by: Pentakota Vikram on 29-04-2009 01:42:31 PM
    Hi David,
     
    Tried by sending only one Cookie in the response. But still the phone is not sending it back in the subsequent requests.
    I have also tried setting Expires value to a long value 24 hours but still the phone is not sending back the cookies.
     
    Below is the list of phones i have tried the cookie test.
    1. Cisco 7970
        LoadFIle - SIP70.8-3-3SR2S
        AppLoadID   - jar70sip.8-3-3ES2.sbn
        JVM LoadID - cvm70sip.8-3-3ES2.sbn
    2. Cisco 7960
        AppLoadID - P0S3-08-8-00.sb2
     
    Thanks
    Vikram
     
     

    Subject: RE: Cookies support for Cisco 79xx phones
    Replied by: David Staudt on 29-04-2009 11:05:45 PM
    How is the initial GET request getting triggered/launched?
    How is the second request then getting triggered/launched, since there doesn't appear to be any elements with URLs for the user to make the request..?

    Subject: RE: Cookies support for Cisco 79xx phones
    Replied by: Pentakota Vikram on 30-04-2009 04:25:17 AM
    Hi,
     
    Currently i have configured the servicesURL in the  config file to point to the web-server. The first request is triggerred by hitting the services button. Now the browser is exited and again the Services button is hit which triggers the second request.
     
    Application can be treated as a Login application which needs to track the user, currently i am trying to use Cookies to track the user. Please let me know in case if i am missing something.
     
    Thanks
    Vikram
     
     
     

    Subject: RE: Cookies support for Cisco 79xx phones
    Replied by: David Staudt on 30-04-2009 08:42:16 PM
    My guess would be that when a page is requested via the Services button, that the cookie mechanism isn't applied.  This may be a defect.  Some possible workarounds:
     
    - Use a line appearance button to launch the URL (could end up with the same problem)
    - Restore the default services URL and configure the login app as a standard service (requires the user to press two buttons)
    - The phone should append " ?name=SEPxxxx " with the unique device name, to the request, and this would be retrievable at the web server via the URL parameters.  Perhaps the app can use this unique identifier to establish a relationship with an existing session.

    Subject: RE: Cookies support for Cisco 79xx phones
    Replied by: Pentakota Vikram on 06-05-2009 05:03:03 AM
    My guess would be that when a page is requested via the Services button, that the cookie mechanism isn't applied.  This may be a defect.  Some possible workarounds:
     
    - Use a line appearance button to launch the URL (could end up with the same problem)
    - Restore the default services URL and configure the login app as a standard service (requires the user to press two buttons)
    - The phone should append " ?name=SEPxxxx " with the unique device name, to the request, and this would be retrievable at the web server via the URL parameters.  Perhaps the app can use this unique identifier to establish a relationship with an existing session.

     
    Thanks David for the answer but the third approach of tracking the phone using DeviceName has a different problem. When the phone browser exits it tears down the TCP Connection so that the HttpSession is no longer valid. I am not sure how it can be done.
     
    How can we launch a URL with a line appearance button. Is there any document explaining this configuration.
     
    Thanks
    Vikram
     
     

    Subject: RE: Cookies support for Cisco 79xx phones
    Replied by: David Staudt on 06-05-2009 01:57:14 PM
    The most straightforward way to configure a services URL button is from the phone config screen, on the left click on 'Add a new SURL'
     
    The same can be accomplished from the User pages, as well as via phone button templates, etc. I believe.