The Event ID 21034 explains as follows:
Its arguably one of the most comprehensive and helpful Cause and Resolution events you may ever see!
So looking into the text file (located at Lync File share...1-WebServices-1\ABFiles\00000000-0000-0000-0000-000000000000\00000000-0000-0000-0000-000000000000\ called Invalid_AD_Phone_Numbers.txt)
What do we see?
Edited for simplicity I have shown below just a sample of the culprits.
Unmatched number: User: 'sip:firstname.lastname@example.org' AD Attribute: 'telephoneNumber' Number: '095504321'
Unmatched number: User: 'fb56a490-0e27-4cac-b6cc-fb17ae0d4dba' AD Attribute: 'telephoneNumber' Number: '1234'
Its VERY common to see entries with the strange SID looking user name, these are usually disabled accounts and can be hard to find the true user attribute. I usually do an advanced search and use the number attribute provided to find these. By the way, they do no harm just sitting there, its the valid accounts I concern myself with.
The number assigned to Peter Pan above is valid (but not an acceptable default format). To format this number to a recognised number for populate the Lync Address Book service a normalization rule set can be created.
All numbers that do not comply to the E.164 format by default will parse through the AD normalization rule set to be transformed to E.164 (or any format you allow in the regex)
Do make sure that Lync ABS is configured to use this normalization rule set with the Lync Server Management Shell command:-
## Sample AD Normalization rule set for populating AddressBook Service
##Created by PaulB
##Normalise to E.164
##Local format from Active Directory into E.164##Auckland (New Zealand) National Prefix (9) & Country Code added as +649 (and 6 or more digits)
##National format from Active Directory into E.164
##New Zealand Country Code added as +64 and dropped 0 (and 6 or more digits)
##No DID, extension number only
## Assuming 4 digit extension and passing through to ABS transparently
Once the rules are added you can test by using ABServer.exe
ABServer.exe -testPhoneNorm "095501234"