Question about the directory script by Mat Phillips

First - Many thanks to Mat for the exemplary work writing up the Cisco-callmanager-patch and the steps to get it installed and sane.

I now have a bunch of CP8941’s happily working with FreePBX 14 with asterisk 13 patched for callmanager - video - softkeys etc… the last little bit is Mats (sample) php code to present a directory.

It IS called and i see a window with “internal phonebook” “ring groups” and “personal contacts” they are not populated and at this point i cannot work out why - i have checked the DB access and that seems OK, no errors in Apache logs, i fear my php is not up to working out what is happening or not happening here - any logging or DIAG info is available on request and the php code is on the page listed above.

Be good to know if anyone has this working with #14 be good to know if there are any PHP genii about.

I have solved my conundrum and now have the directory.php doing something useful with CP-8941 handsets - the statements:-

sql = "SELECT name, extension FROM users WHERE name NOT LIKE '%FAX%' AND extension < 400 ORDER BY name";

and

$sql = "SELECT description, grpnum FROM ringgroups WHERE grpnum < 599 ORDER BY description";

i had to change to

$sql = "SELECT name, extension FROM users WHERE name NOT LIKE '%FAX%' ORDER BY name";

and

$sql = "SELECT description, grpnum FROM ringgroups ORDER BY description";

To get them to actually select anything - once i created the bespoke “address book” group in the UCP - to get them to display the contents of the groups in the “address book” i had to add the extension to the url to get it to work…

<directoryURL>http://pbx.domain.tld/cisco/directory.php?xtn=911</directoryURL>

If anyone has any idea how to get a list of “swiftdials” into the CP-8941 rocker key i would be very grateful (down is history and up is speed dials) - i can pull them out of the Asterisk Phonebook once i know where to put them - or just code them directly into the xml… i guess i could use the code from the “bespoke” address book in the UCP so that the user has full control over what they have in their speed dials - but first i need to know where to put it in the SEPxxxx.cnf.xml file (if indeed that is where it needs to be)

A post was split to a new topic: Cisco 7811 directory xml