Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

Cisco Phone Directory - Max 32 DirectoryEntry object

Discussion in '3CX Phone System - General' started by DBPlus2, Jan 25, 2013.

Thread Status:
Not open for further replies.
  1. DBPlus2

    Apr 5, 2012
    Likes Received:
    3CX Ver 11
    Windows 7 Pro IIS
    Cisco SPA525G

    We are able to access the Corporate Phone directory from the Cisco phones. However, it lists only the first 32 phone contacts.

    Cisco documentations states:


    "A single CiscoIPPhoneDirectory object can contain a maximum of 32 DirectoryEntry objects. If more than 32 entries must be returned, use multipleCiscoIPPhoneDirectory objects in subsequent HTTP requests."

    3CX only maintains one XML file for all contacts found in the 3CX system. Ours has over 50 contacts listed in the file.
    This explains why the Cisco phones successfully download only the first 32 objects found in the file and the rest are discarded.

    Possible Solution:

    Create a program which when run, reads and breaks the 3CX Corporate Directory XML file into a series of alternative XML files each containing only 32 objects each.
    This I understand…

    However, I am confused on how to implement Cisco’s method of “…subsequent HTTP requests."

    Based in the information below, I believe that somehow I am to add to the HTTP response a “HTTP Refresh Setting” with the time parameter = 0, and the URL path of the next XML file that should follow in the directory listing.

    Can some explain or point me to documentation on how to do this?




    HTTP Refresh Setting
    The HTTP headers sent with any page from an HTTP server can include a Refresh setting. This setting has two parameters: a time in seconds and a URL. These two parameters direct the recipient to wait the time given in the seconds parameter, then get the data pointed to by the URL.
    The Cisco IP Phone HTTP client properly supports this setting, which gives a great deal of power to service developers. It means that any XML object being displayed can be replaced with a new page after a fixed amount of time.
    Figure 8 shows a good example of how the refresh setting can be used. This sample page shows the user the current value of Cisco's stock. It first brings up a splash screen that displays the Yahoo logo. After a very short time, it displays the numeric Cisco stock parameters. Finally, it shows a graph of Cisco's intra-day stock performance. The display then repeatedly cycles between the final two views.

    Figure 8 Sample Refresh Display
    All of this can occur without user intervention, as the display automatically cycles if a timer parameter is specified. However, on any given screen, the user can force an immediate reload by pressing the Update soft key. Also, if a timer parameter of 0 was sent in the header, the page will never automatically reload. In that case, the display will only move to the next page when the Update soft key is pressed. If no refresh URL is specified, the current page will be reloaded.
    MIME Type and Other HTTP Headers
    Delivering pages with the proper MIME type and other formatting items is not difficult, but it requires moderately in-depth knowledge of your web server. The following code excerpt, written in JavaScript and used with Microsoft's IIS and ASP, sets these values in a few lines:
    <%@ Language=JavaScript %>
    Response.AddHeader( "Refresh",
    "3; url=http://services.cisco.com/s/q.asp");
    Response.ContentType = "text/xml";
    . Additional page content here
    Usually, you can set the MIME type for pages in any web server by simply performing an association to the .xml file extension. Your web server's documentation should explain how to accomplish this. This allows you to serve static pages without the need for writing script.
    If you want to deliver dynamic content using the other supported HTTP headers, you will need to understand how to generate the HTTP headers using the desired programming language and have CGI or script access on the target web server.
    Content Expiration Header Setting
    The expiration header can control what URLs are added to the phone's URL history. This is slightly different behavior than traditional web browsers but is implemented to perform the same function. Disable the back button functionality to avoid calling a URL twice.
    This functionality allows you to expire the content of any page that is sent to the phone. When a user presses the Exit soft key, they are taken back to the last URL that was not expired when it was loaded. This differs from traditional browsers by not considering the current freshness of the data but the freshness of the data when the URL was requested. This requires you to expire a page when it is first loaded and to not set a time and date in the future.
    The following example shows how to expire content on IIS using Active Server Page (ASP):
    <%@ Language=JavaScript %>
    Response.ContentType = "text/xml";
    Response.Expires = -1;
    The "Expires" property is the number of minutes to wait to expire the content. Setting this value to -1 subtracts 1 minute from the request time and returns a date and time that has already passed.
Thread Status:
Not open for further replies.