<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Rui Silva - UCspotting : Mediation Server</title><link>http://blogs.technet.com/ucspotting/archive/tags/Mediation+Server/default.aspx</link><description>Tags: Mediation Server</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>RemovePlusFromRequestURI (or how to make OCS non-RFC 3966-compliant)</title><link>http://blogs.technet.com/ucspotting/archive/2009/02/28/removeplusfromrequesturi-or-how-to-make-ocs-non-rfc-3966-compliant.aspx</link><pubDate>Sat, 28 Feb 2009 21:16:40 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3207721</guid><dc:creator>ucspotting</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.technet.com/ucspotting/comments/3207721.aspx</comments><wfw:commentRss>http://blogs.technet.com/ucspotting/commentrss.aspx?PostID=3207721</wfw:commentRss><description>&lt;p&gt;As you know, Office Communications Server 2007 Mediation Server uses a plus sign (+) to prefix E.164 numbers in the Request Uniform Resource Identifier (URI) for outgoing calls. However, certain private branch exchanges (PBXs) do not comply with &lt;a href="http://www.ietf.org/rfc/rfc3966.txt" target="_blank"&gt;RFC 3966&lt;/a&gt; and do not accept numbers that are prefixed with a plus sign (+).&lt;/p&gt;  &lt;p&gt;To make sure that OCS 2007 operates correctly with non-RFC 3966-compliant PBXs, Microsoft released an update for Mediation Server (R1), which is described in KB articles &lt;a href="http://support.microsoft.com/kb/952780" target="_blank"&gt;952780&lt;/a&gt; and &lt;a href="http://support.microsoft.com/kb/952785/"&gt;952785&lt;/a&gt;. &lt;span style="background-color: #ffff99"&gt;After installing the update, it’s necessary to create a configuration file – &lt;em&gt;MediationServerSvc.exe.config&lt;/em&gt;&amp;#160;&lt;/span&gt;– with the following content:&lt;/p&gt;  &lt;div&gt;   &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;lt;?xml version=&lt;span style="color: #006080"&gt;&amp;quot;1.0&amp;quot;&lt;/span&gt; encoding=&lt;span style="color: #006080"&gt;&amp;quot;utf-8&amp;quot;&lt;/span&gt; ?&amp;gt;
&amp;lt;configuration&amp;gt;
                 &amp;lt;appSettings&amp;gt;
                                &amp;lt;add key=&lt;span style="color: #006080"&gt;&amp;quot;RemovePlusFromRequestURI&amp;quot;&lt;/span&gt; value=&lt;span style="color: #006080"&gt;&amp;quot;Yes&amp;quot;&lt;/span&gt; /&amp;gt;
                 &amp;lt;/appSettings&amp;gt;
&amp;lt;/configuration&amp;gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;h3&gt;What about R2?&lt;/h3&gt;

&lt;p&gt;For OCS 2007 R2, the behavior changed a little bit. Microsoft incorporated the previous described workaround in the R2 binaries, but the configuration file is no longer needed. Instead, there’s a new WMI setting, &lt;strong&gt;RemovePlusFromRequestURI&lt;/strong&gt; , which is described on this page: &lt;a href="http://technet.microsoft.com/en-us/library/dd441273(office.13).aspx" target="_blank"&gt;Enterprise Voice Server-Side Components&lt;/a&gt;:&lt;/p&gt;

&lt;h5&gt;&lt;em&gt;&lt;font color="#6a6a6a"&gt;&lt;em&gt;Compatibility with PBXs That Do Not Support the Plus Sign&lt;/em&gt;&lt;/font&gt;&lt;/em&gt;&lt;/h5&gt;
&lt;font color="#6a6a6a"&gt;
  &lt;p&gt;&lt;em&gt;By default, E.164 numbers in the Request URI of outgoing calls from Office Communications Server 2007 R2 are prefixed with a plus sign. Most PBXs process such numbers without problem. Some PBXs, however, do not accept numbers that are prefixed with a plus sign and do not route those calls correctly.&lt;/em&gt;&lt;/p&gt;

  &lt;p&gt;&lt;em&gt;To assure interoperability with these PBXs, Office Communications Server 2007 R2 has a new Mediation Server setting for WMI called &lt;strong&gt;RemovePlusFromRequestURI&lt;/strong&gt;. This setting can be set to YES or NO. The default value is NO.&lt;/em&gt;&lt;/p&gt;

  &lt;ul&gt;
    &lt;li&gt;&lt;em&gt;If a PBX downstream from the Office Communications Server 2007 R2 Mediation server does not accept numbers prefixed with a plus sign, set the value of &lt;strong&gt;RemovePlusFromRequestURI&lt;/strong&gt; to YES. This causes Mediation Server to remove the plus signs from the Request URIs of outgoing calls. It also causes the plus signs to be removed from the To and From URIs. &lt;/em&gt;&lt;/li&gt;

    &lt;li&gt;&lt;em&gt;If the downstream PBX accepts numbers prefixed with plus signs, leave the value of &lt;strong&gt;RemovePlusFromRequestURI&lt;/strong&gt; set to its default value of NO. This causes Office Communications Server 2007 Mediation Server to pass Request URIs, To URIs, and From URIs unchanged (that is, with plus signs).&lt;/em&gt; &lt;/li&gt;
  &lt;/ul&gt;
