Freigeben über


RemovePlusFromRequestURI (or how to make OCS non-RFC 3966-compliant)

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 RFC 3966 and do not accept numbers that are prefixed with a plus sign (+).

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 952780 and 952785. After installing the update, it’s necessary to create a configuration file – MediationServerSvc.exe.config – with the following content:

 <?xml version="1.0" encoding="utf-8" ?>
<configuration>
                 <appSettings>
                                <add key="RemovePlusFromRequestURI" value="Yes" />
                 </appSettings>
</configuration>

What about R2?

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, RemovePlusFromRequestURI , which is described on this page: Enterprise Voice Server-Side Components:

Compatibility with PBXs That Do Not Support the Plus Sign

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.

To assure interoperability with these PBXs, Office Communications Server 2007 R2 has a new Mediation Server setting for WMI called RemovePlusFromRequestURI. This setting can be set to YES or NO. The default value is NO.

  • 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 RemovePlusFromRequestURI 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.
  • If the downstream PBX accepts numbers prefixed with plus signs, leave the value of RemovePlusFromRequestURI 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).

Actually the RemovePlusFromRequestURI 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:

 ' RemovePlusFromRequestURI
'

  Dim objLocator
  Dim objService
  Dim objInstances
  Dim objInstance

  Wscript.Echo "Connecting to local WMI store..."

  Set objLocator = CreateObject("WbemScripting.SWbemLocator")
  Set objService = objLocator.ConnectServer(".", "root\cimv2")

  Wscript.Echo "select * from MSFT_SIPMediationServerConfigSetting"
  Set objInstances = _
    objService.ExecQuery("select * from MSFT_SIPMediationServerConfigSetting")

  If IsNull(objInstances) Or (objInstances.Count = 0) Then
    Wscript.Echo "Error: No instance"

  Else

    For Each objInstance in objInstances

      objInstance.Properties_.Item("RemovePlusFromRequestURI").Value = "TRUE"
      objInstance.Put_
      wscript.Echo "Done"
    Exit For
    Next

  End If

  Wscript.Echo ""

Run this script on the Mediation Server (don’t forget to run it using Administrator credentials) and you’re done.

To check the current value of this property (or to verify that the script worked), you can use the WBEMTest tool (also check this nice article: WBEM What?).

WMI Settings:

Namespace: root\cimv2

Class: MSFT_SIPMediationServerConfigSetting (Open Class)

Property: RemovePlusFromRequestURI

Possible Values: TRUE/FALSE

To use WBEMTest to verify WMI settings:

  1. Log on to the Mediation Server as a member of the RTCUniversalServerAdmins group or an account with equivalent user rights.

  2. Click Start, click Run and type wbemtest.

  3. In the Windows Management Instrumentation Tester dialog box, click Connect.

    01-RemovePlusFromRequestURI

  4. In the Connect dialog box, type root\cimv2 in the Namespace box. Click Connect.

  5. Click Open Class. In the Get Object Path box, type MSFT_SIPMediationServerConfigSetting, and then click OK.

  6. In the Object Editor for MSFT_SIPMediationServerConfigSetting dialog box, click Instances.

    02-RemovePlusFromRequestURI

  7. Double-click MSFT_SIPMediationServerConfigSetting=”{…}” .

    03-RemovePlusFromRequestURI

  8. Scroll down to the property RemovePlusFromRequestURI and verify its value.

    04-RemovePlusFromRequestURI

  9. Close the Windows Management Instrumentation Tester dialog box.

Don’t forget to restart the Mediation Server service, after modifying this setting!

Comments

  • Anonymous
    January 01, 2003
    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. Unfortunately, some IP-PBXs don't comply with RFC 3966 and do not accept numbers that

  • Anonymous
    January 01, 2003
    great post, thank you!  I feel it's important to point out that most external PBX's aren't necessarily non-compliant to RFC3966 (a proposed standard not widely implemented, at least not yet), but rather many don't leverage E164 global numbering in their URI contexts.  Most instead use something akin to a local URI (also specified in the RFC).  One could easily argue that within OCS it should be just as easy to send/receive requests using "local" numbers within a private context as defined by 3966 to make it fully compliant with the standard.