Home | SFB, Skype for Business, Skype for business server 2015 | Skype for Business Server 2015 – Incorrect phone number displayed in contact card

Skype for Business Server 2015 – Incorrect phone number displayed in contact card

Recently, I deployed a full Skype for Business Server 2015 solution with Enterprise Voice for a customer. They already had IM & Presence on a Lync 2013 Front-End server and the plan was to migrate all users and settings to the new SfB FE, and decommission the Lync 2013 FE.

Problem

Everything went smoothly until the customer noted that the phone numbers showing in their SfB and Lync clients weren’t correct. Users would click on these “incorrect” numbers to dial a colleague and it would fail:

1

The interesting thing was that the incorrect numbers were an exact copy of the correct number, but with a “+” in front. For some users, both numbers were showing in the contact card.

Correct number: 07 4089 2387

Incorrect number: +07 4089 2387

2

Troubleshooting

My first thought was that I had messed up the normalization rules. With the help of Ken Lasko’s blog, I tweaked my rules and ended up with this:

3

I then did the usual steps of refreshing the Global Skype address book.

On the Front-End server:

  • Delete all files in C:\[skypefilestore]\1-WebServices-3\ABFiles\00000000-0000-0000-0000-000000000000\00000000-0000-0000-0000-000000000000\
  • > Update-CsUserDatabase
  • > Update-CsAddressBook

Then on my test PC, refresh the GAL:

  • Delete the test account Profile folder in C:\Users\jason\AppData\Local\Microsoft\Office\16.0\Lync\[email protected]
  • Start-up SfB client to download the new Address book

This made no difference at all. In fact, opening the GalContacts.db file with Notepad showed the correct number. So where was the +07 coming from?

With the help of a colleague, we looked through the Exchange GAL and local Outlook address book, but found nothing.

I then looked in the SfB client log file called “Lync-UccApi-0.UccApilog” using Snooper. This log file can be found on your PC at C:\Users\username\AppData\Local\Microsoft\Office\16.0\Lync\Tracing\

In this file I searched for my incorrect number “+0740892387” and found it buried in a 200 OK response from the Front-End server. The number was then stored in the CoreContact.cache file on my client, but not in the GalContacts.db. This means that every time I searched for this user in my SfB client, it would send a SUBSCRIBE message to the FE, and I would get back a 200 OK containing this incorrect number. So clearly this number was stored someone in the FE server.

4

I opened a case with Microsoft support to help us with this issue. The MS tech ran the DBAnalyze.exe tool from the SfB Reskit.

C:\Program Files\Skype for Business Server 2015\ResKit\DBAnalyze.exe /report:user /user:[email protected] /sqlserver:SFBFE01\RTCLocal  > c:\temp\SQLExports\sqlexportusername.txt

The tool grabs all data from a particular user from the Skype Database and spits it out in plain text.

In the output we could see the incorrect number showing. We could also see the “LastPubTime” was in 2015. This information told me that the incorrect number came from the old Lync 2013 server during the user migration.

5

Below is a script I used to check all 300+ users in SfB using the DBAnalyze.exe tool.

## Script Begin ##

<span style="color: #ff9900;">$users</span> <span style="color: #0000ff;">= Get-CsUser</span>
foreach ($user in $users) {
$Displayname = $user.displayname
$SamName = $user.SamAccountName
<span style="color: #0000ff;">echo</span> <span style="color: #993300;">"Name :</span><span style="color: #ff9900;"> $Displayname</span><span style="color: #993300;">"</span>
& 'c:\Program Files\Skype for Business Server 2015\ResKit\DBAnalyze.exe' /report:user /user:$SamName@domain.com /sqlserver:SFBFE01\RTCLocal  > c:\temp\SQLExports\sqlexport$SamName.txt
}

## Script End ##

Finally, run the below PowerShell command to search through all the output files for the string “+074089”, and write the filenames to another TXT file called “UsersWithWrongNumbers.txt.

PS C:\temp\SQLExports> Get-ChildItem -recurse | Select-String -pattern "\+074089" | group path | select name *> C:\temp\SQLExports\UsersWithWrongNumbers.txt

Now you have a list of all user accounts having this issue. For us it was about 30 users of the 300.

Solution

I spent another few hours looking (carefully) through the RTCLOCAL instance databases on the Skype FE server using SQL Management Studio. I used some scripts to search through the tables but I could not find any references to “+0740892387”. This number is probably stored in binary format and not plain text.

The Microsoft tech was working on a solution to modify the database directly and remove these incorrect numbers.

While waiting, I had the “bright” idea to simply remove and re-add this user account from SfB.

6

This ended up fixing the problem for this user. By removing the account from SfB, it cleared out all contact card information for this account. Re-adding the user brought with it only the correct numbers.

7

I decided to do the same for all the accounts having this issue. This is much safer than manually modifying the database. If you need to backup/restore the user’s contact list or settings, make sure you run “Export-CsUserData” for each user you intend to remove/re-add.

 

References:

Thanks to Hans Sleurink for his article on the Lync Address Book:

http://www.fots.nl/lync-address-book-sync-process-information/

Thanks to Ken Lasko for his article on Phone Number Normalization in SfB:

http://ucken.blogspot.com.au/2015/05/skype4b-address-book-normalization.html

Thanks to Microsoft Support for pointing me in the right direction.

About the Author: Jason Jacobs

Picture of Jason Jacobs

Systems Engineer

Insync

Isn’t it nice when things just work?

What does your organisation need to “just work”?

PLATFORMS

UNIFIED COMMUNICATIONS

IDENTITY

AUTOMATION
 

Still not sure what you need?

No problem! We can help.

CONTACT US