Thursday, October 15, 2009

OCS R2 modify MsRTCSip settings

It's not VMWare, heck its even on a physical server.

Migrating a customer from OCS 2007 to OCS 2007 R2 with integration into a Cisco Call Manager box, we wanted to enable Enterprise Voice with PBX Integration. To do this we needed to modify the MsRTCSip-Line and LineServer settings. When we originally setup RCC we used VIM to parse a file for LDIFDE import, but since my VIM Guru was MIA I needed to find a more "non-linux user" friendly method. After some looking found MS Log Parser 2.2 and some documentation and my world may never be the same...

Steps to bulk modify these settings

1.) Download Microsoft Log Parser 2.2 and install

2.) Get a CSV Dump
CSVDE -f users.csv -r objectCategory=person -l "DN, SamAccountname, TelephoneNumber, msrtcsip-line, msrtcsip-lineserver"
(This will dump current settings so you can go back if need be)

3.) Clean up CSV if needed (Remove non ocs users or contacts)

4.) Create log parser template file (Log parser is confusing when picking variable fields, it is the number you think plus 2) IE: DN is field 1 but you need to put %field_3%
Examples
MSRTCSIP-Line.tpl:


dn: %FIELD_3%
changetype: modify
replace: msrtcsip-line
msrtcsip-line: tel:+%FIELD_5%
-


MSRTCSIP-LineServer.tpl:

dn: %FIELD_3%
changetype: modify
replace: msrtcsip-lineserver
msrtcsip-lineserver: sip:%FIELD_5%;phone-context=dialplan@cupsFQDN.com
-


5.) Copy logparser.exe, logparser.dll, users.csv to a folder (IE C:\OCS)

6.) create a batch file to parse msrtcsip-line.tpl and msrtcsip-lineserver.tpl

type c:\OCS\users.csv logparser "SELECT * FROM STDIN" -i:CSV -o:tpl -tpl:"C:\OCS\msrtcsip-line.tpl" -q:on -stats:off > "C:\OCS\msrtcsip-line.ldf"

type c:\OCS\users.csv logparser "SELECT * FROM STDIN" -i:CSV -o:tpl -tpl:"C:\OCS\msrtcsip-lineserver.tpl" -q:on -stats:off > "C:\OCS\msrtcsip-lineServer.ldf"

7.) Edit each ldf file to replace \\ with \ (notepad find replace)

8.) Import each ldf file seperately
ldifde -i -f c:\OCS\msrtcsip-line.ldf
ldifde -i -f c:\OCS\msrtcsip-lineserver.ldf

No comments:

Post a Comment