<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; "><span><br></span></div><div><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px; "><div style="font-family: arial, helvetica, sans-serif; "><div style="font-family: 'times new roman', 'new york', times, serif; "><div dir="ltr"><font><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font> </font> </div> <br><meta http-equiv="x-dns-prefetch-control" content="off"><div id="yiv4157804" style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-size: 12pt; font-family: arial, helvetica, sans-serif; "><div dir="ltr" style="font-size: 12pt;
 font-family: arial, helvetica, sans-serif; ">Hello all,</div><div dir="ltr" style="font-size: 12pt; font-family: arial, helvetica, sans-serif; "><br></div><div dir="ltr" style="font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; font-family: arial, helvetica, sans-serif; ">I am going to register asterisk sip users through active directory accounts LDAP (that is a separated server with ip : 192.168.11.17)</div><div dir="ltr" style="font-size: 12pt; font-family: arial, helvetica, sans-serif; ">So I have followed the below link as well:</div><div dir="ltr" style="font-size: 12pt; font-family: arial, helvetica, sans-serif; "><br></div><div dir="ltr" style="font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; font-family: arial, helvetica, sans-serif; "><a rel="nofollow" target="_blank"
 href="https://wiki.asterisk.org/wiki/display/AST/LDAP+Realtime+Driver">https://wiki.asterisk.org/wiki/display/AST/LDAP+Realtime+Driver</a><br></div><div dir="ltr" style="font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; font-family: arial, helvetica, sans-serif; "><a rel="nofollow" target="_blank" href="http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/ExternalServices_id291590.html">http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/ExternalServices_id291590.html</a><br></div><div dir="ltr" style="font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; font-family: arial, helvetica, sans-serif; "><a rel="nofollow" target="_blank" href="http://ensiwiki.ensimag.fr/index.php/Asterisk's_external_configuration_(LDAP)">http://ensiwiki.ensimag.fr/index.php/Asterisk's_external_configuration_(LDAP)</a><br></div><div dir="ltr" style="font-size: 16px; color:
 rgb(0, 0, 0); background-color: transparent; font-style: normal; font-family: arial, helvetica, sans-serif; "><br></div><div dir="ltr" style="font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; font-family: arial, helvetica, sans-serif; "><br></div><div dir="ltr" style="font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; font-family: arial, helvetica, sans-serif; "><br></div><div dir="ltr" style="font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; font-family: arial, helvetica, sans-serif; "><br></div><div dir="ltr" style="font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; font-family: arial, helvetica, sans-serif; "><br></div><div dir="ltr" style="font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; font-family: arial, helvetica, sans-serif; ">Server:192.168.14.90
 &nbsp;=&gt; asterisk</div><div dir="ltr" style="font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; font-family: arial, helvetica, sans-serif; ">server:192.168.11.17 =&gt; &nbsp;ActiveDirectory</div><div dir="ltr" style="font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; font-family: arial, helvetica, sans-serif; ">Finally, this is my configuration file :</div><div dir="ltr" style="background-color:transparent;"><div dir="ltr" style="background-color:transparent;"><br></div><div dir="ltr" style="background-color:transparent;"><div dir="ltr" style="background-color:transparent;"><span style="font-family: arial, helvetica, sans-serif; ">[root@PBX ~]# telnet 192.168.11.17 389</span></div><div dir="ltr" style="background-color:transparent;"><span style="font-family: arial, helvetica, sans-serif; ">Trying 192.168.11.17...</span></div><div dir="ltr"
 style="background-color:transparent;"><span style="font-family: arial, helvetica, sans-serif; ">Connected to 192.168.11.17 (192.168.11.17).</span></div><div dir="ltr" style="background-color:transparent;"><span style="font-family: arial, helvetica, sans-serif; ">Escape character is '^]'.</span></div></div><div dir="ltr" style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-style: normal; font-family: arial, helvetica, sans-serif; "><br></div><div dir="ltr" style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-style: normal; font-family: arial, helvetica, sans-serif; "><font face="arial, helvetica, sans-serif" style="font-weight:bold;">[_general]</font></div><div dir="ltr" style="background-color:transparent;"><font face="arial, helvetica, sans-serif">host=192.168.11.17 &nbsp; &nbsp;; LDAP host</font></div><div dir="ltr" style="background-color:transparent;"><font face="arial, helvetica,
 sans-serif">port=389</font></div><div dir="ltr" style="