&lt;/font&gt;

&lt;p&gt;Actually the &lt;strong&gt;RemovePlusFromRequestURI&lt;/strong&gt; is a boolean property that can be set to TRUE or FALSE. The easiest way of changing its value, is by means of a VBScript:&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #008000"&gt;' RemovePlusFromRequestURI&lt;/span&gt;
&lt;span style="color: #008000"&gt;'&lt;/span&gt;

  &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; objLocator
  &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; objService
  &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; objInstances
  &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; objInstance

  Wscript.Echo &lt;span style="color: #006080"&gt;&amp;quot;Connecting to local WMI store...&amp;quot;&lt;/span&gt;

  &lt;span style="color: #0000ff"&gt;Set&lt;/span&gt; objLocator = CreateObject(&lt;span style="color: #006080"&gt;&amp;quot;WbemScripting.SWbemLocator&amp;quot;&lt;/span&gt;)
  &lt;span style="color: #0000ff"&gt;Set&lt;/span&gt; objService = objLocator.ConnectServer(&lt;span style="color: #006080"&gt;&amp;quot;.&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;root\cimv2&amp;quot;&lt;/span&gt;)

  Wscript.Echo &lt;span style="color: #006080"&gt;&amp;quot;select * from MSFT_SIPMediationServerConfigSetting&amp;quot;&lt;/span&gt;
  &lt;span style="color: #0000ff"&gt;Set&lt;/span&gt; objInstances = _
    objService.ExecQuery(&lt;span style="color: #006080"&gt;&amp;quot;select * from MSFT_SIPMediationServerConfigSetting&amp;quot;&lt;/span&gt;)

  &lt;span style="color: #0000ff"&gt;If&lt;/span&gt; IsNull(objInstances) &lt;span style="color: #0000ff"&gt;Or&lt;/span&gt; (objInstances.Count = 0) &lt;span style="color: #0000ff"&gt;Then&lt;/span&gt;
    Wscript.Echo &lt;span style="color: #006080"&gt;&amp;quot;Error: No instance&amp;quot;&lt;/span&gt;

  &lt;span style="color: #0000ff"&gt;Else&lt;/span&gt;

    &lt;span style="color: #0000ff"&gt;For&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Each&lt;/span&gt; objInstance &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; objInstances

      objInstance.Properties_.Item(&lt;span style="color: #006080"&gt;&amp;quot;RemovePlusFromRequestURI&amp;quot;&lt;/span&gt;).Value = &lt;span style="color: #006080"&gt;&amp;quot;TRUE&amp;quot;&lt;/span&gt;
      objInstance.Put_
      wscript.Echo &lt;span style="color: #006080"&gt;&amp;quot;Done&amp;quot;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;Exit&lt;/span&gt; &lt;span style="color: #0000ff"&gt;For&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;Next&lt;/span&gt;

  &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;If&lt;/span&gt;

  Wscript.Echo &lt;span style="color: #006080"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Run this script on the Mediation Server (don’t forget to run it using Administrator credentials) and you’re done. &lt;/p&gt;

