cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1621
Views
0
Helpful
1
Replies

Cisco Phone Directory - Max 32 DirectoryEntry object

David
Level 1
Level 1

Cisco SPA525G

3CX Ver 11 Windows 7 Pro IIS

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:

 

http://www.cisco.com/en/US/docs/voice_i ... #wp1033491

 

"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 downloads 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?

 

Thanks,

 

David

 

http://docstore.mik.ua/univercd/cc/td/d ... .htm#25866

 

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.

 

 

DBPlus2
New User
 
Posts: 8
Joined: Thu Apr 05, 2012 5:45 pm

 

1 Reply 1

Dan Lukes
VIP Alumni
VIP Alumni

It seems you are asking in wrong forum. AFAIK, you are asking "how to add HTTP header to response generated by my own script". It depend on WWW server we are speaking of and language of script itself. If you will fail to found solution within documentation of the HTTP server and/or scripting language you are using, then the better place for your question is a forum related to such language and HTTP server.

In meantime, you can try other solituin. The "Refresh: 0;..." header is required for correct function of SoftKey:Next which is displayed by default. But you can redefine the content of SoftKey area using your own key. Such configuration is part of DirectoryObject you sent to phone. See definition of SoftKey 3 in example bottom. It's not original SoftKey:Next that depend on Refresh header. It's my own custom soft-key named "Next" with exact URL defined as part of key definition (replace 'N' with number of next page). It doesn't depend on Refresh header in any way. You should consider such advice as "temporary workaround". You should discover how to send HTTP header 'Refresh'  from your script. Note, it's not possible to redefine one SoftKey only. If you wish to redefine a soft-key, then all soft-keys need's to be defined by you.

... followed by Title, Prompt,up to 32 ...

Dial

SoftKey:Dial

1

EditDial

SoftKey:EditDial

2

Next

https://an-url-to-your-server-and-script/test-Directory.asp?page=N

3

Cancel

SoftKey:Cancel

4

Exit

SoftKey:Exit

5