Tag Archives: lync

Configure call forwarding on unassigned number ranges in Lync

One of the new features introduced in Lync Server 2010 and kept in 2013 is the ability to assign a block of numbers to Lync and have Lync handle a call made to an unassigned number a specific way rather than just have a fast-busy signal.

While it is easy to configure a call to be handled by a simple announcement (a sound file saying you have reached a number that has not been assigned to an individual at your corporation or a text-to-speech version translated by Lync), there is really no easy way to configure the call to be routed a specific way via the CSCP (Lync GUI control panel).  In this tutorial, we will cover some of the powershell commands to create an announcement to forward the call to an operator or response group and then assign the announcement to an unassigned number range.

  1. Open up the Lync Server Management Shell as an administrator on one of your Front End servers
    Lync Server Management Shell - Run as administrator
    Lync Server Management Shell - Running as Administrator
  2. Execute the following powershell command to configure how the call should be handled
    1. To route to a response group or user
      New-CsAnnouncement -Identity ApplicationServer:lyncpool.mydomain.com -Name "Forward Announcement" -TextToSpeechPrompt "Thank you for calling my company, please wait while we redirect your call." -Language "en-US" -TargetUri sip:[email protected]
    2. To route to a specific phone number (make sure you specify ;user=phone)
      New-CsAnnouncement -Identity ApplicationServer:lyncpool.mydomain.com -Name "Forward Announcement" -TextToSpeechPrompt "Thank you for calling my company, please wait while we redirect your call." -Language "en-US" -TargetUri "sip:+[email protected];user=phone"
    3. Alternatively, you can use your own recording in a .wav format rather than use the robotic Lync voice by specifying using either of the following commands:
      New-CsAnnouncement -Identity ApplicationServer:lyncpool.mydomain.com -Name "Forward Announcement" -AudioFilePrompt "WelcomeMessage.wav" -TargetUri sip:[email protected]
      New-CsAnnouncement -Identity ApplicationServer:lyncpool.mydomain.com -Name "Forward Announcement" -AudioFilePrompt "WelcomeMessage.wav" -TargetUri "sip:+[email protected];user=phone"
      New-CsAnnouncement -TextToSpeech - forward to user
  3. Execute the following powershell command to create the unassigned number range and assign our announcement/forward to the unassigned number range
    1. New-CsUnassignedNumber -Identity "Unassigned Number Range" -NumberRangeStart "+15555555000" -NumberRangeEnd "+15555559000" -AnnouncementName "Forward Announcement" -AnnouncementService ApplicationServer:lyncpool.mydomain.com
      New-CsUnassignedNumber Range - Forward Annoucnement
  4. At this point, once you call a number that has not been assigned to a response group, user, dial-in access number, etc in the 15555555000-9000 range, you should receive your message and in my particiular case, the call should be forwarded to a particular user.  Hope this helps!

Notes: Official technet article on how the New-CsAnnouncement command can be found here: http://technet.microsoft.com/en-us/library/gg398522.aspx

Lync call - error ID 52063 (source ID 242)

Symptom: You receive the following error when trying to place a Lync call to someone.

Call was not completed or has ended.

When contacting your support team, reference error ID 52063 (source ID 242).

Troubleshooting information is available online, including best practices for using Lync.

Lync error ID 52063 source ID 242

Solution: This turned out to be an issue where the call was unable to be completed due to the following issues.

  1. The Lync client was unresponsive/could not answer an audio call
  2. The Lync user was not configured for the call to be transferred to voicemail

Please make sure that the Lync client can successfully answer calls or that the user has voicemail configured in the event the Lync client cannot answer a call.

Export a list of numbers used in Lync Server 2013

Today I was curious how many numbers we have used up on our DID block and wanted to pull a report specifying which numbers were allocated to which user, conference room, etc.  After a quick Google search, I came accross a powershell script by Lasse Nordvik Wedø.  Attached below is a copy of his powershell script with a few modifications by me to pull a couple of extra attributes about the user from Active Directory.  Please make sure to drop him a comment on his blog, located here: http://tech.rundtomrundt.com/2012/04/listing-all-deployed-numbers-in-lync.html

The following list of numbers will be generated to a .htm web report:

  • Users enabled in Lync without a number assigned
  • Users with a number assigned to them
  • Users with a private line
  • Analog devices
  • Common Area Phone Numbers
  • Response Group Numbers
  • Meeting (dialin) numbers
  • Meeting Room Objects
  • Exchange Objects
  • Application endpoints with a LineURI

The script can be downloaded here (make sure to remove the .txt extension once you have downloaded it): Assigned_numbers.ps1

Here is an image of executing the powershell script:
Assigned Numbers

Here is an image of the result (webpage):
Assigned Numbers Webpage

Here is an image of what the htm file looks like when you open it up:
Assigned Numbers Results

Additionally, if you are looking for a complete resource of different attributes you can pull from the Get-ADUser command, see the following technet article: http://social.technet.microsoft.com/wiki/contents/articles/12037.active-directory-get-aduser-default-and-extended-properties.aspx

