Dedicated Lync Server 2010 Mediation Server with two NIC’s

Background

Recently I implemented a dedicated Lync Mediation server with two NIC’s. In this case I had to use a dedicated Mediation server because the IP Trunk provider was direct SIP. The Mediation server came with one NIC in the server subnet and the other NIC in the telephony subnet.

The problem

After implementing the Lync Topology correct and validated ok, we had one way audio with PSTN calls or no audio at all. All the calls got connected though. I started deep diving into logs and network configuration. While searching the web I found some very good articles about this regarding OCS 2007 R2. I found that there is little or no change in how to configure the Lync Mediation server versus configuring the OCS Mediation server network vise.

The Symptoms

During troubleshooting I saw the following errors:

  • Event ID 25073
    • The Mediation Server service has received a call that does not support comfort noise from the Gateway peer
  • In the SDP packet on the gateway side we saw that RTP traffic was proposed to go over the server subnet IP and not the Gateway subnet IP
    • No audio could be established because of routing issues
  • RTP traffic from the gateway came from an other IP than the SIP IP
    • The Gateway had a media proxy with a different IP than the SIP IP

Reading material

I found these article good reading during the troubleshooting

OCS Mediation Server NIC Configuration: http://blogs.pointbridge.com/Blogs/schertz_jeff/Pages/Post.aspx?_ID=55
Forum discussion about two NIC’s in same subnet: http://social.microsoft.com/Forums/en/communicationsservertelephony/thread/6abb5010-5fd3-4940-8b91-0d2b0184a9fe
Communications Server Mediation Server: Dual NIC Issue: http://technet.microsoft.com/en-us/library/ff518437.aspx

The solution

Make sure the following is true

  • Default gateway is only configured on the NIC in the server subnet, under IPv4 IP configuration
    • Use no default gateway on the Voice Gateway NIC
  • Make sure that the Voice Gateway NIC is on top when running ipconfig
    • If its not, make it so

  • Add static persistent routes for both the SIP and RTP IP against the correct NIC id
    • route ADD 77.88.99.80 MASK 255.255.255.255 10.150.80.241 IF 13 -p
    • route ADD 77.88.99.83 MASK 255.255.255.255 10.150.80.241 IF 13 -p
  • I was also considering the Strong Host model, but that is when several NIC’s need to share a default gateway, don’t think it applies here

Conclusion

In this case it was the missing route to the RTP media proxy IP that was missing. The symptom of the calls being established but no audio is evidence of that SIP traffic is going through ok, but RTP traffic is not being routed correct. The wrong IP being suggested was also evidence towards routing issues. Adding the missing route solved the problem. The Event ID 25073 also disappeared when the routing issue was resolved.

Regarding dedicated Lync Mediation Servers they should have a single NIC when the Voice Gateway is in the same subnet as the Lync Server themselves. Two NIC’s should only be considered when they can be placed in totally different subnets.

Script to enable Global Voice Routing in Lync Server 2010

With Lync Server 2010 more and more deployments involve Enterprise Voice and Pstn access. When implementing in pilots and single site environments my customers tend to want everyone activated being able to dial to the Pstn network regardless of location or position.

With this in mind I have created a script to easily implement appropriate Nomralization Rules, Pstn Usage, Route with Gateway and Voice Policy without any typos. Since all this is intended for global use and the scope is global, all users get access to the Dial Plan and Route. All calls and numbers are routed through a single Gateway.

The script is run at your own risk, tips and feedback is most appreciated

View and download the script here: https://msunified.net/lyncdownloads/script-set-globalvoicerouting-ps1/

Intended Scenario

  • One CentralSite
  • One PstnGateway
  • All Enterprise Voice users will be able to call
  • All previous configuration will be removed

To have a clean as possible configuration some existing default configuration is removed

  • The “Prefix All” Normalization Rule on the Global Dial Plan
  • The Local Route under Routes is removed
  • All the default PstnUsage records are removed
  • Running the script several times does no harm, all error messages are suppressed

The Script creates the following

  • Four Norwegian Nomralization Rules under the Global Dial Plan
    • No need to Grant users with usage
    • Just change and adapt them to your own country/environment before running the script
  • Creates PstnUsage named Global
  • Edits the Global Voice Policy and adds PstnUsage Global
  • Finds the PstnGateway configured in the Topology Builder
    • Only one is added
  • Creates a new Route named GlobalRoute and adds Global as PstnUsage and the PstnGateway found earlier
  • Creates a VoiceTestConfiguration for one of the normalization rules
  • Runs the Test
  • Displays the result

Screenshot

Lync Server Front End: Lost connection to the Web Conferencing Edge Server

I have seen this problem in a couple of deployments now and have decided to share this information since there is not much about it on the web.

The problem

Event ID 41024 – Lost connection to all Web Conferencing Edge Services
Event ID 41024 – Lost connection to the Web Conferencing Edge Server
Event ID 41025 – Connection to the Web Conferencing Edge Server has been restored

These Event ID’s appears every five minutes on the Lync Front End Server, but not in all implementations. I don’t know why it is in only some implementations.

