[Asterisk-Users] Cisco External Directory

Mike Holloway asterisk-users at citrini.com
Tue Apr 19 13:20:49 MST 2005


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 at 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
> 
> 



More information about the asterisk-users mailing list