Skip to main content

Cloud

Controlling the msRTCSIP-OptionFlags attribute for OCS

When configuring OCS user settings in bulk there are a limited numbers of options one can change when using the Office Communications Server 2007 Management Console. A range of user accounts can be selected and some options can be enabled/disabled like: Enhanced Presence, Federation, External access, PIC, and archival behavior. You can also set EV and meeting policies, but unfortunately cannot control any of the Telephony user settings.

When migrating users and simultaneously deploying new services like Remote Call Control or Enterprise Voice you’ll need to directly modify those user attributes in Active Directory. Let’s use the example of migrating a few thousand users from LCS 2005 to a OCS 2007 deployment, leveraging Remote Call Control (RCC) with a popular IP-PBX system.

In order to configure RCC for a user there are three AD attributes which will need to be updated: msRTCSIP-LineServer, msRTCSIP-Line, and msRTCSIP-OptionFlags. The image below shows the desired settings for an RCC-enabled user and the related attribute names.

ocs_optionflags1

Updating the Server URI and Line URI fields is a straight-forward process, as the associated attributes can simply be modified in bulk using LDIFDE or ADModify.NET. But getting that radio button selected for "Enable Remote call control" is a bit more complicated, as the msRTCSIP-OptionFlags attribute is a bit-mask value where multiple options are represented by a unique bit so that a single attribute can control many separate settings. Think of it as a bank of switches (11 to be exact) in which each ‘switch’ controls a different user setting and has it’s own unique value. The total number of switches is added-up to yield the attribute’s value, as can be seen in ADSIedit.

The table below lists each ‘switch’ and what user setting it controls:

Value Controlled Behavior Setting Location
1 Enabled for Public IM Connectivity User Options > Federation:
– Enable public IM connectivity
2 Reserved
4 Reserved
8 Reserved
16 Remote Call Control (RCC) Enabled User Options > Telephony:
– Enable Remote call control
32 Unused
64 AllowOrganizeMeetingWithAnonymousParticipants Communications > Meetings:
– Allow anonymous participants
128 UCEnabled User Options > Telephony:
– Enable Enterprise Voice
256 EnabledForEnhancedPresence User Options:
– Enable Enhanced Presence
512 RemoteCallControlDualMode User Options > Telephony:
– Enable Enterprise Voice
– Enable PBX integration
1024 Enabled auto-attendant

If we take a look at the user account in this example using ADSIedit we can see the raw integer value for msRTCSIP-OptionFlags:

ocs_optionflags2

That value of 337 tells us exactly which options are currently enabled for this example account: Enhanced Presence (256) + Allow Anonymous Meeting Participants (64) + RCC Enabled (16) + PIC Enabled (1) = 337.

So, in order to correctly update these settings for many users in bulk it’s important to export the current value of this attribute for all in-scope user accounts, then increment the integer by adding the value(s) for the desired setting(s), and simply updating that attribute. There are already numerous sources of information on how to import and export AD attributes value, but routine I used was to export the current data from AD using CSVDE, imported it into Excel and used various VLOOKUP formulas to build the new attribute values by reconciling against exports of employee phone directories to gather the needed phone extension. I then saved the new information as a CSV file which looks like this:

DN,msRTCSIP-OptionFlags,msRTCSIP-LineServer,msRTCSIP-Line
"CN=Schertz, Jeff D,OU=Chicago,OU=All Users,DC=Schertz,DC=local",337,sip:jschertz@cupserver.schertz.local,tel:3932;phone-context=dialstring

(Tip #1: if there are commas in the user object’s CN then CSVDE will export them with two backslashes preceding the "," character. Make sure you perform a Find/Replace in Excel to change all instances of "\," to "," as LDIFDE requires a single character. Having two backslashes before the comma in the import file will cause the process to fail with an invalid DN error. When importing data with CSVDE, two \ escape characters are required.)

Once I had my import data created I used a co-worker’s blog entry as a guide to build a template to convert the CSV file created in Excel into a proper LDIF import file. Here’s the contents of my custom csv-ldif.txt template file that matches my CSV file data:

<LPBODY>
dn: %FIELD_3%
changetype: modify
replace: msRTCSIP-OptionFlags
msRTCSIP-OptionFlags: %FIELD_4%

replace: msRTCSIP-LineServer
msRTCSIP-LineServer: %FIELD_5%

replace: msRTCSIP-Line
msRTCSIP-Line: %FIELD_6%

</LPBODY>

By following Derek’s directions you can use the Microsoft Log Parser utility to convert the standard CSV file into a properly formatted LDIF file which will update all three attributes for each user in turn.

In this specific deployment most of the current LCS 2005 users had a msRTCSIP-OptionFlags value or either 0 or 1 (only a handful of users had PIC enabled) so I simply incremented the values to 16 and 17, respectively. This enabled RCC for all users as the accounts were simultaneously moved to the new OCS server. As the client workstation’s will next be upgraded to Office Communicator 2007 (and Enhanced Presence enabled) Remote Call Control will immediately be available.

(Tip #2: Be careful when incrementing the value as if it’s increased by 256, then Enhanced Presence will be enabled, which cannot be reverted.)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Jeff Schertz

More from this Author

Follow Us
TwitterLinkedinFacebookYoutubeInstagram