The Resolution

Disable IPv6 on the Front End server. When implementing Exchange 2007 and 2010 we often came across a similar problem where the resolution was to disable IPv6. Disabling IPv6 has cleared the Event ID errors in the cases I have seen. To disable IPv6 properly don’t just uncheck IPv6 on the network adapter, but do it in registry and reboot. See this KB article for how to disable IPv6 properly: http://support.microsoft.com/kb/929852

Screens of the exact Event ID’s

 

 

 

 

 

Script to find available telephone numbers in Lync Server 2010

Having worked on a couple of Enterprise Voice deployments since the launch of Lync Server 2010 I have been missing a feature that I honestly thought would be incorporated by launch. It is the ability to find unused available numbers in a given number range assigned to the Lync Server based on Unassigned Numbers. I even hoped it would be possible to assign a teluri to users through a drop down list in the Silverlight GUI since the information is available in the server. I hope this will be available in a later Service Pack or Cumulative Update.

Since this is a feature I really want, I have tried to create a PowerShell Script to find out how many numbers are available in any given number range and what they are. First of all I want to declare that I am a PowerShell novice so my syntax may not be that optimized. The script works, though there’s a lot of variables and loops that I am sure could be done better. The script does the following:

  • It goes through each entry in Unassigned Phone Numbers that needs to be populated with all numbers series available to the Lync Server
  • Then it gets all teluri’s for all the users, dial-in conferencing and Exchange UM contacts
    • I didn’t find the response group command to get the teluri while I was at it, will add this in an update
  • Then the string gets “washed” for “tel:+47” where 47 is the hardcoded region code for Norway
    • The string also get “washed” for any extension numbers
  • After that a new string gets created to get rid of property types and so on
  • I use Compare-Object to compare the Unassigned Number array with the used numbers
    • Run a check to find what numbers where not used and count them
  • Then I find out what the total number of unused numbers are and write the output

I hope this script will come useful to anyone who needs this feature and that others can use this to and adapt it to their needs. Please share any improvements that could be made to the script. Enjoy!

https://msunified.net/lyncdownloads/script-list-unusednumbers-ps1/

Error 0x80070020 when you try to run Setup Lync Server Components

Recently I had an error during the setup of Lync Server Components regarding Enabling of the  web site “Lync Server Internal Web Site”. A fast google search indicated it was something about IIS not being able to start the default website because of port 80 or 443 was being used by another program. To find out what software was using the ports I did the following, solution found in this KB article: http://support.microsoft.com/kb/973094

Run the following command from a command prompt to find the PID of the process which is using TCP port 80 and/or 443. 
               netstat -aon | find “:80” 
               netstat -aon | find “:443”
You will see an output similar to the following. Remember the actual PID will vary from case to case. 
               TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       3604 
               TCP    0.0.0.0:443           0.0.0.0:0              LISTENING       3320
Now using Task Manager you can easily find out to which process the above PID belongs and take appropriate action.

In my case I was using TeamViewer to remote in to the server during installation. Closing TeamViewer and getting the customer to run the installation solved the problem.

Here is the exact error message I got in the logs

 Error: The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)
▼ Details
└ Type: FileLoadException
└ ▼ Stack Trace
    └   at Microsoft.Web.Administration.Interop.IAppHostMethodInstance.Execute()
