Tag Archives: ldap

LDAP Directory Search and Dial for Cisco IP phones

(Originally posted December 14, 2005)
The stock “Corporate Directory” function in CallManager relies on user information found either in Active Directory or Cisco’s DCD. Our official directory information is kept in an enterprise LDAP server, so I put together a simple Perl CGI to take search parameters from phone keypad (text) input, query the LDAP server, and return search results to the phone, providing name, department, and phone number.

The phone number comes back from the LDAP search in the format “+1 814 555 1212” so if we want to have a Dial hotkey available, the number first has to be formatted according to the system’s dial plan. The University’s dialing plan is not too complicated, so parsing out a dialable number required only a few regexps.

There is a toggle switch in the code to allow or disallow returning of entries with no phone number in the directory. In a way, I like having entries returned even if there is no phone number. If I am searching for John Doe, at least I will see that he exists in the system, but does not have a permanent phone assignment.

Download the scripts from repos/phoneldap.

(Update on October 18, 2007)

I updated the files in the repository. There have been some changes since 2005, including a new departmental lookup function. I’m not going to go into detail about each file; start with dirmenu.txml. (Point the Directories URL in CallManager to this file.) Setup of the web server options is the same as for the weather and RSS scripts.

Here’s what it looks like…

Directories Menu screen
Directories Main Menu
Entering a name to search
Entering a name to search
Results page with Dial softkey
Search results with Dial softkey