background-color:transparent;"><font face="arial, helvetica, sans-serif">protocol=3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; Version of the LDAP protocol to use; default is 3.</font></div><div dir="ltr" style="background-color:transparent;"><font face="arial, helvetica, sans-serif">url=ldap://192.168.11.17:389</font></div><div dir="ltr" style="background-color:transparent;"><font face="arial, helvetica, sans-serif">basedn=dc=example,dc=com</font></div><div dir="ltr" style="background-color:transparent;"><font face="arial, helvetica, sans-serif">;User=cn=,dc=example,dc=com</font></div><div dir="ltr" style="background-color:transparent;"><font face="arial, helvetica, sans-serif">;User=cn=join_lan,dc=example,dc=com</font></div><div dir="ltr" style="background-color:transparent;"><font face="arial, helvetica, sans-serif">;User=cn=sa_hosseini,dc=rasana,dc=ir</font></div><div dir="ltr" style="background-color:transparent;"><font face="arial, helvetica,
 sans-serif">User=cn=lan,cn=technical,cn=xyz,cn=join_lan,dc=example,dc=com</font></div><div dir="ltr" style="background-color:transparent;"><span style="background-color: transparent; font-family: arial, helvetica, sans-serif; ">Pass=123456</span><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-style: normal; font-family: arial, helvetica, sans-serif; ">-----------------------------------------------------------------------</div><div dir="ltr"><font face="arial, helvetica, sans-serif" style="font-weight:bold;">vim /etc/asterisk/extconfig.conf</font><br></div><div dir="ltr"><font face="arial, helvetica, sans-serif">sipusers =&gt; ldap,"dc=example,dc=com",sip<br></font></div><div dir="ltr"><span style="background-color: transparent; font-family: arial, helvetica, sans-serif; ">------------------------------------------------------------------------</span><br></div><div dir="ltr"><font face="arial, helvetica, sans-serif"
 style="font-weight:bold;">vim /etc/asterisk/sip.conf</font></div><div dir="ltr"><font face="arial, helvetica, sans-serif"><div dir="ltr">[general]</div><div dir="ltr">callevents=yes</div><div dir="ltr">rtcachefriends=yes</div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><span style="font-size:16px;">but i got the follwoing error :</span><br></div><div dir="ltr"><span style="font-size:16px;"><br></span></div><div dir="ltr"><span style="font-size:16px;"><br></span></div><div dir="ltr"><span style="font-size:16px;"><br></span></div><div dir="ltr"><div dir="ltr">PBX*CLI&gt; module reload res_config_ldap.so</div><div dir="ltr">&nbsp; &nbsp; -- Reloading module 'res_config_ldap.so' (LDAP realtime interface)</div><div dir="ltr">&nbsp; == Parsing '/etc/asterisk/res_ldap.conf': &nbsp; == Found</div><div dir="ltr">[Nov &nbsp;8 09:38:06] WARNING[8687]: res_config_ldap.c:1750 ldap_reconnect: bind failed: Invalid credentials</div><div
 dir="ltr">[Nov &nbsp;8 09:38:06] WARNING[8687]: res_config_ldap.c:1598 reload: Couldn't establish connection to your directory server. Check debug.</div><div dir="ltr">&nbsp; == LDAP RealTime driver reloaded.</div><div><br></div><div dir="ltr">Then i have registered with user:join_lan;pass:123456 domain:192.168.14.90</div><div dir="ltr">and get the following error on CLI:</div><div dir="ltr"><div dir="ltr">Verbosity is at least 15</div><div dir="ltr">[Nov &nbsp;8 09:41:42] NOTICE[8674]: chan_sip.c:25005 handle_request_register: Registration from '"join_lan"&lt;sip:join_lan@192.168.14.90&gt;' failed for '192.168.19.21:38968' - No matching peer found</div><div dir="ltr">[Nov &nbsp;8 09:41:42] NOTICE[8674]: chan_sip.c:25005 handle_request_register: Registration from '"join_lan"&lt;sip:join_lan@192.168.14.90&gt;' failed for '192.168.19.21:38968' - No matching peer found</div><div><br></div></div><div dir="ltr"><br></div></div><div
 dir="ltr"><br></div><div><br></div></font></div></div></div></div></div><meta http-equiv="x-dns-prefetch-control" content="on"><br><br> </div> </div> </blockquote></div>   </div></body></html>