How to Disable Corporate Directory in CUCM 7.x

Author
William Bell
Vice President, Solutions and Products

The request to disable or restrict access to the corporate directory is actually quite reasonable and not uncommon.  One common scenario is that the customer wants to restrict access to an internal/corporate directory from a common area phone.  This request can be simply hide the Corporate Directory, hide the Personal Directory, or disable the button entirely.  In pre-CUCM7x systems you can’t accomodate all of these requests but in CUCM7x you have much more flexibility.  We’ll talk about the general process flow first and then discuss the pre- and post-CUCM7x options.

What is the corporate directory?

The Corporate Directory is a Cisco feature that allows users to search a repository of names and phone numbers.  By default it is an application that runs on the CUCM cluster which uses data stored in the “enduser” table.  You can check out the data in your “enduser” table by issuing the following query via AXL/SOAP or at the command shell:

admin:run sql select firstname,lastname,telephonenumber from enduser
firstname lastname telephonenumber
========= =================== ===============
**TELEPHONENUMBER** David Hailey 1203123 Bill Bell 1203456 Andre Wright 1203789

Data displayed in the default Corporate Directory application uses the “enduser” database table even when you have DirSync enabled.  Data is replicated from your corporate LDAP to the “enduser” table.

How does the phone access the corporate directory?

When a user selects the directories button on the Cisco IP phone it is actually using a URL provided by the CUCM configuration to pull an XML document from a designated location.  By default this is an application hosted on one of the CUCM cluster nodes.  However, this is not required.  You can write your own Corporate Directory application.  As long as the application can provide a properly formatted XML document to the IP phone, you are in business.

How does one disable the corporate directory in pre-CUCM7x versions?

In a pre-CUCM7x build, if you wanted to disable the corporate directory for all phones, you simply go to System>Enterprise Parameters and scroll down to the Phone URL Parameters section and delete the URL you find in the URL Directories parameter.  Click on save, reset the phones, and Corporate Directory is no more.  This will also remove the Personal Directory option provided in CUCM 5x and later releases.

In most cases, you don’t want to disable the Directories URL for all phones but only specific groups of phones.  In this case, you have two options.

Option 1:

Delete the Directory URL setting in Enterprise Parameters and then specify the valid Directory URL at the device level for phones you want to have it enabled on.  The default is “disabled” so, if a phone has no URL defined in the device config, it uses the default.

Option 2:

With the Enterprise Parameters set to use the valid URL, you can put a bogus setting on the phone configuration page for phones you want to restrict.  I have looked through some forum threads and some people like to actually put a bogus URL like: http://1.1.1.1/bogus.html or http://nodirectory or something equally trivial.  This method doesn’t work so well for me.  I mean, it achieves the same end goal but there is a side effect.  The phone will actually try to resolve and connect to the URL.  So, what you see on the phone is something like this:

Notice the erroneous request and resulting timeout.  This is somewhat annoying to me. You can avoid this, at least in CUCM 6x and relevant phone firmware.  If you specify a URL like “disable” or “heythere”  then you can actually avoid the “Host Not Found” error.  Why?  Well, my guess (I didn’t write the firmware) is that the phone recognizes an invalid URL and just ignores it without kicking out an error message to the screen.

So, what about CUCM 7x?

In CUCM 7x, I found that quite a few things have changed.  I messed around in the lab a little to understand the “new” behavior and I learned quite a bit.  First, in CUCM 7x the various directories like Missed Calls, Received Calls, Placed Calls, etc. are now IP Phone Services.  You can see them by going to Device>Device Settings>Phone Services:

Would you look at that!  …What am I looking at?  Basically, think of each menu item you would normally see in the “Directories” menu as a service.  You can now configure them individually.  One may think that they can assign/unassign directory features like they would say Extension Mobility.  It isn’t that straight forward, at least by default.  You will notice that there is a parameter in the tabular view called “Enterprise Subscription”.  This is a key attribute.

When an IP Phone Service is setup as an Enterprise Subscription, this means that it is automatically assigned to all phones.  In otherwords you can’t “unassign” the service.  At least not in one step.  Also, you can only toggle the Enterprise Subscription parameter when you create an IP Phone Service.  So, services like Corporate Directory (which are “configured” on system build) are already enabled as an Enterprise Subscription.  We’ll come back to this in a moment.

There is another, related feature that we should understand a little before playing around with the new toys.  I believe the feature is called “Enhanced Service Provisioning”.  It basically allows an administrator to set a parameter which tells a phone to get service configurations either internally (using TFTP config file) or externally (using service URLs).

The configuration controlling how phones behave is controlled at a system-wide level with a new Enterprise Parameter called “Service Provisioning”.  This parameter can also be controlled at a device level via the “Common Phone Profile” setting on an IP phone.  The default behavior is to use Internal Service Provisioning which means:

  • Phone Services are provisioned using IP Phone Service settings and delivered to the phone in the configuration file (TFTP)
  • Messages/Directories URL parameters are not used

When this parameter is set to use External Service Provisioning, the device will use the URL parameters as they would in pre-CUCM7x builds.  So, Internal is the new method and External is the old method. You can also configure the “Service Provisioning” parameter to do both.  I haven’t played with that much yet.

So, lets say you wanted to disable the Personal Directory feature from all phones in the cluster, how would you proceed?  This is easy, go to Device>Device Settings>Phone Services.  Click on Personal Directory and toggle the “Enable” option off.  Click on Save and then Update Subscriptions.  Of course, you need to soft restart IP phones for it to take effect.  Once you are done, no phone in the cluster will have access to the Personal Directory.

What if you wanted to disable it on only a few phones?  This is slightly tougher.  By default, phones use Internal Service Provisioning.  Which means that the Directory URL is ignored.  Further, when using the Directory URL (i.e. “External Service Provisioning”) you don’t have the option to just filter out the Personal Directory (unless, of course, you are custom building the application – different topic).  Further, the Personal Directory has the Enterprise Subscription flag enabled and you can’t disable it.  This isn’t a huge deal, simply do the following:

  • Take note of all of the parameters for the Personal Directory service
  • Delete the Personal Directory service
  • Add a new server called Personal Directory and add in all of the parameters except the Enterprise Subscription flag, make sure this is turned off
  • Now, update the Subscriptions on an individual phone so they are subscribed to the Personal Directory service you just created
  • You are done

This method applies to all of the directory Phone Services.  So, if you wanted to disable the Corporate Directory you can do this using the same methodology.

Now, one of the problems I have heard people complain about is that they want to disable the Directories button completely.  I saw this on a Netpro thread recently and when I mocked the scenario up in my lab I experienced the issue the user was having.  The solution is found in the understanding of how the “Service Provisioning” parameter works with the Phone Services.

Let’s say you have 2000 phones and you want to disable the Directories button a 20 of them.  There are a few approaches but I like the following best.

  • In CCMAdmin go to Device>Device Settings>Common Phone Profile
  • Select and copy the “Standard Common Phone Profile”
  • Configure this new profile as follows:

Notice that we are specifying External Service Provisioning for this common profile. Now, proceed to assign this profile to an IP phone.

  • Go to Device>Phone
  • Select the “Common Phone Profile” setting and choose the new phone profile “External URL Phone Profile”
  • Click on Save and Apply Config

So, what have we accomplished.  We basically have told the target phone to not use the Enterprise Subscription Phone Services and to use the Messages and Directory URLs instead.  Does this accomplish our goal?  Assuming you have the default configuration applied for the Enterprise Parameters URL settings then you have fallen short of your goal.

Since we have told the phone to use the External Service URLs it will behave like a pre-CUCM7x phone.  Which means, the device settings URL for Directory must be considered.  By default, this field is blank.  Which does not mean “disabled”, it simply means use the Enterprise Parameters.  Now, the Enterprise Parameters will still have the xmldirectory.jsp URL configured by default.  So, when you go to the phone with the “External URL Phone Profile” configured and hit the directories button, you still pull down the Directories menu.

To “fix” this, go to the System>Enterprise Parameters and delete the URL Directories parameter.  Restart the IP phone and now when you hit the Directories button you will see a message “No Services Available” at the bottom of the phone screen and no menu is displayed.  Now, you have successfully disabled the Directories button.

Missed Calls/Received Calls/Placed Calls

(Added 8/31/2010)

Some readers noted that when they enabled a custom corporate directory Missed Calls, Received Calls, and Placed Calls would no longer be presented as menu options.  This is by design.  The developer will need to modify their back-end application to accommodate presentation of these directory URLs:

  • Missed Calls:  “Application:Cisco/MissedCalls”
  • Received Calls: “Application:Cisco/ReceivedCalls”
  • Placed Calls: “Application:Cisco/PlacedCalls”

A snippet of Java code from one of my corporate directory applications:

These URLs essentially tell the phone to load a local “application”.  IOW, you won’t see the phone try to resolve these URLs to a network entity.  The directories are still stored on the phone itself.

31 responses to “How to Disable Corporate Directory in CUCM 7.x

  1. This is an awesome Article and solved my Problem with My Upgrade to CUCM 7.1(2B)SU1 and the Corporate Directory.

    I have a custom Script that was working and after the upgrade no longer worked. I just disabled the Coporate Directory by unchecking the enable box and reset my phones to get it to work.

    I do not have the Service Provisioning External URL Option in the 7.1.2 version. Atleast I ahve not found it.

    Thanks fo the Article…..

  2. It is everything I was hoping to learn and more! Thanks for taking the time to share this with all of us in the field!

    Dan

  3. Anas,

    We could possibly help. Can you provide more information on what it is you are trying to accomplish and what kind of help you need?

    Regards,
    Bill

  4. Hi guys,

    Does any one have the url link for missed calls and placed calls and received calls like the url for the corporate directory?

    Regards,

  5. I have setup an external xml file and it works as expected for directory lookups. however when sepcifying external url my missed calls and placed calls go away. how can I confugre this so they stay and we have access to an external url for directories?

  6. Greg and Georges,

    Sorry for the delay in responding. I have been engaged on other tasks. You can reference the Missed/Placed/Received calls easily by using the same URLs that you see listed in the CUCM 7.1 phone services list.

    Example Java snippet from ASP:

    //For CUCM 7.1 and later: missed calls/received calls/placed calls
    Response.Write("Missed Calls");
    Response.Write("Application:Cisco/MissedCalls");
    Response.Write("Received Calls");
    Response.Write("Application:Cisco/ReceivedCalls&lt/URL>");
    Response.Write("Placed Calls");
    Response.Write("Application:Cisco/PlacedCalls");

    HTH.

    Regards,
    Bill

  7. Greg and Georges,

    My comments were not being posted intact. Our blog engine doesn’t handle special characters. So, I just incorporated the answer to your question in the blog article itself. Scroll to the bottom and you should see a good (and intact) answer/example.

    HTH.

    Regards,
    Bill

  8. Bill…great post! We are getting around to UCM 8.x and this helped alot! I’m still stumped on how to get the Placed/Misses/Received calls to display when I have the corporate directory configured as a external URL. Where does the developer come into play and where exactly are they developing?
    When I changed the common profile config to "external" I lost Placed/Missed/Received. When I changed it to "both" I had 2 corporate directories and the placed/missed/received.

    Also, do I need to add the external URL in the Enterprise Services or just the Corporate Directory Phone service or both?

  9. Chris,

    I assume that you have a server-side web application in your network. When you enable the external URL, you will want to point the enterprise parameter (or device parameter) for the corporate directory to your web server.

    The behavior you are seeing with respects to "losing" the placed/missed/received calls is expected. Your application needs to tell the phone to display these menu options. To get the placed/missed/received calls to display, your developer will need to incorporate the appropriate XML child nodes into whatever code they are using to generate the XML menu. An example is provided at the end of the blog post. The example is based on jscript in an ASP.

    HTH.

    Regards,
    Bill

  10. Hello William:

    I need to get missed calls, by executing an url o an ws. I saw one comment where you say that is an url "Application:Cisco/MissedCalls", but ¿how can invoke this?

    best regards.

  11. Hey Norberto,

    If you look at the end of the blog, you will see a code example on how to reference the Missed Calls application URL.

    HTH.

    Regards,
    Bill

  12. Paul,

    First, have you tried provisioning the phone to use both Internal and External URL provisioning? The setting of "Both" under the Common Phone Profile Config is worth checking.

    Second, for your execs you may want to consider using Extension Mobility and enable the CUCM service parameter to clear call logs when a user logs in or out of a phone. This way, they can access the call logs while in the office and the call logs are erased when they leave. Worth considering.

    HTH.

    Regards,
    Bill

  13. Hi Bill, thanks in advance.

    I can’t understant how invoke this url, since i guess it’s a relative one (Application:Cisco/MissedCalls).

    I’m invoking many services, for example: https://:/realtimeservice/services/RisPort
    https://:/axl/

    But I can’t find any request to get missed calls from specified device.

    I don’t know in what context I can use this url (Application:Cisco/MissedCalls) since I need do it from an application written in c#.

    I was trying to use the server url https://:/Cisco/MissedCalls?device=xxxxxx
    or the phone url http://phone_ip/Cisco/MissedCalls

    May be, I am misunderstanding the concept.

    Please help me

    Best regards.

  14. Norborto,

    If I understand your request, you are looking for a method to remotely pull the missed calls list from the phone. I was referring to the ability to still provide a missed calls list from the phone’s perspective. Basically, if you build a custom corp. directory application for phones, your app needs to make these URLs available to the phone via the XML response to the phone.

    So, I am guessing we are talking about different solutions.

    AFAIK there is no way to remotely retrieve the missed calls list from the phone via direct API calls. It is important to note that CUCM does not store Missed/Received/Placed calls. The phone caches this information.

    HTH.

    Regards,
    Bill

  15. Hi Bill, I have another question.

    Please, tell me if there is a way to trap external inbound calls, lookup the number in a local directory and display the message with last, first name in the target phone.

    thx in advance

    regards.

    ps: is this the right blog to post?

  16. Norberto,

    CUCM has no way to resolve calling number to name via a directory lookup. Some soft clients do this via user defined address books or LDAP hooks. One of my fellow CSC Netpros wrote a TCL script that apparently addresses your need. I haven’t tested this script nor can I attest to performance, usability, or stability. The script is called "number to name" and is available here: http://www.ciscoxmlservices.com/en/tcl–ivr-scripts

    Since it is a TCL app, it runs on the gateway and requires that the gateway is not backhauling ISDN B+D to CUCM (i.e. it won’t work with MGCP).

    HTH.

    Regards,
    Bill

  17. Hi Bill!
    Very interesting and useful post! Just a question, is the corporate directory usable also for the external calls?
    I mean having external calls informations ( IE first name last name number ) displayed on the phone by the mean of the corporate directory in MissedReceivedPlaced calls?
    Thanks.

  18. Michele,

    Thanks for the feedback!

    No, the corporate directory application cannot be used in the manner you describe. Actually, there is no native way in the CUCM to resolve calling party names using a corporate directory. You will sometimes see software clients doing this for the user, but it is done by the soft client.

    To do something similar for standard IP phones and CUCM, you would need to consider a "man in the middle" approach. One option is to leverage TCL scripts on a H323 voice gateway. There are two scripts I have seen:

    1. A script on the Cisco Developer site: http://developer.cisco.com/web/vgapi/resources

    The script is called "Modifying Calling Name".

    2. A script put together by a third party: http://www.ciscoxmlservices.com/en/tcl–ivr-scripts

    Look for "Number to Name" in the script description table.

    I have not tested either script, so I can’t make a specific recommendation at this time.

    HTH.

    Regards,
    Bill

  19. If we use the "both" option in service provisioning, and delete the URL Directories

    The mssg button i think will still work cause of using internal service provisioning but will the Directories button will still work cause the phone still see the internal

  20. Hythim,

    Not sure I follow the scenario or not. You are deleting the enterprise subscription for directories and setting the provisioning method for a device (or group of devices) as "both". You will want to check the URL Directories parameter in the Enterprise Parameters section of the config and/or check the URL Directories parameter at the device level. These fields identify external sources and may be used if provisioning is set to external or both.

    HTH.

    Regards,
    Bill

  21. hi,

    thanks about your blog, it’s helps me to understand more about CUCM.

    I want to disable Directory Button, I tried to do all steps on a virtual CUCM 7.1 with a CIPC, but still appear it.

    do you think this is becouse I using a virtual machine or a CIPC?

    Thanks.

  22. Hi Bill, I get the script "number to name" from ciscoxmlservices.com and it works. The script recover from an URL the name of the caller if exists.
    Now, my problem is the screen area in which the caller information is displayed, i mean, its too small and its not enoght to display first and last caller names even other information. Do you know a way to increase o configure the screen phone for caller information?

    best regards

    Norberto

  23. Norberto,

    I have not used that particular script. I do not know of a way to increase the size of the call pane (which is what displays the information you are looking for).

    Regards,
    Bill

  24. Thanks Bill, do you have contact info for someone I can reach out to regarding the app?

  25. Jeff,

    Certainly. You can contact sales@netcraftsmen.net to initiate a request for information. From there, one of our account managers and I will set up time to talk to you about your questions.

    HTH.

    Regards,
    Bill

  26. Great post that I have referred to multiple times since the change. Bill, I’m a little confused why the Cisco default changed to “Internal”. This effectively breaks Corporate Directory for customers after initial install unless you change the Enterprise Provisioning value to “Both”. Do you have any insights as to why the default would be internal only? Maybe I’m behind on the newest methods of doing Corp Dir…does now customize their Corp Dir instead of using the internal CUCM Directory? On my installs, the corp dir doesn’t work unless this value is changed. And, one time I made the mistake of changing it to External only, but then that breaks the internal messages button. It makes no sense to me, but maybe you can shed some light.

  27. Stan,

    I can’t say for sure why Cisco would default to "Internal". However, if I were the product developer, I would have defaulted to "Internal" as well. The benefit of Internal Provisioning is that phones will use the UCM node they are registered to for services. Therefore, services that support Internal Provisioning have feature redundancy. So, for the "out of the box" feature set using Internal Provisioning makes a lot of sense.

    I come across a fair amount of customers that have either added a custom corp. directory app to their solution or need/want to. So, I can see where you are coming from. I guess you just have to incorporate that piece of data into your discovery and make sure you account for it during design/build/deploy.

    On your last point: yes, if you set the mode to External Provisioning then you will break the Messages button. There also isn’t a clean fix for that (at least in 7.x – I haven’t tested 8.x or 9.x). You can put the URL that you see in UCM config but it won’t work (which I find annoying given that other service URLs work cleanly). There are ways around this. Basically:

    1. Set Messages to internal
    2. Delete or disable all directory service URLs (disable is better)
    3. Add all directory service URLs to a custom XML or server-side script application
    4. Set all phones to use "Both" as the provisioning option

    HTH.

    -Bill (http://ucguerrilla.com)

Leave a Reply