Limit Media Ports in Office Communications Server 2007 R2 Devices
Microsoft Office Communications Server 2007 and Microsoft Office Communications Server 2007 R2 will reach end of support on January 9, 2018. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.
Administration of Office Communications Server 2007 R2 often involves configuration of clients, such as enabling voice and conferencing features and sending additional settings to clients. Frequently, the ability to limit media ports used by Communications Server 2007 R2 clients is required. Read on to find out more about how to perform this task.
Author: Tonino Filipovic
Publication date: July 2010
Product version: Office Communications Server 2007 R2
Administration of Office Communications Server 2007 R2, apart from server administration, often involves configuration of clients, such as enabling voice and conferencing features, sending additional settings to clients, and setting limits where needed.
These tasks can be achieved in multiple ways, including the following:
Group policy
In-band provisioning
Registry editing
Client UI (such as the Options button in Office Communicator)
Administrators are frequently required to limit media ports that are used by Communications Server 2007 R2 clients. This particular task is straightforward to perform for Office Communicator 2007 R2 clients through group policy. For details, see Media Port Range Registry Keys.
However, Office Communicator 2007 R2 Phone Edition is not configurable through group policy and to achieve the same result with Communicator Phone Edition, you have to edit relevant server-side pool settings so devices can receive this information through in-band provisioning in the SIP channel.
Procedure
This section explains how to edit relevant server-side pool settings so that devices receive port information.
Check current settings that Communicator Phone Edition obtains through in-band provisioning. One way to do this is to download the phone log from the device. However, a simpler solution is to turn on logging on the SIP stack component by using the Office Communications Server 2007 R2 Logging Tool from the Office Communications Server Administration snap-in as shown in Figure 1. For details, see Using Office Communications Server 2007 R2 Logging Tool.
Figure 1. Starting the Logging Tool
Select the SIPStack component, and then, in the Flags section, select All Flags.
Click Start Logging.
Start the device.
After the user logs on to the device, click Stop Logging in the Logging Tool.
Note
To view and analyze protocol messages, you must install the Microsoft Office Communications Server 2007 R2 Resource Kit Tools. The Resource Kit includes the Snooper tool, which provides this functionality. The Resource Kit also includes documentation for using the tool.
Filter the captured file for the ucPortRangeEnabled keyword and the IP address of your device to get the relevant packet: 200 OK response to the client’s SUBSCRIBE request as shown in Figure 2.
Figure 2. Snooper results
Figure 2 shows that ucPortRangeEnabled is set to False, which means that the media port range is not limited for devices at all (note also the default ucMinMediaPort and ucMaxMediaPort settings because these are the settings you are going to change).
Because these settings are pool-level settings (contained in the MSFT_SIPClientPortSettings WMI class), you first need to export pool-level configuration to be able to change settings as needed.
Before either exporting or importing configuration settings, stop the Office Communications Server 2007 R2 services.
Note
It is highly recommended that you back up your Communications Server environment before you make any configuration changes. In addition, the Office Communications Server 2007 R2 services should be stopped before doing an export of pool settings. Therefore, it is also recommended that such actions be conducted during maintenance hours.
To export pool configuration, use the LCSCmd command with the export option:
LCSCmd /config /action:export /configfile:<filename>.xml /level:pool
Figure 3. LCSCmd command
Open the XML file by using your favorite editor, and then search for the MSFT_SIPClientPortSettings section.
Change the PortRangeEnabled setting to True.
Set the MinMediaPort and MaxMediaPort settings to the port range that you want to use (this example uses 5350 through 5389) as shown in Figure 4.
Figure 4. Port settings
Note
Make sure to dedicate a range of at least 40 ports for media to accommodate for call transfer and all conference escalation scenarios. For details, see Media Port Range for Office Communications Server 2007 R2.
Save the XML file.
Import the settings back to the pool by using the following command:
LCSCmd /config /action:import /configfile:<filename>.xml /level:pool
Start the Office Communications Server 2007 R2 services.
Restart the device.
Use the Logging Tool to ensure that the new configuration is applied to the devices as shown in Figure 5.
Figure 5. Snooper results after ports are limited
At this point your device should have the correct settings (ucPortRangeEnabled = True, MinMediaPorts and MaxMediaPorts show correct values).
Note
Apart from Office Communicator Phone Edition devices, these settings also affect your Office Communicator clients. However, if you used group policy to limit media ports for Communicator clients, group policy settings take precedence over settings received through in-band provisioning. For details about order of precedence, see Communicator 2007 R2 Group Policy.
Summary
This article describes how to limit media ports used by your Office Communicator clients as well as your Office Communicator Phone Edition devices.
Because devices cannot be controlled by group policy, you need to configure relevant pool-level settings that will be sent to devices by means of in-band provisioning over SIP.
Additional Resources
To learn more, check out the following articles:
Communications Server Resources
Visit the Communications Server main page at https://go.microsoft.com/fwlink/?LinkId=132607.
View the complete Communications Server documentation library at https://go.microsoft.com/fwlink/?LinkId=132106.
Download the Communications Server content as Word documents at https://go.microsoft.com/fwlink/?LinkId=133609.
Download the Communications Server documentation as a compiled Help file at https://go.microsoft.com/fwlink/?LinkId=160355. (Scroll down to the Additional Information section and download OCSDocumentation.chm.)
Read weekly articles for Communications Server IT professionals on NextHop at https://go.microsoft.com/fwlink/?LinkId=181907.
Read NextHop articles in the Technical Library at https://go.microsoft.com/fwlink/?LinkId=185344.
Subscribe to NextHop feeds on the OPML List for NextHop page at https://go.microsoft.com/fwlink/?LinkId=185345.
Read weekly articles for Communications Server developers on UCode at https://go.microsoft.com/fwlink/?LinkId=177892.
Follow tweets from the Communications Server team at https://go.microsoft.com/fwlink/?LinkId=167909.
We Want to Hear from You
To give us feedback about this article or to propose a topic for an article, e-mail us at NextHop@microsoft.com.
You can also send us a tweet at https://www.twitter.com/DrRez.