In this tutorial, you will learn how to use the Cisco IP Services SDK to search Microsoft Active Directory without having to integrate Unified Communications Manager with LDAP. This can be useful if you have a multi-tennant environment or if you want to use an existing Active Directory database as an additional directory. 

 

 

 
 

Part 1 (This video is best viewed in HD and Full Screen)

 
 
Part 2 (This video is best viewed in HD and Full Screen)

 
 

Requirements

 

 
 

Install IIS on a Windows server (if not already installed).

 

  1. Go to Start > Control Panel > Add or Remove Programs
  2. Click ‘Add/Remove Windows Components’
  3. Double-click ‘Application Server’
  4. Check ‘Internet Information Services (IIS)’
  5. Click ‘Ok’
  6. Click ‘Next’
  7. Wait for the install to complete and click ‘Finish’ 

 
 
 

Configure IIS to permit Active Server Pages Web Extension

 

  1. Go to ‘Start > All Programs > Administration Tools > IIS Manager’
  2. Expand the Local Computer and Click on ‘Web Extensions’
  3. Highlight ‘Active Server Pages’ and Click ‘Allow’ 

 
 
 

Download and Install the IP Services SDK

  1. Login to the server with IIS installed.
  2. Go to http://developer.cisco.com
  3. Select the ‘IP Phone Services’ API
  4. Click on the ‘Resources’ link
  5. Click on the most recent ‘IP Phone Services SDK’ zip file to download
  6. Save the file to your Desktop or other download area.
  7. Extract the zip file
  8. Double-Click the installer executable to install.
  9. Take the defaults and finish the IP Services Install.

 
 
 

Download and Install Microsoft ADSIEDIT (for LDAP Queries)

  1. Click Here to download the adsiedit.zip file
  2. Extract the contents of adsiedit.zip file to c:\windows\system32\ 
  3. Go to Start>Run>regsvr32.exe adsiedit.dll
  4. Go to Start>Run>adsiedit.msc

 
 
 

Modify the sample localizeddirectory.asp file 

  1. Open c:\CiscoIPServices\ASP\LocalizedDirectory\localizeddirectory.asp with wordpad
  2. Use adsiedit.msc to change the variables
  3. Change the ldapserver variable.  
    The name or ip address of your Domain Controller will work. 
     
    var ldapserver = "10.10.10.50"; 
     
  4. Change the ldapsearchbase variable.  
    Use Adsiedit.msc. Navigate to the container or oganization unit that contains your users to be searched. Right click on the CN or OU and select properties. Copy the ‘distinguishedName’ and paste in this variable. 
     
    var ldapsearchbase = "OU=Blindhog_Users,DC=blindhog,DC=local"; 
     
  5. Change the ldapport variable.  
    If you are using Microsoft Active Directory, you will need to change this to 389. 
     
    var ldapport = "389"; 
     
  6. Change the ldapuserid variable. 
    Use adsiedit.msc. Navigate to a user you would like to use to query the ldap database. Right-click on the user and select properties. Copy the ‘distinguishedName’ and paste in this variable. It may also be a good idea to create a user account specifically for this purpose. 
     
     
    var ldapuserid = "CN=ccmadministrator,OU=Blindhog_Users,DC=blindhog,DC=local"; 
     
  7. Change the ldappassword variable. 
    This is the password of the user defined in the ldapuserid variable. 
     
    var ldappassword = "G00d3rP4ss0d"; 
     
  8. Save the new file as c:\CiscoIPServices\ASP\LocalizedDirectory\CorporateDirectory.asp 
     
     
    The top part of your CorporateDirectory.asp file should look similar to this. 
     
    var ldapserver = "10.10.10.50"; 
    var ldapsearchbase = "OU=Blindhog_Users,DC=blindhog,DC=local"; 
    var ldapport = "389"; 
    var ldapuserid = "CN=ccmadministrator,OU=Blindhog_Users,DC=blindhog,DC=local"; 
    var ldappassword = "G00d3rP4ss0d"; 
     

 
 
 

Create an XML file to pull directories together (optional)

 

  1. If you want your users to have Personal Directories as well as a corporate directory or multiple directories, you will need to create a new xml file.  
    c:\CiscoIPServices\ASP\LocalizedDirectory\Directories.xml 
     
    If not, you can just use your version of the following url for the ldap directory. 
    http://10.10.10.50/CiscoIPServices/LocalizedDirectory/CorporateDirectory.asp 
     
  2. Edit the file to include the following format. 
    The following XML file is based on this topology. Please make changes according to your own topology. The first MenuItem is to give your users the Personal Directory (like the default in CUCM). The second MenuItem is  
     
    CUCM: 10.10.10.10  
    Microsoft AD: 10.10.10.50  
     
     
     
    <CiscoIPPhoneMenu> 
    <Prompt>Select a directory</Prompt> 
     
    <MenuItem> 
    <Name>Personal Directory</Name>
     
    <
    URL>http://10.10.10.10:8080/ccmpd/pdCheckLogin.do?name=undefined</URL> 
    </MenuItem> 
     
    <MenuItem> 
    <Name>Corporate Directory</Name> 
    <URL>http://10.10.10.50/CiscoIPServices/LocalizedDirectory/CorporateDirectory.asp?action=search</URL> 
    </MenuItem>  
     
    </CiscoIPPhoneMenu>  
     
     
     
     
    Now, I have not tested this, but I imagine you could create several connections to different LDAP databases with the LocalizedDirectory Script and edit the xml file to query several directories by adding menu items to the above xml configuration.  
     
    Example:  
    <CiscoIPPhoneMenu>  
    <Prompt>Select a directory</Prompt>  
     
    <MenuItem>  
    <Name>Personal Directory</Name>  
    <URL>http://10.10.10.10:8080/ccmpd/pdCheckLogin.do?name=undefined</URL>  
    </MenuItem>  
     
    <MenuItem>  
    <Name>Directory 1</Name>  
    <URL>http://10.10.10.50/CiscoIPServices/LocalizedDirectory/directory1.asp?action=search</URL>  
    </MenuItem>  
     
    <MenuItem>  
    <Name>Directory 2</Name>  
    <URL>http://
    10.10.10.50/CiscoIPServices/LocalizedDirectory/directory2.asp?action=search</URL>  
    </MenuItem>  
     
    <MenuItem>  
    <Name>Corporate Directory</Name>  
    <URL>http://
    10.10.10.10:8080/ccmcip/xmldirectoryinput.jsp</URL>  
    </MenuItem>  
     
    </CiscoIPPhoneMenu>
     
     
     

 
 

Add the URL of the XML file to the IP Phones individually.

  1. Login to the Call Manager administration page 
    http://10.10.10.10/
  2. Go to Device > Phone
  3. Select a phone and enter the following URL in the ‘external directory': 
     
    http://10.10.10.50/CiscoIPServices/LocalizedDirectory/Directories.xml  
     
  4. To change the ‘external directory’ for all the phones, use the BAT tool. 

 
 

Or, add the URL to all phones via the Enterprise Parameters.

  1. Login to the Call Manager administration page 
    http://10.10.10.10
  2. Go to ‘System > Enterprise Parameters’
  3. Replace the ‘URL Directories’ parameter with the new XML file 
     
    http://10.10.10.50/CiscoIPServices/LocalizedDirectory/Directories.xml 
  4. Click ‘Save’ 

 

 
 
 

 
 
 
 
 
 
 

 

Be Sociable, Share!