Hi There Having difficulty displaying more than 32 directory entries on my Cisco 7960 handset. I have a Php script which returns all of the directory entries ( 50 for this example tested by putting the URL into a Web browser eg. http://mywebserver/directory.php ) found in the database, however when I select the more and next soft keys on the phone it doesn't display the next set of directory entries. I have read on the Cisco website that " A single CiscoIPPhoneDirectory object can contain a maximum of 32 DirectoryEntry objects. If more than 32 entries must be returned, use multiple CiscoIPPhoneDirectory objects in subsequent HTTP requests. " So to test this I created a flat XML file (rather than using my Php script) with the <CiscoIPPhoneDirectory> followed by my 32 entries and then </CiscoIPPhoneDirectory>. Then declared another <CiscoIPPhoneDirectory> object followed by my next lot of entries finally closing it off with </CiscoIPPhoneDirectory>. This results again with the phone displaying the first 32 entries but not the last 18 (making my 50 entries). Any comments or suggestions would be greatly appreciated. Also if anyone knows how to insert a <CiscoIPPhoneDirectory> object after every 32 entries using Php then please let me know. Regards Ed
Hi,> -----Original Message----- > Any comments or suggestions would be greatly appreciated. > Also if anyone > knows how to insert a <CiscoIPPhoneDirectory> object after > every 32 entries > using Php then please let me know.You can't. Not with php, not with anything else. The Cisco will accept 32 entries in one page. To access more entries you need to make a navigation page (using <CiscoIPPhoneMenu> for instance) and use that to select other pages with 32 entries maximum each. Florian
The additional <CiscoIPPhoneDirectory> objects have to come on subsequent HTTP requests. Take a look at http://www.jaredsmith.net/misc/cisco7960/Directory-0.1.tgz which helped me a lot with this, although I'm using LDAP information and not database records. It gives you a pretty good base to start from. (I found it on the WIKI, btw... http://www.voip-info.org/wiki-Asterisk+Cisco+79XX+XML+Services , under "Working Examples") Brent -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com]On Behalf Of Marshall, Ed Sent: Monday, April 18, 2005 7:02 AM To: 'asterisk-users@lists.digium.com' Subject: [Asterisk-Users] Cisco External Directory Hi There Having difficulty displaying more than 32 directory entries on my Cisco 7960 handset. I have a Php script which returns all of the directory entries ( 50 for this example tested by putting the URL into a Web browser eg. http://mywebserver/directory.php ) found in the database, however when I select the more and next soft keys on the phone it doesn't display the next set of directory entries. I have read on the Cisco website that " A single CiscoIPPhoneDirectory object can contain a maximum of 32 DirectoryEntry objects. If more than 32 entries must be returned, use multiple CiscoIPPhoneDirectory objects in subsequent HTTP requests. " So to test this I created a flat XML file (rather than using my Php script) with the <CiscoIPPhoneDirectory> followed by my 32 entries and then </CiscoIPPhoneDirectory>. Then declared another <CiscoIPPhoneDirectory> object followed by my next lot of entries finally closing it off with </CiscoIPPhoneDirectory>. This results again with the phone displaying the first 32 entries but not the last 18 (making my 50 entries). Any comments or suggestions would be greatly appreciated. Also if anyone knows how to insert a <CiscoIPPhoneDirectory> object after every 32 entries using Php then please let me know. Regards Ed
Ed, each individual returned XML document can only have 32 entries, you can't just lump them all together into one returned document. What I do is first use a <CiscoIPPhoneMenu>, e.g.: <CiscoIPPhoneMenu> <Title>Company Directory</Title> <Prompt>Please select an option</Prompt> <MenuItem> <Name>Bob Barker</Name> <URL>http://www.domain.com/person.php?Bob%20Barker</URL> </MenuItem> ... repeat as needed up to 31 entries <MenuItem> <Name>MORE</Name> <URL>http://www.domain.com/secondpage.php</URL> </MenuItem> </CiscoIPPhoneMenu> So each entry is a hyperlink to a person.php page that gives all of the person's phone numbers via a <CiscoIPPhoneDirectory> , e.g.: <CiscoIPPhoneDirectory> <Title>Bob Barker</Title> <DirectoryEntry>\n"; <Name>Direct DID</Name> <Telephone>800-555-1212</Telephone> </DirectoryEntry> ... repeat for extension, home phone, etc <DirectoryEntry>\n"; <Name>Cell Phone</Name> <Telephone>800-555-1212</Telephone> </DirectoryEntry> <Prompt>Select a number above</Prompt> </CiscoIPPhoneDirectory> My php xml pages and the data is driven from a mysql database, I started off with source I downloaded from http://www.jaredsmith.net/misc/cisco7960/Directory-0.1.tgz (which doesn't seem to work now, but you can probably google "Directory-0.1.tgz"). His directory, although slighty broken, is a good starting point, it includes pagination (31 entries and a MORE button). -mike Marshall, Ed wrote:> Hi There > > Having difficulty displaying more than 32 directory entries on my Cisco 7960 > handset. I have a Php script which returns all of the directory entries ( > 50 for this example tested by putting the URL into a Web browser eg. > http://mywebserver/directory.php ) found in the database, however when I > select the more and next soft keys on the phone it doesn't display the next > set of directory entries. I have read on the Cisco website that " A single > CiscoIPPhoneDirectory object can contain a maximum of 32 DirectoryEntry > objects. If more than 32 entries must be returned, use multiple > CiscoIPPhoneDirectory objects in subsequent HTTP requests. " So to test this > I created a flat XML file (rather than using my Php script) with the > <CiscoIPPhoneDirectory> followed by my 32 entries and then > </CiscoIPPhoneDirectory>. Then declared another <CiscoIPPhoneDirectory> > object followed by my next lot of entries finally closing it off with > </CiscoIPPhoneDirectory>. This results again with the phone displaying the > first 32 entries but not the last 18 (making my 50 entries). > Any comments or suggestions would be greatly appreciated. Also if anyone > knows how to insert a <CiscoIPPhoneDirectory> object after every 32 entries > using Php then please let me know. > Regards > Ed > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > >