Integrate your CUCM with Active Directory.
Verify that the AD users are retrieved with their extensions.
Navigate to Enterprise Parameters, in the Phone URL Parameters. Copy the URL Directories. Delete the Directory URL in Enterprise Parameters.
Edit the Phone configuration page allowed to consult the directory, in the External Data Locations Information, under the Directory field, past the previous URLs.
Now the corporate directory of the phone is displayed with the End Users and their extensions.