<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.innovaphone.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jens.hitzigrath</id>
	<title>innovaphone wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.innovaphone.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jens.hitzigrath"/>
	<link rel="alternate" type="text/html" href="https://wiki.innovaphone.com/index.php?title=Special:Contributions/Jens.hitzigrath"/>
	<updated>2026-09-21T18:30:35Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://wiki.innovaphone.com/index.php?title=Reference7:Configure_Active_Directory_Replication&amp;diff=16215</id>
		<title>Reference7:Configure Active Directory Replication</title>
		<link rel="alternate" type="text/html" href="https://wiki.innovaphone.com/index.php?title=Reference7:Configure_Active_Directory_Replication&amp;diff=16215"/>
		<updated>2010-01-07T21:48:47Z</updated>

		<summary type="html">&lt;p&gt;Jens.hitzigrath: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Applies To==&lt;br /&gt;
This information applies to&lt;br /&gt;
&lt;br /&gt;
*innovaphone PBX V7&lt;br /&gt;
*Microsoft Windows Server Platforms&lt;br /&gt;
&lt;br /&gt;
Tested with MS Windows 2000 Server and MS Windows 2003 Server.&lt;br /&gt;
&lt;br /&gt;
==More Information==&lt;br /&gt;
Active Directory (AD) replication allows to import Windows Users into an innovaphone PBX as user objects. It is a read-only replication. Nothing is going to be written into the AD.&lt;br /&gt;
&lt;br /&gt;
An attribute mapping mechanism allows to map arbitrary AD-http://wiki.innovaphone.com/index.php?title=Reference7:Configure_Active_Directory_Replication&amp;amp;action=editattributes into arbitrary innovaphone-attributes.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
The configuration can be divided into the two tasks [[#AD Settings|AD Settings]] and [[#Attribute Mapping|Attribute Mapping]]. This article focusses on Attribute Mapping.&lt;br /&gt;
&lt;br /&gt;
*Maps for incoming attributes must be configured. An In-Map controls which content of which incoming attribute goes into a runtime symbol table.&lt;br /&gt;
*Maps for outgoing or local attributes must be configured. An out-map controls which runtime symbol table entry fills a local attribute. &lt;br /&gt;
&lt;br /&gt;
==AD Settings==&lt;br /&gt;
Please see [[Reference7:Configuration/LDAP/Replicator|Reference7:Configuration/LDAP/Replicator]] for common server settings as IP address, DN, User, Password, LDAP Filter.&lt;br /&gt;
&lt;br /&gt;
==Attribute Mapping==&lt;br /&gt;
There are a list of [[#Grammar For In-Maps|In-Maps]] and a list of [[#Grammar For Out-Maps|Out-Maps]]. That&#039;s it.&lt;br /&gt;
In-Maps allow for regular expressions&amp;lt;ref&amp;gt;Regular Expression, http://en.wikipedia.org/wiki/Regular_expression&amp;lt;/ref&amp;gt;. Out-Maps merely consist of symbol names or literals (constants).&lt;br /&gt;
&lt;br /&gt;
*On reception of of a source-ldap object, all existing attributes will be investigated and a corresponding in-map is being looked-up for each attribute.&lt;br /&gt;
*If there are many in-maps per attribute, all maps will be exececuted sequentially and the value assignment will be placed (if the pattern matches). &lt;br /&gt;
*In case of a matching map, then values will be maintained within a symbol table (see grammar: &#039;identifier&#039; production)&lt;br /&gt;
*Values within the symbol table will be overwritten (if already existing).&lt;br /&gt;
*After completion, the target-ldap-obbject will be generated by means of the Out-Maps. If a value application without a value in the symbol table will be found(i.e. no In-Map matched and wrote something into the symbol), then the source-ldap-object is to be discarded.&lt;br /&gt;
&lt;br /&gt;
===Grammar For In-Maps===&lt;br /&gt;
An in-map is a pair of &amp;lt;source-attr-name&amp;gt; (An AD-attribute name) and &amp;lt;assignment_pattern&amp;gt;.&lt;br /&gt;
Approximate Grammar:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    assignment_pattern  ::= &amp;lt;symboldefinitions&amp;gt; &#039;:&#039; &amp;lt;regexp&amp;gt;&lt;br /&gt;
                        |   &amp;lt;symboldefinitions&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    symboldefinitions   ::= &amp;lt;symboldefinitions&amp;gt; &amp;lt;symboldefinition&amp;gt;&lt;br /&gt;
                        |   &amp;lt;symboldefinition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    symboldefinition    ::= &amp;lt;identifier&amp;gt; &#039;=&#039; &amp;lt;value_expression&amp;gt;&lt;br /&gt;
                        |   &amp;lt;identifier&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    value_expression    ::= &#039;/&#039; &amp;lt;VALUES&amp;gt; &#039;/&#039;&lt;br /&gt;
&lt;br /&gt;
    VALUES              ::= &amp;lt;VALUES&amp;gt; &amp;lt;VALUE&amp;gt;&lt;br /&gt;
                        |   &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    VALUE               ::= &#039;\&#039;  &amp;lt;NUM&amp;gt;              # Back Reference&lt;br /&gt;
                        |   &#039;\&#039;&#039; &amp;lt;ALLCHARS&amp;gt; &#039;\&#039;&#039;    # Literal&lt;br /&gt;
                        |   &amp;lt;ALLCHARS&amp;gt;              # Const, synonymous to Literal&lt;br /&gt;
&lt;br /&gt;
    identifer           ::= &#039;%&#039; &amp;lt;ALNUM&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    regexp              ::= &amp;lt;ALLCHARS&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ALNUMS              ::= ALNUMS ALNUM&lt;br /&gt;
                        |   ALNUM &lt;br /&gt;
&lt;br /&gt;
    ALNUM               ::= [&#039;a&#039;-&#039;z&#039;|&#039;A&#039;-&#039;Z&#039;|&#039;0-&#039;9&#039;]&lt;br /&gt;
&lt;br /&gt;
    ALLCHARS            ::= [.*]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====In-Map Examples, Maps for &#039;&#039;telephoneNumber&#039;&#039;====&lt;br /&gt;
&lt;br /&gt;
* %dw=/\1/:07031 12345-(.*)&lt;br /&gt;
that assigns the extension to the symbol %dw&lt;br /&gt;
&lt;br /&gt;
* %dw=/\2/%root=/\1/:07031(.*) -(.*)&lt;br /&gt;
this assigns the extension to the symbol %dw and the root-/subscriber number to %root.&lt;br /&gt;
&lt;br /&gt;
* If the &amp;lt;value_expression&amp;gt; was skipped, it defaults to \n, wher n is the running index of the symbol_definition (starting with 1). The second example from above can therefore be written as: %root%dw:07031(.*) -(.*)&lt;br /&gt;
&lt;br /&gt;
* A default value for a symbol may be defined by simply applying an an always-match-constant-value. That is, for instance for telephoneNumber  &lt;br /&gt;
%dw=/0/:.*&lt;br /&gt;
 &lt;br /&gt;
* Because of the rule, that a missing regexp defaults to &#039;&#039;&#039;:(.*)&#039;&#039;&#039; , this can be written as&lt;br /&gt;
%dw=/0/&lt;br /&gt;
 &lt;br /&gt;
* If an attribute value is to copied straight, one simply writes &lt;br /&gt;
%e164&lt;br /&gt;
 &lt;br /&gt;
* which is identical with&lt;br /&gt;
%e164=/\1/:(.*)&lt;br /&gt;
&lt;br /&gt;
===Grammar For Out-Maps===&lt;br /&gt;
An out-map is a pair of &amp;lt;destination-attr-name&amp;gt; (name of an innovaphone attribute) and &amp;lt;destination_values&amp;gt;.&lt;br /&gt;
Approximate Grammar:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    destination_values  ::= &amp;lt;destination_values&amp;gt; &amp;lt;destination_value&amp;gt;&lt;br /&gt;
                        |   &amp;lt;destination_value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    destination_value   ::= &amp;lt;identifier&amp;gt;&lt;br /&gt;
                        |   &#039;\&#039;&#039; &amp;lt;ALLCHARS&amp;gt; &#039;\&#039;&#039;    # Literal&lt;br /&gt;
                        |   &amp;lt;ALLCHARS&amp;gt;              # Const, synonymous to Literal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This grammar allows to fill the e.g. local cn-attribute not only with a single identifier, but with an intermixed concatenation of several identifiers and literals alike e.g.: &#039;&#039;&amp;quot;%sn&#039;, &#039;%givenName&amp;quot;&#039;&#039; - yielding for instance: &#039;&#039;&amp;quot;Doe, Jon&amp;quot;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
The following example focusses on the generation of the e164-, node- and loc-attribute.&lt;br /&gt;
*Only Sindelfingen-Numbers (+49(7031)...) will match&lt;br /&gt;
*The numbering node (a.k.a. node-attribute) will then be set to &#039;&#039;root&#039;&#039;. &lt;br /&gt;
*The hosting PBX (a.k.a. loc-attribute) will be set to &#039;&#039;sifi&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Within the AD exists..:&lt;br /&gt;
&#039;&#039;Btw, the Filter was configured to: (&amp;amp;(objectclass=user)(telephoneNumber=*))&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            Peter&#039;s telephoneNumber:   +49(7031)12345-75&lt;br /&gt;
            John&#039;s telephoneNumber:    +49(7031)12345-74&lt;br /&gt;
            Mary&#039;s telephoneNumber:    +49(7031)12345-43&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Map configuration underneath Configuration/LDAP/Replicator:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
In Maps&lt;br /&gt;
Source Attribute    Assignment Pattern                                    Description&lt;br /&gt;
--------------      ------------------                                    -----------&lt;br /&gt;
cn                  %cn&lt;br /&gt;
telephoneNumber     %tel%loc=/sifi/%node=/root/:\+49.*7031.*12345-(.*)    Sindelfingen numbers with leading &#039;+&#039; at begin: then backref=1 into %tel. Constant=sifi into %loc. Constant=root into %node.&lt;br /&gt;
displayName         %dn&lt;br /&gt;
&lt;br /&gt;
Out Maps&lt;br /&gt;
Dest.-Attribute     Destination Value&lt;br /&gt;
--------------      ----------------&lt;br /&gt;
cn                  %cn&lt;br /&gt;
e164                %tel&lt;br /&gt;
loc                 %loc&lt;br /&gt;
node                %node&lt;br /&gt;
dn                  %dn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is how the output is written into the flash:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mod cmd FLASHDIR0 add-item 102 (cn=Peter Schmidt)(repsrc=ad)(guid;bin=2B1DAA4655AE244D845734951F5F2F1B)(node=root)(loc=sifi)(dn=Peter Schmidt)(e164=74)(usn=3675) &lt;br /&gt;
mod cmd FLASHDIR0 add-item 102 (cn=John Doe)(repsrc=ad)(guid;bin=904AF5506116354E9E86BE9A6C5D67FF)(node=root)(loc=sifi)(dn=John Doe)(e164=75)(usn=3676) &lt;br /&gt;
mod cmd FLASHDIR0 add-item 102 (cn=Mary Fernandez)(repsrc=ad)(guid;bin=575743792731EE478EFB40754885BAAB)(node=root)(loc=sifi)(dn=Mary Fernandez)(e164=43)(usn=3678)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: According to the [[#Grammar For Out-Maps|Out-Maps Grammar]] a local attribute can be synthesized from multiple symbols and literals. Here comes an example for the aggregated synthesis of the local &#039;&#039;&#039;CN&#039;&#039;&#039; attribute.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
In Map&lt;br /&gt;
Source Attribute    Assignment Pattern                                    Description&lt;br /&gt;
--------------      ------------------                                    -----------&lt;br /&gt;
...&lt;br /&gt;
sn                  %sn                                                   Surname (e.g. Fernandez) into %sn&lt;br /&gt;
givenName           %gn                                                   Name (e.g. Mary) into %gn&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Out Map&lt;br /&gt;
Dest.-Attribute     Destination Value&lt;br /&gt;
--------------      ----------------&lt;br /&gt;
...&lt;br /&gt;
cn                  %sn&#039;, &#039;%gn                                            &lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
yielding:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mod cmd FLASHDIR0 add-item 102 (cn=Fernandez, Mary)(repsrc=ad)(guid;bin=575743792731EE478EFB40754885BAAB)(node=root)(loc=sifi)(dn=Mary Fernandez)(e164=43)(usn=3678)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===AD Attributes Of Interest===&lt;br /&gt;
The following list names the attributes to be configured as &#039;&#039;Source Attribute&#039;&#039; within an In-Map or to be referenced within the LDAP filter:&lt;br /&gt;
*cn: The Common Name&lt;br /&gt;
**single-valued&lt;br /&gt;
**possible usage: for &#039;&#039;cn&#039;&#039; attribute&lt;br /&gt;
&lt;br /&gt;
*sn: The Surname&lt;br /&gt;
**single-valued&lt;br /&gt;
**possible usage: for DECT display name &#039;&#039;dn&#039;&#039; attribute&lt;br /&gt;
&lt;br /&gt;
*givenName: The Given Name.&lt;br /&gt;
**single-valued&lt;br /&gt;
**possible usage: for DECT display name &#039;&#039;dn&#039;&#039; attribute&lt;br /&gt;
&lt;br /&gt;
*telephoneNumber: The primary business telephone number. To be found on a user&#039;s &#039;&#039;General&#039;&#039; tab.&lt;br /&gt;
**single-valued&lt;br /&gt;
**mostly in international form with leading plus sign (e.g. +49(7031)12345-44)&lt;br /&gt;
**possible usage: for &#039;&#039;e164&#039;&#039; attribute&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
*mobile: The primary mobile-/cell-phone number.&lt;br /&gt;
**single-valued&lt;br /&gt;
**mostly in international form with leading plus sign (e.g. +49(177)1234544)&lt;br /&gt;
**possible usage: for &#039;&#039;e164&#039;&#039; attribute&lt;br /&gt;
&lt;br /&gt;
*homePhone: Primary home phone number.&lt;br /&gt;
**single-valued&lt;br /&gt;
**mostly in international form with leading plus sign (e.g. +49(177)1234544)&lt;br /&gt;
**possible usage: for &#039;&#039;e164&#039;&#039; attribute&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
*memberOf: Group memberships. Groups are named here by their Distinguished Name (DN).&lt;br /&gt;
**multi-valued&lt;br /&gt;
**possible usage: for &#039;&#039;root&#039;&#039; attribute&lt;br /&gt;
**&#039;&#039;&#039;Note&#039;&#039;&#039;:Though there might be desires - PBX groups must still be configured manually. PBX groups cannot be configured through AD Replication.&lt;br /&gt;
&lt;br /&gt;
*samAccountName: The logon name&lt;br /&gt;
**single-valued&lt;br /&gt;
**possible usage: for &#039;&#039;h323&#039;&#039; attribute&lt;br /&gt;
&lt;br /&gt;
==Tips&amp;amp;Tricks==&lt;br /&gt;
&lt;br /&gt;
===Investigating/Dumping An AD Object===&lt;br /&gt;
If you want to learn or study about how the AD stores user objects and which attributes are available per user, the tool &#039;&#039;&#039;ldifde.exe&#039;&#039;&#039;&amp;lt;ref&amp;gt;Using LDIFDE, http://support.microsoft.com/kb/237677 or LDIFDE, http://technet2.microsoft.com/WindowsServer/en/Library/32872283-3722-4d9b-925a-82c516a1ca141033.mspx?mfr=true&amp;lt;/ref&amp;gt; will be of help.&lt;br /&gt;
Ldifde.exe is a Microsoft command line program which is part of a Windows Server installation. It allows to dump the complete AD content or parts of it into LDIF&amp;lt;ref&amp;gt;RFC2849, LDAP Data Interchange Format&amp;lt;/ref&amp;gt; files.&lt;br /&gt;
&lt;br /&gt;
To Dump the AD object for a Windows user &#039;&#039;John Doe&#039;&#039; into a file &#039;&#039;out.txt&#039;&#039;&lt;br /&gt;
*On a Windows Server open up a command line box.&lt;br /&gt;
*Enter:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ldifde -s 127.0.0.1 -r &amp;quot;(sn=doe)&amp;quot; -f out.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Btw, from the file you can also learn which Distinguished Names (DNs) are available. A DN may be required as user name within the common server settings on the LDAP/Replicator page.&lt;br /&gt;
&lt;br /&gt;
To Dump all AD user objects into a file &#039;&#039;out.txt&#039;&#039;&lt;br /&gt;
*On a Windows Server open up a command line box.&lt;br /&gt;
*Enter:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ldifde -s 127.0.0.1 -r &amp;quot;(objectclass=user)&amp;quot; -f out.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Deleting AD-Replicated Objects===&lt;br /&gt;
You may delete up to 100 objects in one instance.&lt;br /&gt;
*Proceed to [[Reference7:Configuration/LDAP/Expert|Reference7:Configuration/LDAP/Expert]]&lt;br /&gt;
*Enter the LDAP filter &#039;&#039;(repsrc=*)&#039;&#039; into the search edit field an click on &#039;&#039;&#039;Show&#039;&#039;&#039;&lt;br /&gt;
*Check the column selector to select all displayed objects&lt;br /&gt;
*Click &#039;&#039;&#039;Delete&#039;&#039;&#039; within the toolbar. A confirmation dialog will be shown.&lt;br /&gt;
*Confirm&lt;br /&gt;
&lt;br /&gt;
===Display Non-AD-Replicated Objects===&lt;br /&gt;
*Proceed to [[Reference7:Configuration/LDAP/Expert|Reference7:Configuration/LDAP/Expert]]&lt;br /&gt;
*Enter the LDAP filter &#039;&#039;(!(repsrc=*))&#039;&#039; into the search edit field an click on &#039;&#039;&#039;Show&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Out-Filtering Disabled Windows Accounts===&lt;br /&gt;
Windows maintains the numerical attribute &#039;&#039;userAccountControl&#039;&#039;&amp;lt;ref&amp;gt;userAccountControl, http://support.microsoft.com/?scid=kb%3Ben-us%3B305144&amp;lt;/ref&amp;gt; for each user object within the AD.&lt;br /&gt;
If Bit 2 is set, the user account was disabled.&lt;br /&gt;
&lt;br /&gt;
A NOT-Filter term, featuring a matching-rule, ensures that this bit isn&#039;t set, i.e. that it is not a disabled account: &lt;br /&gt;
*&#039;&#039;(!(userAccountControl:1.2.840.113556.1.4.803:=2))&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A complete AND-filter may therefore look like this one: &lt;br /&gt;
*&#039;&#039;(&amp;amp;(objectclass=user)(telephoneNumber=*)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Filtering For Group Memberships===&lt;br /&gt;
The multi-value AD attribute &#039;&#039;memberOf&#039;&#039; carries the information which groups a user is belonging to. Groups are named within the AD by their Distinguished Name (DN), instead of by their friendly name. &lt;br /&gt;
This is how the AD could be storing a group membership &#039;&#039;Berlin&#039;&#039;:&lt;br /&gt;
*memberOf: &#039;&#039;CN=Berlin,CN=Users,DC=innovaphone,DC=sifi&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you wanted to filter for members of the group &#039;&#039;Berlin&#039;&#039;, the following AND-filter would do the job:&lt;br /&gt;
*&#039;&#039;(&amp;amp;(objectclass=user)(memberOf=CN=Berlin,CN=Users,DC=innovaphone,DC=sifi))&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The filter must be crafted for an equality match. According to MSDN &#039;&#039;memberOf&#039;&#039; does not allow for substring/wildcard matches.&lt;br /&gt;
&lt;br /&gt;
==Known Problems==&lt;br /&gt;
===Freshly Deleted AD-Objects Aren&#039;t Deleted Locally===&lt;br /&gt;
Although the replicator receives change notify results from the AD, the AD might not send notifications about the deletion of objects.&lt;br /&gt;
The replicator will be deleting affected objects only after a stop+start of the replication session.&lt;br /&gt;
&lt;br /&gt;
Lab experiments showed that the AD sent such deletion notifications only, if the replicator had authenticated with administrator credentials - which practically isn&#039;t recommendable.&lt;br /&gt;
&lt;br /&gt;
To recover from this peculiarity the following procedure should be implemented:&lt;br /&gt;
*Please obey paragraph [[#Out-Filtering Disabled Windows Accounts|Out-Filtering Disabled Windows Accounts]] under the Tips&amp;amp;Tricks section.&lt;br /&gt;
*Don&#039;t delete AD objects as the first step of the administration procedure for user objects scheduled for deletion.&lt;br /&gt;
*Instead: Disable such objects as the first step.&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- == Related Articles == --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Howto|{{PAGENAME}}]]&lt;/div&gt;</summary>
		<author><name>Jens.hitzigrath</name></author>
	</entry>
	<entry>
		<id>https://wiki.innovaphone.com/index.php?title=Reference7:Configure_Active_Directory_Replication&amp;diff=16214</id>
		<title>Reference7:Configure Active Directory Replication</title>
		<link rel="alternate" type="text/html" href="https://wiki.innovaphone.com/index.php?title=Reference7:Configure_Active_Directory_Replication&amp;diff=16214"/>
		<updated>2010-01-07T21:47:54Z</updated>

		<summary type="html">&lt;p&gt;Jens.hitzigrath: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Applies To==&lt;br /&gt;
This information applies to&lt;br /&gt;
&lt;br /&gt;
*innovaphone PBX V7&lt;br /&gt;
*Microsoft Windows Server Platforms&lt;br /&gt;
&lt;br /&gt;
Tested with MS Windows 2000 Server and MS Windows 2003 Server.&lt;br /&gt;
&lt;br /&gt;
==More Information==&lt;br /&gt;
Active Directory (AD) replication allows to import Windows Users into an innovaphone PBX as user objects. It is a read-only replication. Nothing is going to be written into the AD.&lt;br /&gt;
&lt;br /&gt;
An attribute mapping mechanism allows to map arbitrary AD-http://wiki.innovaphone.com/index.php?title=Reference7:Configure_Active_Directory_Replication&amp;amp;action=editattributes into arbitrary innovaphone-attributes.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
The configuration can be divided into the two tasks [[#AD Settings|AD Settings]] and [[#Attribute Mapping|Attribute Mapping]]. This article focusses on Attribute Mapping.&lt;br /&gt;
&lt;br /&gt;
*Maps for incoming attributes must be configured. An In-Map controls which content of which incoming attribute goes into a runtime symbol table.&lt;br /&gt;
*Maps for outgoing or local attributes must be configured. An out-map controls which runtime symbol table entry fills a local attribute. &lt;br /&gt;
&lt;br /&gt;
==AD Settings==&lt;br /&gt;
Please see [[Reference7:Configuration/LDAP/Replicator|Reference7:Configuration/LDAP/Replicator]] for common server settings as IP address, DN, User, Password, LDAP Filter.&lt;br /&gt;
&lt;br /&gt;
==Attribute Mapping==&lt;br /&gt;
There are a list of [[#Grammar For In-Maps|In-Maps]] and a list of [[#Grammar For Out-Maps|Out-Maps]]. That&#039;s it.&lt;br /&gt;
In-Maps allow for regular expressions&amp;lt;ref&amp;gt;Regular Expression, http://en.wikipedia.org/wiki/Regular_expression&amp;lt;/ref&amp;gt;. Out-Maps merely consist of symbol names or literals (constants).&lt;br /&gt;
&lt;br /&gt;
*On reception of of a source-ldap object, all existing attributes will be investigated and a corresponding in-map is being looked-up for each attribute.&lt;br /&gt;
*If there are many in-maps per attribute, all maps will be exececuted sequentially and the value assignment will be placed (if the pattern matches). &lt;br /&gt;
*In case of a matching map, then values will be maintained within a symbol table (see grammar: &#039;identifier&#039; production)&lt;br /&gt;
*Values within the symbol table will be overwritten (if already existing).&lt;br /&gt;
*After completion, the target-ldap-obbject will be generated by means of the Out-Maps. If a value application without a value in the symbol table will be found(i.e. no In-Map matched and wrote something into the symbol), then the source-ldap-object is to be discarded.&lt;br /&gt;
&lt;br /&gt;
===Grammar For In-Maps===&lt;br /&gt;
An in-map is a pair of &amp;lt;source-attr-name&amp;gt; (An AD-attribute name) and &amp;lt;assignment_pattern&amp;gt;.&lt;br /&gt;
Approximate Grammar:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    assignment_pattern  ::= &amp;lt;symboldefinitions&amp;gt; &#039;:&#039; &amp;lt;regexp&amp;gt;&lt;br /&gt;
                        |   &amp;lt;symboldefinitions&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    symboldefinitions   ::= &amp;lt;symboldefinitions&amp;gt; &amp;lt;symboldefinition&amp;gt;&lt;br /&gt;
                        |   &amp;lt;symboldefinition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    symboldefinition    ::= &amp;lt;identifier&amp;gt; &#039;=&#039; &amp;lt;value_expression&amp;gt;&lt;br /&gt;
                        |   &amp;lt;identifier&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    value_expression    ::= &#039;/&#039; &amp;lt;VALUES&amp;gt; &#039;/&#039;&lt;br /&gt;
&lt;br /&gt;
    VALUES              ::= &amp;lt;VALUES&amp;gt; &amp;lt;VALUE&amp;gt;&lt;br /&gt;
                        |   &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    VALUE               ::= &#039;\&#039;  &amp;lt;NUM&amp;gt;              # Back Reference&lt;br /&gt;
                        |   &#039;\&#039;&#039; &amp;lt;ALLCHARS&amp;gt; &#039;\&#039;&#039;    # Literal&lt;br /&gt;
                        |   &amp;lt;ALLCHARS&amp;gt;              # Const, synonymous to Literal&lt;br /&gt;
&lt;br /&gt;
    identifer           ::= &#039;%&#039; &amp;lt;ALNUM&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    regexp              ::= &amp;lt;ALLCHARS&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ALNUMS              ::= ALNUMS ALNUM&lt;br /&gt;
                        |   ALNUM &lt;br /&gt;
&lt;br /&gt;
    ALNUM               ::= [&#039;a&#039;-&#039;z&#039;|&#039;A&#039;-&#039;Z&#039;|&#039;0-&#039;9&#039;]&lt;br /&gt;
&lt;br /&gt;
    ALLCHARS            ::= [.*]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====In-Map Examples, Maps for &#039;&#039;telephoneNumber&#039;&#039;====&lt;br /&gt;
&lt;br /&gt;
* %dw=/\1/:07031 12345-(.*)&lt;br /&gt;
that assigns the extension to the symbol %dw&lt;br /&gt;
&lt;br /&gt;
* %dw=/\2/%root=/\1/:07031(.*) -(.*)&lt;br /&gt;
this assigns the extension to the symbol %dw and the root-/subscriber number to %root.&lt;br /&gt;
&lt;br /&gt;
* If the &amp;lt;value_expression&amp;gt; was skipped, it defaults to \n, wher n is the running index of the symbol_definition (starting with 1). The second example from above can therefore be written as: %root%dw:07031(.*) -(.*)&lt;br /&gt;
&lt;br /&gt;
* A default value for a symbol may be defined by simply applying an an always-match-constant-value. That is, for instance for telephoneNumber  &lt;br /&gt;
%dw=/0/:.*&lt;br /&gt;
 &lt;br /&gt;
* Because of the rule, that a missing regexp defaults to &#039;&#039;&#039;:(.*)&#039;&#039;&#039; , this can be written as&lt;br /&gt;
%dw=/0/&lt;br /&gt;
 &lt;br /&gt;
* If an attribute value is to copied straight, one simply writes &lt;br /&gt;
%e164&lt;br /&gt;
 &lt;br /&gt;
* which is identical with&lt;br /&gt;
%e164=/\1/:(.*)&lt;br /&gt;
&lt;br /&gt;
===Grammar For Out-Maps===&lt;br /&gt;
An out-map is a pair of &amp;lt;destination-attr-name&amp;gt; (name of an innovaphone attribute) and &amp;lt;destination_values&amp;gt;.&lt;br /&gt;
Approximate Grammar:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    destination_values  ::= &amp;lt;destination_values&amp;gt; &amp;lt;destination_value&amp;gt;&lt;br /&gt;
                        |   &amp;lt;destination_value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    destination_value   ::= &amp;lt;identifier&amp;gt;&lt;br /&gt;
                        |   &#039;\&#039;&#039; &amp;lt;ALLCHARS&amp;gt; &#039;\&#039;&#039;    # Literal&lt;br /&gt;
                        |   &amp;lt;ALLCHARS&amp;gt;              # Const, synonymous to Literal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This grammar allows to fill the e.g. local cn-attribute not only with a single identifier, but with an intermixed concatenation of several identifiers and literals alike e.g.: &#039;&#039;&amp;quot;%sn&#039;, &#039;%givenName&amp;quot;&#039;&#039; - yielding for instance: &#039;&#039;&amp;quot;Doe, Jon&amp;quot;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
The following example focusses on the generation of the e164-, node- and loc-attribute.&lt;br /&gt;
*Only Sindelfingen-Numbers (+49(7031)...) will match&lt;br /&gt;
*The numbering node (a.k.a. node-attribute) will then be set to &#039;&#039;root&#039;&#039;. &lt;br /&gt;
*The hosting PBX (a.k.a. loc-attribute) will be set to &#039;&#039;sifi&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Within the AD exists..:&lt;br /&gt;
&#039;&#039;Btw, the Filter was configured to: (&amp;amp;(objectclass=user)(telephoneNumber=*))&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            Peter&#039;s telephoneNumber:   +49(7031)12345-75&lt;br /&gt;
            John&#039;s telephoneNumber:    +49(7031)12345-74&lt;br /&gt;
            Mary&#039;s telephoneNumber:    +49(7031)12345-43&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Map configuration underneath Configuration/LDAP/Replicator:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
In Maps&lt;br /&gt;
Source Attribute    Assignment Pattern                                    Description&lt;br /&gt;
--------------      ------------------                                    -----------&lt;br /&gt;
cn                  %cn&lt;br /&gt;
telephoneNumber     %tel%loc=/sifi/%node=/root/:\+49.*7031.*12345-(.*)    Sindelfingen numbers with leading &#039;+&#039; at begin: then backref=1 into %tel. Constant=sifi into %loc. Constant=root into %node.&lt;br /&gt;
displayName         %dn&lt;br /&gt;
&lt;br /&gt;
Out Maps&lt;br /&gt;
Dest.-Attribute     Destination Value&lt;br /&gt;
--------------      ----------------&lt;br /&gt;
cn                  %cn&lt;br /&gt;
e164                %tel&lt;br /&gt;
loc                 %loc&lt;br /&gt;
node                %node&lt;br /&gt;
dn                  %dn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is how the output is written into the flash:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mod cmd FLASHDIR0 add-item 102 (cn=Peter Schmidt)(repsrc=ad)(guid;bin=2B1DAA4655AE244D845734951F5F2F1B)(node=root)(loc=sifi)(dn=Peter Schmidt)(e164=74)(usn=3675) &lt;br /&gt;
mod cmd FLASHDIR0 add-item 102 (cn=John Doe)(repsrc=ad)(guid;bin=904AF5506116354E9E86BE9A6C5D67FF)(node=root)(loc=sifi)(dn=John Doe)(e164=75)(usn=3676) &lt;br /&gt;
mod cmd FLASHDIR0 add-item 102 (cn=Mary Fernandez)(repsrc=ad)(guid;bin=575743792731EE478EFB40754885BAAB)(node=root)(loc=sifi)(dn=Mary Fernandez)(e164=43)(usn=3678)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: According to the [[#Grammar For Out-Maps|Out-Maps Grammar]] a local attribute can be synthesized from multiple symbols and literals. Here comes an example for the aggregated synthesis of the local &#039;&#039;&#039;CN&#039;&#039;&#039; attribute.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
In Map&lt;br /&gt;
Source Attribute    Assignment Pattern                                    Description&lt;br /&gt;
--------------      ------------------                                    -----------&lt;br /&gt;
...&lt;br /&gt;
sn                  %sn                                                   Surname (e.g. Fernandez) into %sn&lt;br /&gt;
givenName           %gn                                                   Name (e.g. Mary) into %gn&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Out Map&lt;br /&gt;
Dest.-Attribute     Destination Value&lt;br /&gt;
--------------      ----------------&lt;br /&gt;
...&lt;br /&gt;
cn                  %sn&#039;, &#039;%gn                                            &lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
yielding:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mod cmd FLASHDIR0 add-item 102 (cn=Fernandez, Mary)(repsrc=ad)(guid;bin=575743792731EE478EFB40754885BAAB)(node=root)(loc=sifi)(dn=Mary Fernandez)(e164=43)(usn=3678)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===AD Attributes Of Interest===&lt;br /&gt;
The following list names the attributes to be configured as &#039;&#039;Source Attribute&#039;&#039; within an In-Map or to be referenced within the LDAP filter:&lt;br /&gt;
*cn: The Common Name&lt;br /&gt;
**single-valued&lt;br /&gt;
**possible usage: for &#039;&#039;cn&#039;&#039; attribute&lt;br /&gt;
&lt;br /&gt;
*sn: The Surname&lt;br /&gt;
**single-valued&lt;br /&gt;
**possible usage: for DECT display name &#039;&#039;dn&#039;&#039; attribute&lt;br /&gt;
&lt;br /&gt;
*givenName: The Given Name.&lt;br /&gt;
**single-valued&lt;br /&gt;
**possible usage: for DECT display name &#039;&#039;dn&#039;&#039; attribute&lt;br /&gt;
&lt;br /&gt;
*telephoneNumber: The primary business telephone number. To be found on a user&#039;s &#039;&#039;General&#039;&#039; tab.&lt;br /&gt;
**single-valued&lt;br /&gt;
**mostly in international form with leading plus sign (e.g. +49(7031)12345-44)&lt;br /&gt;
**possible usage: for &#039;&#039;e164&#039;&#039; attribute&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
*mobile: The primary mobile-/cell-phone number.&lt;br /&gt;
**single-valued&lt;br /&gt;
**mostly in international form with leading plus sign (e.g. +49(177)1234544)&lt;br /&gt;
**possible usage: for &#039;&#039;e164&#039;&#039; attribute&lt;br /&gt;
&lt;br /&gt;
*homePhone: Primary home phone number.&lt;br /&gt;
**single-valued&lt;br /&gt;
**mostly in international form with leading plus sign (e.g. +49(177)1234544)&lt;br /&gt;
**possible usage: for &#039;&#039;e164&#039;&#039; attribute&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
*memberOf: Group memberships. Groups are named here by their Distinguished Name (DN).&lt;br /&gt;
**multi-valued&lt;br /&gt;
**possible usage: for &#039;&#039;root&#039;&#039; attribute&lt;br /&gt;
**&#039;&#039;&#039;Note&#039;&#039;&#039;:Though there might be desires - PBX groups must still be configured manually. PBX groups cannot be configured through AD Replication.&lt;br /&gt;
&lt;br /&gt;
*samAccountName: The logon name&lt;br /&gt;
**single-valued&lt;br /&gt;
**possible usage: for &#039;&#039;h323&#039;&#039; attribute&lt;br /&gt;
&lt;br /&gt;
==Tips&amp;amp;Tricks==&lt;br /&gt;
&lt;br /&gt;
===Investigating/Dumping An AD Object===&lt;br /&gt;
If you want to learn or study about how the AD stores user objects and which attributes are available per user, the tool &#039;&#039;&#039;ldifde.exe&#039;&#039;&#039;&amp;lt;ref&amp;gt;Using LDIFDE, http://support.microsoft.com/kb/237677 or LDIFDE, http://technet2.microsoft.com/WindowsServer/en/Library/32872283-3722-4d9b-925a-82c516a1ca141033.mspx?mfr=true&amp;lt;/ref&amp;gt; will be of help.&lt;br /&gt;
Ldifde.exe is a Microsoft command line program which is part of a Windows Server installation. It allows to dump the complete AD content or parts of it into LDIF&amp;lt;ref&amp;gt;RFC2849, LDAP Data Interchange Format&amp;lt;/ref&amp;gt; files.&lt;br /&gt;
&lt;br /&gt;
To Dump the AD object for a Windows user &#039;&#039;John Doe&#039;&#039; into a file &#039;&#039;out.txt&#039;&#039;&lt;br /&gt;
*On a Windows Server open up a command line box.&lt;br /&gt;
*Enter:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ldifde -s 127.0.0.1 -r &amp;quot;(sn=doe)&amp;quot; -f out.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Btw, from the file you can also learn which Distinguished Names (DNs) are available. A DN may be required as user name within the common server settings on the LDAP/Replicator page.&lt;br /&gt;
&lt;br /&gt;
To Dump all AD user objects into a file &#039;&#039;out.txt&#039;&#039;&lt;br /&gt;
*On a Windows Server open up a command line box.&lt;br /&gt;
*Enter:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ldifde -s 127.0.0.1 -r &amp;quot;(objectclass=user)&amp;quot; -f out.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Deleting AD-Replicated Objects===&lt;br /&gt;
You may delete up to 100 objects in one instance.&lt;br /&gt;
*Proceed to [[Reference7:Configuration/LDAP/Expert|Reference7:Configuration/LDAP/Expert]]&lt;br /&gt;
*Enter the LDAP filter &#039;&#039;(repsrc=*)&#039;&#039; into the search edit field an click on &#039;&#039;&#039;Show&#039;&#039;&#039;&lt;br /&gt;
*Check the column selector to select all displayed objects&lt;br /&gt;
*Click &#039;&#039;&#039;Delete&#039;&#039;&#039; within the toolbar. A confirmation dialog will be shown.&lt;br /&gt;
*Confirm&lt;br /&gt;
&lt;br /&gt;
===Display Non-AD-Replicated Objects===&lt;br /&gt;
*Proceed to [[Reference7:Configuration/LDAP/Expert|Reference7:Configuration/LDAP/Expert]]&lt;br /&gt;
*Enter the LDAP filter &#039;&#039;(!(repsrc=*))&#039;&#039; into the search edit field an click on &#039;&#039;&#039;Show&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Out-Filtering Disabled Windows Accounts===&lt;br /&gt;
Windows maintains the numerical attribute &#039;&#039;userAccountControl&#039;&#039;&amp;lt;ref&amp;gt;userAccountControl, http://support.microsoft.com/?scid=kb%3Ben-us%3B305144&amp;lt;/ref&amp;gt; for each user object within the AD.&lt;br /&gt;
If Bit 2 is set, the user account was disabled.&lt;br /&gt;
&lt;br /&gt;
A NOT-Filter term, featuring a matching-rule, ensures that this bit isn&#039;t set, i.e. that it is not a disabled account: &lt;br /&gt;
*&#039;&#039;(!(userAccountControl:1.2.840.113556.1.4.803:=2))&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A complete AND-filter may therefore look like this one: &lt;br /&gt;
*&#039;&#039;(&amp;amp;(objectclass=user)(telephoneNumber=*)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Filtering For Group Memberships===&lt;br /&gt;
The multi-value AD attribute &#039;&#039;memberOf&#039;&#039; carries the information which groups a user is belonging to. Groups are named within the AD by their Distinguished Name (DN), instead of by their friendly name. &lt;br /&gt;
This is how the AD could be storing a group membership &#039;&#039;Berlin&#039;&#039;:&lt;br /&gt;
*memberOf: &#039;&#039;CN=Berlin,CN=Users,DC=innovaphone,DC=sifi&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you wanted to filter for members of the group &#039;&#039;Berlin&#039;&#039;, the following AND-filter would do the job:&lt;br /&gt;
*&#039;&#039;(&amp;amp;(objectclass=user)(memberOf=CN=Berlin,CN=Users,DC=innovaphone,DC=sifi))&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The filter must be crafted for an equality match. According to MSDN &#039;&#039;memberOf&#039;&#039; does not allow for substring/wildcard matches.&lt;br /&gt;
&lt;br /&gt;
==Known Problems==&lt;br /&gt;
===Freshly Deleted AD-Objects Aren&#039;t Deleted Locally===&lt;br /&gt;
Although the replicator receives change notify results from the AD, the AD might not send notifications about the deletion of objects.&lt;br /&gt;
The replicator will be deleting affected objects only after a stop+start of the replication session.&lt;br /&gt;
&lt;br /&gt;
Lab experiments showed that the AD sent such deletion notifications only, if the replicator had authenticated with administrator credentials - which practically isn&#039;t recommendable.&lt;br /&gt;
&lt;br /&gt;
To recover from this peculiarity the following procedure should be implemented:&lt;br /&gt;
*Please obey paragraph [[#Out-Filtering Disabled Windows Accounts|Out-Filtering Disabled Windows Accounts]] under the Tips&amp;amp;Tricks section.&lt;br /&gt;
*Don&#039;t delete AD objects as the first step of the administration procedure for user objects scheduled for deletion.&lt;br /&gt;
*Instead: Disable such objects as the first step.&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- == Related Articles == --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Howto|{{PAGENAME}}]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Jens &#039;&#039;&#039;ComNet&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Jens.hitzigrath</name></author>
	</entry>
</feed>