CiscoIPPhoneExecute with URL as an XML value responds with Error 302

Version 1
    This document was generated from CDN thread

    Created by: TASOS PAPADOPOULOS on 15-09-2009 03:11:13 PM
    I've succesfully pushing Internal URI commands like Dial and Play with CiscoIPPhoneExecute to a 7960G IP Phone. But when I'm pushing an external url (Execute an external url) it responds with :
     
    HTTP/1.1 302 Found
    Location: http://1.2.3.4/FS/PUSH_RESP_84_74
    Content-Length: 0
    Server: Allegro-Software-RomPager/3.12
     
    I've no problem with all new generation IP Phones.
     
    My http request headers are:
     
    POST /CGI/Execute HTTP/1.0
    Host: 1.2.3.4
    Authorization: Basic ********
    Connection: close
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 146
     
    XML=%3CCiscoIPPhoneExecute%3E%3CExecuteItem+URL%3D%22http%3A%2F%2Fdemo.123.com%2Ffiles%2Fip_phone_message.xml%22%2F%3E%3C%2FCiscoIPPhoneExecute%3E
     
     
    I'm using firmware v8.1.2.
     
    Can anyone have any idea?
    Regards,
    Tasos Papadopoulos

    Subject: RE: CiscoIPPhoneExecute with URL as an XML value responds with Error 302
    Replied by: David Staudt on 15-09-2009 04:05:33 PM
    HTTP 302 is a redirect.  The way this phone works is that the XML response to the initial request is written to a local file on the phone's phone system, then the original request is redirected to the file's location, here: http://1.2.3.4/FS/PUSH_RESP_84_74
     
    The HTTP requestor needs to follow this redirect to retrieve the response data.

    Subject: RE: CiscoIPPhoneExecute with URL as an XML value responds with Error 302
    Replied by: TASOS PAPADOPOULOS on 15-09-2009 04:27:44 PM
    Thanks a lot David. You've helped me to go one step further, but after following this link I get:
     
    <CiscoIPPhoneResponse>
    <ResponseItem Status="1" Data="HTTP Request Failed" URL="http://demo.123.com/files/ip_phone_message.xml"/>
    <ResponseItem Status="0" Data="" URL=""/>
    <ResponseItem Status="0" Data="" URL=""/>
    </CiscoIPPhoneResponse>
     
    The phone has for sure access to this url becuse its the same server which pushing the CiscoIPPhoneExecute. Do you have any explanation of the failure on this type of phone?
     
    Rgds,
    Tasos

    Subject: RE: CiscoIPPhoneExecute with URL as an XML value responds with Error 302
    Replied by: Muhammad Sabir on 01-10-2009 01:16:01 PM
    Is there  a redirect in this URL as well?
     
    http://demo.123.com/files/ip_phone_message.xml
     
    If you open this URL in the web browser, what do you see?

    Subject: RE: CiscoIPPhoneExecute with URL as an XML value responds with Error 302
    Replied by: David Staudt on 01-10-2009 02:52:40 PM
    You can get a network packet capture to see exactly what is happening from the phone, i.e. connect a PC to the phone's extra switch port and run Wireshark to capture/inspect the HTTP packets.  Feel free to attach here if you can't spot anything.
     
    My next suspicion would be that DNS is not resolving the host name for the URL - in which case you either need to fix DNS for the phone, or use an IP address in the URL.