&lt;p&gt;To check the current value of this property (or to verify that the script worked), you can use the &lt;a href="http://technet.microsoft.com/en-us/library/cc785775.aspx" target="_blank"&gt;WBEMTest&lt;/a&gt; tool (also check this nice article: &lt;a href="http://www.microsoft.com/technet/scriptcenter/resources/guiguy/wbemtest.mspx" target="_blank"&gt;WBEM What?&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WMI Settings:&lt;/strong&gt; 

  &lt;br /&gt;&lt;strong&gt;Namespace:&lt;/strong&gt; root\cimv2 

  &lt;br /&gt;&lt;strong&gt;Class:&lt;/strong&gt; MSFT_SIPMediationServerConfigSetting (Open Class) 

  &lt;br /&gt;&lt;strong&gt;Property:&lt;/strong&gt; RemovePlusFromRequestURI 

  &lt;br /&gt;&lt;strong&gt;Possible Values:&lt;/strong&gt; TRUE/FALSE&lt;/p&gt;

&lt;h3&gt;To use WBEMTest to verify WMI settings:&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Log on to the Mediation Server as a member of the &lt;b&gt;RTCUniversalServerAdmins&lt;/b&gt; group or an account with equivalent user rights.&lt;/li&gt;

  &lt;li&gt;Click &lt;b&gt;Start&lt;/b&gt;, click &lt;b&gt;Run&lt;/b&gt; and type &lt;b&gt;wbemtest&lt;/b&gt;.&lt;/li&gt;

  &lt;li&gt;In the &lt;b&gt;Windows Management Instrumentation Tester&lt;/b&gt; dialog box, click &lt;b&gt;Connect&lt;/b&gt;.

    &lt;br /&gt;&lt;a href="http://blogs.technet.com/blogfiles/ucspotting/WindowsLiveWriter/RemovePlusFromRequestURIorhowtoturnOCSin_BA6F/01-RemovePlusFromRequestURI_2.gif"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="01-RemovePlusFromRequestURI" border="0" alt="01-RemovePlusFromRequestURI" src="http://blogs.technet.com/blogfiles/ucspotting/WindowsLiveWriter/RemovePlusFromRequestURIorhowtoturnOCSin_BA6F/01-RemovePlusFromRequestURI_thumb.gif" width="244" height="203" /&gt;&lt;/a&gt;&lt;/li&gt;

  &lt;li&gt;In the &lt;b&gt;Connect&lt;/b&gt; dialog box, type &lt;b&gt;root\cimv2&lt;/b&gt; in the &lt;b&gt;Namespace &lt;/b&gt;box. Click &lt;strong&gt;Connect&lt;/strong&gt;.&lt;/li&gt;

  &lt;li&gt;Click &lt;strong&gt;Open Class&lt;/strong&gt;. In the Get Object Path box, type &lt;em&gt;MSFT_SIPMediationServerConfigSetting&lt;/em&gt;, and then click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/li&gt;

  &lt;li&gt;In the Object Editor for &lt;em&gt;MSFT_SIPMediationServerConfigSetting &lt;/em&gt;dialog box, click&lt;strong&gt; Instances&lt;/strong&gt;.

    &lt;br /&gt;&lt;a href="http://blogs.technet.com/blogfiles/ucspotting/WindowsLiveWriter/RemovePlusFromRequestURIorhowtoturnOCSin_BA6F/02-RemovePlusFromRequestURI_2.gif"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="02-RemovePlusFromRequestURI" border="0" alt="02-RemovePlusFromRequestURI" src="http://blogs.technet.com/blogfiles/ucspotting/WindowsLiveWriter/RemovePlusFromRequestURIorhowtoturnOCSin_BA6F/02-RemovePlusFromRequestURI_thumb.gif" width="244" height="225" /&gt;&lt;/a&gt;&lt;/li&gt;

  &lt;li&gt;Double-click &lt;em&gt;MSFT_SIPMediationServerConfigSetting=”{…}”&lt;/em&gt;.

    &lt;br /&gt;&lt;a href="http://blogs.technet.com/blogfiles/ucspotting/WindowsLiveWriter/RemovePlusFromRequestURIorhowtoturnOCSin_BA6F/03-RemovePlusFromRequestURI_2.gif"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="03-RemovePlusFromRequestURI" border="0" alt="03-RemovePlusFromRequestURI" src="http://blogs.technet.com/blogfiles/ucspotting/WindowsLiveWriter/RemovePlusFromRequestURIorhowtoturnOCSin_BA6F/03-RemovePlusFromRequestURI_thumb.gif" width="244" height="156" /&gt;&lt;/a&gt;&lt;/li&gt;

  &lt;li&gt;Scroll down to the property &lt;strong&gt;RemovePlusFromRequestURI&lt;/strong&gt; and verify its value.

    &lt;br /&gt;&lt;a href="http://blogs.technet.com/blogfiles/ucspotting/WindowsLiveWriter/RemovePlusFromRequestURIorhowtoturnOCSin_BA6F/04-RemovePlusFromRequestURI_2.gif"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="04-RemovePlusFromRequestURI" border="0" alt="04-RemovePlusFromRequestURI" src="http://blogs.technet.com/blogfiles/ucspotting/WindowsLiveWriter/RemovePlusFromRequestURIorhowtoturnOCSin_BA6F/04-RemovePlusFromRequestURI_thumb.gif" width="244" height="225" /&gt;&lt;/a&gt;&lt;/li&gt;

  &lt;li&gt;Close the &lt;b&gt;Windows Management Instrumentation Tester&lt;/b&gt; dialog box.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Don’t forget to restart the Mediation Server service, after modifying this setting!&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3207721" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/ucspotting/archive/tags/Mediation+Server/default.aspx">Mediation Server</category></item></channel></rss>