次の方法で共有


Limit Media Ports in Office Communications Server 2007 R2 Devices

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.

  1. 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
    Ff806918.ea94de11-1196-41c5-ac3a-ffa95c3efc43(en-us,OCS.14).jpg
  2. Select the SIPStack component, and then, in the Flags section, select All Flags.
  3. Click Start Logging.
  4. Start the device.
  5. After the user logs on to the device, click Stop Logging in the Logging Tool.
Ff806918.note(en-us,OCS.14).gifNote:
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.
  1. 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
    Ff806918.bc9b797b-8ea5-48bd-bd3e-6249149f95a0(en-us,OCS.14).jpg

    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).

  2. 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.

  3. Before either exporting or importing configuration settings, stop the Office Communications Server 2007 R2 services.

Ff806918.note(en-us,OCS.14).gifNote:
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.
  1. 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
    Ff806918.7e9c7a44-efae-4abc-a96b-ad6683829d2a(en-us,OCS.14).jpg

  2. Open the XML file by using your favorite editor, and then search for the MSFT_SIPClientPortSettings section.

  3. Change the PortRangeEnabled setting to True.

  4. 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
    Ff806918.acfdcd4f-7ce2-485d-a89b-a1e0c26b8ad8(en-us,OCS.14).jpg

Ff806918.note(en-us,OCS.14).gifNote:
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.
  1. Save the XML file.

  2. Import the settings back to the pool by using the following command:
    LCSCmd /config /action:import /configfile:<filename>.xml /level:pool

  3. Start the Office Communications Server 2007 R2 services.

  4. Restart the device.

  5. 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
    Ff806918.54eb642c-0958-46f6-b185-fbdaebb59fd3(en-us,OCS.14).jpg

  6. At this point your device should have the correct settings (ucPortRangeEnabled = True, MinMediaPorts and MaxMediaPorts show correct values).

Ff806918.note(en-us,OCS.14).gifNote:
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

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 <www.twitter.com/DrRez>.