Thursday, August 9, 2012

Enabling users for Lync Enterprise Voice

I am now piloting Lync Enterprise Voice for my company, and we will be enabling many users moving forward. I have written the following script to:
  1. Move users to a "Branch" Pool
  2. Enable them for Voice
  3. Grant a voice policy
The script is meant to be run, eventually, by local IT at the branch location. It takes input from a .csv file structured like:

tel:+11112345678;ext=5678,Jon Smith,jsmith
tel:+11112347485;ext=7485,Nasir Patel,npatel
tel:+11112347518;ext=7518,Tom Jones,tjones

You can tailor the LineURI as appropriate for your organization.

The script, when launched, asks for the target pool, the file with the information and the voice policy to be granted:

That's all you need to do. Well, that and then enable them in whatever voicemail solution you are employing...

The code is as follows. I will make it more elegant as time allows.

  Queries admin for Pool, Input File and Voice Policy for the users. Then
  reads info in Input file, moves users to appropriate pool, enables Enterprise
  Voice for them, and grants the entered Voice Policy.

    Version           : 1

      Lync Version  : 2010 through CU6
    Author(s)      : Sean William McNamara (
    Dedicated Post  :
    Disclaimer     : Test thoroughly and use at your own risk. If you don't test it, and you break stuff, it isn't MY fault.

#initialize variables
$poolfqdn = read-host "Enter new pool FQDN to move users to "
$InputFileName = read-host "Enter filename for user data "
$VoicePolicy = read-host "Enter Voice Policy Name "

#read data for Accounts
$AccountData = Import-Csv $InputFileName

#move users to correct registrar pool
foreach ($item in $AccountData)
{ write-host -fore yellow "Moving" $item.NAME "... "
  move-csuser -identity $item.ADUSERNAME -target $poolfqdn -confirm:$false

write-host -fore green "Move completed"
#enable EV and set URI

foreach ($item in $AccountData)
{ write-host -fore yellow "Enabling Voice for " $item.NAME "... "
  Set-CsUser -Identity $item.adusername -EnterpriseVoiceEnabled $true -LineURI $item.LineURI

write-host -fore green "Enterprise Voice Enabled"

#grant Voice Policy
foreach ($item in $AccountData)
{ write-host -fore yellow "Granting Voice Policy "$VoicePolicy" to " $item.NAME " ... "
  Grant-CsVoicePolicy -Identity $item.adusername -PolicyName $VoicePolicy

write-host -fore green "Voice Policies Granted"

Tuesday, July 17, 2012

View Lync Client Configuration

You can easily view the configuration information of the Lync 2010 client by following these simple steps.
  • Hold the Control key down while right-clicking the green Lync client icon in the notification area.

  • This will enable the Configuration Information menu option. Click it and you will see a pop-up window that displays all the Lync 2010 configuration information for the client.

Trouble Transferring and Answering Calls from Lync Attendant Console

At one of my sites where Lync has been deployed as a replacement for a PBX I ran into an issue with the receptionist being able to answer and or transfer calls from the PSTN. Calls would come in, and about 30% would be problematic. Some, she couldn't answer at all, others, would either drop when she tried to transfer them, or would connect only after 45-60 seconds of silence, by which time, the caller would assume the call had been dropped and hang up. As you can imagine, this was having a significant impact on our ability to do business.

I researched online, and didn't really find any reasonable explanations or solutions. So, I opened as case with Microsoft Premier Support, and as we were working through testing, pulling logs from the SBA, Front End Servers and the receptionist's Attendant Console, we determined that what was happening was that the SIP REFER method was failing. Information on what the SIP REFER method does can be found at: RFC 3515 - SIP Refer Method..

After some more research, I discovered that SIP REFER is enabled by default in Lync, and the Gateway we have deployed, the NET UX 2000, does not support SIP Refer. I found this article on NET's website that explains how to disable SIP REFER, and as a result, Media Bypass: Disable Refer Support (required for Transfer).

The Microsoft article on this is found here: Configure a Trunk Without Media Bypass. The MS article lacks a great deal of information, and barely mentions the SIP REFER option.