Saturday, May 14, 2011

Enterprise Voice – Lync 2010 (one of many to come)

Now that I have my simple lab deployment wrapped up, including SIP Trunk from Broadvox connected via Mediant 800 MSBG (the new Audiocodes series gateways with SBC), it is time to make the best of the fact I have a single DID but several users EV enabled. My MP-124 is connected to the home POTS.

My goal is:
  1. I want my users to dial each other with 4 digit extension only.
  2. All users to receive inbound and make outbound calls to PSTN.
  3. I want to present the “Company number” as Caller ID to the dialed party
The 4 digit extension task could be handled at least two different ways. It depends of what we have to work with:
  1. Have I had DID for each user; I would assign individual number to each one. Because they (DID’s) typically come in blocks, for example, from NPANXX5000 to NPANXX5099 ,I would have a normalization rule for “If the number is exactly 4 digit long, prepend +1NPANXX”. The final result will be +1NPANXXdddd i.e. E.164 and the call will be routed to the user with this LineURI.
  2. The second scenario is what I will attempt to achieve here. My users will have LineURI in format +1NPANXXdddd;ext=dddd and the normalization rile will be ““If the number is exactly 4 digit long, prepend +1NPANXXddd;ext=”.
I just created three users; all in Organizational Unit named “UserAccounts”,

…and will enable them for Lync at once by executing: “Get-CsAdUser -OU "ou=UserAccounts,dc=lynclog,dc=com" | Enable-CsUser -RegistrarPool "" -SipAddressType SamAccountName  -SipDomain” in Lync Management Shell.

***Note that here I am using “Get-CsAdUser” cmdlet because the tree users are not Lync enabled yet.

Next, I will enable all three for Enterprise Voice at once: “Get-CsUser -OU "ou=UserAccounts,dc=lynclog,dc=com" | Set-CsUser -EnterpriseVoiceEnabled $True”

Now my three users are EV enabled

…but the LineURI parameter is not yet set, which mean the user CAN make an outbound calls, but CANNOT receive calls from PSTN.

I will set LineURI for my two of the users via Powershell: Set-CsUser -Identity "LYNCLOG\tu1" -LineURI “TEL:+14785554000;ext=5001” and Set-CsUser -Identity "LYNCLOG\tu2" -LineURI TEL:+14785554000;ext=5002”

…and the third via Control Panel.

There is something else I must do – populate the Telephone Number field in Active Directory user’s account. This is because the Address Book will use this field to present the phone number to other users in the company and (possibly) federated partners.

Lync does not utilize ABServer.exe as OCS did. However, I can still use it to check how (if at all) the number would be normalized. First, let’s dump the generic rules and see what is in it.

All right, the built-in rules are sufficient to normalize my format “+14785554000 X5001”. In any case, I want to make sure and so, I will force the Address Boor regeneration by executing Update-CsAddressBook –Force form Lync Management Shell and then use ABServer.exe tool to dump the content of the latest AB in text file where I can double check. In command prompt, I will navigate to “C:\Program Files\Microsoft Lync Server 2010\Server\Core” and execute ABServer -dumpFile C:\mcs\1-WebServices-1\ABFiles\00000000-0000-0000-0000-000000000000\00000000-0000-0000-0000-000000000000\F-0ec9.lsabs c:\out.txt

***Note that I am using the most resent AB file located in “C:\mcs\1-WebServices-1\ABFiles\00000000-0000-0000-0000-000000000000\00000000-0000-0000-0000-000000000000\” where mcs is my Lync share, and the output is text file on my C:\

Now I can see what was generated while ago.

Yup, the new users were added promptly. Let see them in Lync client.

Some might find this format little odd, but think about it – people from my company would know X5001 means Extension 5001, while Federated contacts would treat it as “PSTN number +1 (478) 555-4000, extension 5002”

***Now we are getting in the very complicated situation. Despite my extensive research, I cannot find any documentation about the fact we CANNOT use Pilot numbers (Subscriber Access and/or Auto Attendant) which are same as our “base” (as I call it) number. Shall we do that, an “Ambiguous number detected” error will be generated and the call will fail. We can overcome it these three ways:
  1. If we use POTS and FXO gateway, set forwarding rule on PSTN side, where call to the base number to be intercepted and forwarded to the AA number. This way PSTN caller will dial the base number shown, but the call will arrive on AA’s number directly.
  2. If we use POTS and FXO gateway, set incoming calls to the base number to be send to the AA number when leave gateway and hit Lync Mediation.
  3. If you use SIP Trunk, you could ask your provider to do the forwarding on their side
Frankly, if you plan to use one POTS line or SIP Trunk with one DID only in production, Lync is not for you (smile). If you are so cheap, how would you pay for the licenses to begin with?!?
I will now stop here and take my time to think how to proceed further with my setup.