at Microsoft.Web.Administration.ConfigurationElement.ExecuteMethod(String methodName)
at Microsoft.Web.Administration.Site.Start()
at Microsoft.Rtc.Management.Deployment.Roles.WebServices.LocalActivate(IService service, Computer computer)
at Microsoft.Rtc.Management.Deployment.Core.Service.LocalActivate(Computer computer)
at Microsoft.Rtc.Management.Internal.Utilities.LogWriter.InvokeAndLog[T](Action`1 action, T arg) 
 └    Error: An error occurred: “System.IO.FileLoadException” “The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)”

Produced two webcasts with Microsoft about Lync

I sat down with Anders Borchsenius who is IT-Pro Community Manager at Microsoft Norway and talked about Microsoft Lync. We recorded two sessions. The first about whats new in Microsoft Lync. The other webcast is about how to get started with Lync and how to use my blog as a starting point. The webcasts are in Norwegian.

Installing Lync Server 2010 Prerequisites on Windows Server 2008 R2

When installing Lync Server 2010 some roles requires specific Windows Features to be installed. The features are about the same as for OCS 2007 R2.

NOTE: This article will be updated when more information and requirements become available and necessary. Last update 02.12.2010

Part One – Prerequisites required on all server roles

  • Open PowerShell as administrator and run the following commands
  • Import-Module ServerManager
  • Add-WindowsFeature NET-Framework-Core,Telnet-Client
  • Install the prerequisites for the specific role as described in Part Three
  • Run Windows Update untill everything is updated
  • Install the Lync Server 2010 binaries for the role you are installing
  • Do post installation tasks as described in Part Two

Part Two – What to install AFTER Lync Server 2010 is installed

I describe it here so it is more accessible rather than in the end of the post

Part Three – Commands to install prerequisites for Lync Server 2010 on Windows Server 2008 R2

Front End, Director and Group Chat Server Roles on Windows Server 2008 R2

NOTE: To be able to run schema, forest and domain prep from the Front End Server you need to have the Remote Server Administrative Tools [RSAT-ADDS] installed. It is only required on the first Front End server in you organization. For more information on preparing AD see: http://technet.microsoft.com/en-us/library/gg398607.aspx

  • Open PowerShell as administrator and run the following commands
  • Import-Module ServerManager
  • Add-WindowsFeature RSAT-ADDS,Web-Static-Content,Web-Default-Doc,Web-Http-Errors,Web-Asp-Net,Web-Net-Ext,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Http-Logging,Web-Log-Libraries,Web-Http-Tracing,Web-Windows-Auth,Web-Filtering,Web-Stat-Compression,Web-Mgmt-Console,Web-Scripting-Tools,Web-Client-Auth,Desktop-Experience

Installs the following components:

  • [RSAT-ADDS] – Remote Server Administrative Tools
  • [Web-Static-Content] – Static Content
  • [Web-Default-Doc] – Default Document
  • [Web-Http-Errors] – HTTP Errors
  • [Web-Asp-Net] – ASP.NET
  • [Web-Net-Ext] – .NET Extensibility
  • [Web-ISAPI-Ext] – Internet Server API (ISAPI) Extensions
  • [Web-ISAPI-Filter] – ISAPI Filters
  • [Web-Http-Logging] – HTTP Logging
  • [Web-Log-Libraries] – Logging Tools
  • [Web-Http-Tracing] – Tracing
  • [Web-Windows-Auth] – Windows Authentication
  • [Web-Filtering] – Request Filtering
  • [Web-Stat-Compression] – Static Content Compression
  • [Web-Mgmt-Console] – IIS Management Console
  • [Web-Scripting-Tools] – IIS Management Scripts and Tools
  • [Web-Client-Auth] – Client Certificate Mapping Authentication
  • Anonymous Authentication (This is installed by default when IIS is installed)
  • [Desktop-Experience] – Desktop Experience

NOTE: Installing on Server 2008 R2 SP1, you need to do this step manually. All Front End Servers and Standard Edition servers where conferencing will be deployed must have the Windows Media Format Runtime installed. The Windows Media Format Runtime is required to run the Windows Media Audio (.wma) files that the Call Park, Announcement, and Response Group applications play for announcements and music. Thats why Desktop Experience is installed. If you only want to install the correct runtime run the command below:

  • Run using Command Prompt as administrator
  • Requires reboot
  • %systemroot%\system32\dism.exe /online /add-package
    /packagepath:%windir%\servicing\Packages\Microsoft-Windows-Media-Format-Package~31bf3856ad364e35~amd64~~6.1.7601.17514.mum
    /ignorecheck

Mediation Server Role on Windows Server 2008 R2

  • No additional features required for mediation

EDGE Server Role on Windows Server 2008 R2

  • Need one aditional hotfix for Lync EDGE Server Role.
    • Note: This hotfix is included in SP1 for Server 2008 R2
    • Windows Server 2008 R2 update available from Microsoft Knowledge Base article 2028827, “The applications that use the TDI driver for network traffic may stop responding in Windows Server 2008 R2 or in Windows 7,” at http://go.microsoft.com/fwlink/?LinkId=205459

Monitoring and Archiving Server Roles on Windows Server 2008 R2

NOTE: If Monitoring og Archiving is deployed in the topology, all server roles must install the below features, including the Monitoring and Archiving Servers

  • Open PowerShell as administrator and run the following commands
  • Import-Module ServerManager
  • Add-WindowsFeature msmq-server,msmq-directory

Installs the following components:

  • [MSMQ-Server] – Message Queuing Server
  • [MSMQ-Directory] – Directory Service Integration

Software Automatically Installed by Lync Server Setup

When you install Lync Server 2010 on a server, some software that is required by Lync Server is installed automatically (that is, if the required software is not already installed on the server). This includes the following:

  • Microsoft Visual C++ 2008 Redistributable
  • Microsoft Visual J# version 2.0 Redistributable
  • URL Rewrite Module version 2.0 Redistributable
  • SQL Server 2008 Express SP1
  • SQL Server 2008 Native Client

References:
For more information see TechNet documentation: http://technet.microsoft.com/en-us/library/gg398686.aspx

Lync Server 2010 features and how to configure them

UPDATE: This blog post has moved to the TechNet Wiki for open editing: http://social.technet.microsoft.com/wiki/contents/articles/10119.wiki-lync-server-2010-features-and-how-to-configure-them.aspx

Now that Lync has gone RTM and Virtual Launch is done we need to get down to business and deploy Lync to the general masses. During the time of Beta, RC and early RTM a lot of great blog articles were published about features and how to configure them. I wanted to collect the posts I find interesting here so I have them all in one place when I deploy Lync Server to my customers. I will update this article with new posts as I find them or when they get published.

Last updated: 16.10.2011