Lync Persistent Chat Error - User is not sip-enabled

Symptom: When you try to create a new chatroom from the Lync 2010/2013 client, you are redirected to a webpage that shows the following error:

User is not sip-enabled.

User is not sip-enabled


Solution: Turns out this is an issue with cross-compatibility between Single-sign on and 3rd party browsers.  Make sure you are using Internet Explorer and you should be able to login and manage your persistent chatroooms.

Lync - Manually set a Lync user's PIN via powershell

If you would like to manually assign a PIN number to a user in Lync, please follow the steps below:

  1. Login to your Lync Front End Server
  2. Open up the Lync Server Management Shell
  3. Execute the following command
    1. Set-CsClientPin -Identity "DOMAIN\user" -Pin 123456

The technet article defining all the parameters of this command can be found here: http://technet.microsoft.com/en-us/library/gg398929.aspx

Lync 2013 - DNS Settings

If you are setting up Lync Server for the first time or have been running Lync Server, you will notice that Lync depends heavily on DNS records.  In many cases, a Lync deployment cannot be setup correctly without using a split-dns setup and using a masked UPN; which can make things even more tricky.  Here is a complete listing of DNS records I used to deploy Lync 2013.  I have verifed federation works properly, IMs, conferencing, dial-in meetings, mobile and desktop client sign-in, and desk phones.  Note, records indicated in Red are records that are required/standard in every lync deployment.

Internal DNS Records

Record Type Value Points to
A lyncdiscoverinternal.mydomain.com Lync front end server
A lyncdiscover.mydomain.com Lync reverse proxy
(needed for mobile devices to work interally)
A lync.mydomain.com Lync front end server
A sip.mydomain.com Lync front end server
(multiple A records if enterprise pool)
A dialin.mydomain.com Lync front end server
A meet.mydomain.com Lync front end server
SRV _ntp._udp.mydomain.com Domain Controller/Time Server
SRV _sip._tls.mydomain.com sip.mydomain.com
SRV _xmpp-server._tcp.mydomain.com sip.mydomain.com
SRV _sipinternaltls.mydomain.com sip.mydomain.com
SRV _sipfederationtls.mydomain.com sip.mydomain.com

**Note, you should have A records for all of the hosts in your Lync deployment (front end servers, pools, proxies, etc.).  Those are not covered in the list as they are 100% user defined when deploying Lync.

External DNS Records

Record Type Value Points to
A webconf.mydomain.com Edge server IP as specified in setup wizard
A av.mydomain.com Edge server IP as specified in setup wizard
A sip.mydomain.com Edge server IP as specified in setup wizard
A meet.mydomain.com Lync Reverse Proxy IP
A dialin.mydomain.com Lync Reverse Proxy  IP
A lync.mydomain.com Lync Reverse Proxy IP
A lyncdiscover.mydomain.com Lync Reverse Proxy IP
SRV _sip._tls.mydomain.com sip.mydomain.com
SRV _sipfederationtls._tcp.mydomain.com sip.mydomain.com
SRV _xmpp-server._tcp.mydomain.com sip.mydomain.com


Polycom Lync Phone - An account matching this phone number cannot be found


When you try to sign in to a Polycom Lync Enabled phone (CX600, CX3000, etc.), you receive the following error:

An account matching this phone number cannot be found. Please contact your support team.


I found out that this appeared to be caused from a change made to the Lync front-end server.  There are two things that need to happen.

  1. Make sure the ports for 80 and 443 have been opened on the server's firewall.
  2. Try running the following command in the Lync Management Shell on the front-end server.
    1. Test-CsPhoneBootstrap -PhoneOrExt 15555551234 -PIN 5678 -verbose
    2. The verbose command should output all information needed to figure out where things are going wrong.  In my case, I had an issue with the phone being able to pull-down a certificate (The verbose command revealed the following: "Could not download certificate chain from web service.").  After restarting IIS, I was able to authenticate via the phone to Lync.
    3. Just as an FYI, once you see Result: Success, you will be able to login to the phone.  Prior to seeing that, I was seeing a Result: Failed when the phone could not connect.

Attempts to route to servers in an Exchange UM Dialplan failed - Lync 2010-2013

Symptom: When trying to check your voicemail from Lync, you notice that you call gets dropped/disconnected.  Inside of the front end server, you notice the following error log:

Attempts to route to servers in an Exchange UM Dialplan failed

No server in the dialplan [Hosted__exap.um.outlook.com__mydomain.onmicrosoft.com] accepted the call with id [c347a4ecc6e74651a2bdce6c43552e53].

Cause: Dialplan is not configured properly.


Check the configuration of the dialplan on Exchange UM Servers.

ExUM Error

Solution: Unfortunately, this seems to be caused by a couple of different things, so I would give all of the following below a shot.

First, make sure you have created a Unified Messaging plan in your Office 365 Exchange Control Panel:

  1. Login to https://portal.microsoftonline.com/
  2. Click the Manage link next to Exchange on the dashboard
    1. Exchange Manage
  3. Click the Phone & Voice tab
    1. Phone & Voice
  4. Ensure you have a UM Dial Plan with the number you used in the New-CsExUmContact powershell command you ran earlier.  Your settings might differ on the screenshot below, but just make sure you have SIP URI selected.
    1. New UM Dial Plan
  5. Select your policy from the UM Dial Plans list and click the Configure UM Dial Plan button as shown below:
    1. UM Dial Plan Configuration
  6. Make sure you configure the number you want your users to dial to access their voicemail in the E.164 routing numbers for your SIP server and Numbers for users to access voice mail boxes.
    1. Configure Voicemail Plan


If your running Lync 2010/2013 at the same time, check out this option in topology builder to make sure you have enabled federation:

  1. Open up the Lync Server Topology Builder
  2. Download the latest topology
  3. Right click on the first site (the node under Lync Server) and then click Edit Properties...
  4. Scroll down to Site federation route assignment and make sure Apply federation route assignments to all sites is checked.
  5. Make sure Enable sip federation is checked as well and then click OK
  6. Click on Action->Topology->Publish...

If the above doesn't work, try running the following powershell commands on your front-end server.

  1. Modify the global hostedvoicemailpolicy (make sure to use your onmicrosoft domain name, not your FQDN you would use normally):
    1. Set-CsHostedVoicemailPolicy -global -Destination exap.um.outlook.com -Organization domain.onmicrosoft.com
  2. Create Lync contact for Hosted UM (make sure to set the number as the same one in the Office 365 Unified Messaging area. The last value below can be changed to put the UM contact that will be generated in AD, in any OU of your choosing; I just picked the default users one for simplicity.
    1. New-CsExUmContact -DisplayNumber +15555555555 -SipAddress sip:[email protected] -RegistrarPool FQDNTOPOOL -OU "CN=Users,DC=domain,DC=com"
  3. Associate your newly created Lync contact with your Hosted Voicemail Policy:
    1. Grant-CsHostedVoicemailPolicy -identity "sip:[email protected]" -policyname global

Lastly, if things still aren't working, make sure you have enabled federation with Office 365's exchange server for Unified Messaging by executing the following command:

  1. New-CsHostingProvider -Identity "Exchange Online" -Enabled $True -EnabledSharedAddressSpace $True -HostsOCSUsers $False -ProxyFQDN "exap.um.outlook.com" -IsLocal $False -VerificationLevel UseSourceVerification

Lync 2010 - Enable Users for Hosted Voice Mail

Here is how to do it!  Note, this is copied right from Microsoft's website for archival purposes.  Here is a link to the technet article: http://technet.microsoft.com/en-us/library/gg413062.aspx
  1. Start the Lync Server Management Shell: Click Start, click All Programs, click Microsoft Lync Server 2010, and then click Lync Server Management Shell.
  2. Run the Set-CsUser cmdlet to configure the user account for hosted voice mail. For example, run:
    Set-CsUser -HostedVoiceMail $True -Identity "contoso\kenmyer"

    The preceding example sets the following parameters:

    • HostedVoiceMail enables a user’s voice mail calls to be routed to hosted Exchange UM. It also signals Microsoft Lync 2010 to light up the “call voice mail” indicator.
    • Identity specifies the user account to be modified. The Identity value can be specified using any of the following formats:
      • The user's SIP address
      • The user's Active Directory User-Principal-Name
      • The user's domain\logon name (for example, contoso\kenmyer)
      • The user's Active Directory Domain Services Display-Name (for example, Ken Myer). If using the Display-Name as the Identity value, you can use the asterisk (*) wildcard character. For example, the Identity "* Smith" returns all the users who have a Display-Name that ends with the string value "Smith".

Enabling HD video in Lync 2010

This was copied from Vince Quinto's website. All credit goes to him for this article, be sure to check out his blog: http://ucbyvince.blogspot.com/2011/04/enabling-hd-video-for-lync-2010.html

To enable HD video for Lync 2010, you have to allow the maximum resolution to support HD 720p video. Here’s how…

  1. In your Lync Front End Server, Click Start
  2. Click All Programs
  3. Click Microsoft Lync Server 2010
  4. Click Lync Server Management Shell
  5. Run the following commands by typing or copy/paste in Lync Server Management Shell
    1. Set-CsMediaConfiguration -Identity:Global -MaxVideoRateAllowed HD720p15m
  6. Restart the Lync Front End service from services.msc.

This command extends the client policy to support HD. Once Lync Front End service has restarted, plug your webcam that is 720p capable, and your video calls can now utilize HD quality videos.

Take note that HD only works in peer-to-peer. For conferencing, the maximum is still VGA.

There is one catch though which makes it harder for most to achieve HD with their Lync 2010 clients... The hardware requirement for your client computers to support HD video should be at least Quad Core 2.0 GHz or higher. Refer to this link for full client hardware requirement, http://technet.microsoft.com/en-us/library/gg425720.aspx.
Oh well... VGA is not that bad really... 😛