<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="RIGHT: auto"><BR style="RIGHT: auto">[code]<BR>res_ldap.conf</div>
<div style="RIGHT: auto">[_general]<BR>;<BR>; Specify one of either host and port OR url. URL is preferred, as you can<BR>; use more options.<BR>;host=192.168.1.1 ; LDAP host<BR>host=lync-demo.local ; LDAP host<BR>port=389<BR>url=ldap://ad.lync-demo.local:389<BR>protocol=3 ; Version of the LDAP protocol to use; default is 3.<BR>basedn=dc=lync-demo,dc=local ; Base DN<BR>;user=cn=administrator,dc=lync-demo,dc=local ; Bind DN<BR>user=cn=administrator,cn=users,dc=lync-demo,dc=local ; Bind
DN<BR>;user=dc=lync-demo,dc=local ; Bind DN<BR>pass=Esi888888 </div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">[extensions]<BR>;context = AstExtensionContext<BR>;context = givenname<BR>;exten = AstExtensionExten<BR>attribute=exten=givenname<BR>;priority = AstExtensionPriority<BR>;attribute=priority=givenname<BR>;app = AstExtensionApplication<BR>;appdata = AstExtensionApplicationData<BR>additionalFilter=(objectClass=user)</div>
<div style="RIGHT: auto">[/code]</div>
<div style="RIGHT: auto">[code]<BR>extconfig.conf<BR>extensions => ldap,"dc=lync-demo,dc=local",extensions<BR>[/code]<BR>[code]<BR>[from-internal]<BR>include => from-internal-xfer<BR>include => bad-number<BR>switch => <A href="mailto:Realtime/@extensions">Realtime/@extensions</A><BR>exten=> William,1,Set(CHANNEL(secure_bridge_media)=1)<BR>exten=> William,2,Set(_SIP_SRTP_SDES=1)<BR>exten=> William,3,Set(_SIPSRTP=optional)<BR>exten=> William,4,Set(_SIPSRTP_CRYPTO=enable)<BR>exten => William,5,Set(b="${REALTIME(extensions,givenname,William)}")<BR>exten => William,6,NoOp(${b})<BR>exten => William,7,Set(pair=${CUT(b,"|",1)});<BR>exten => William,8,Set(col_name=${CUT(pair,"=",2)});<BR>exten=> William,n,Hangup()<BR>[/code]</div>
<div style="RIGHT: auto">I use realtime to connect ldap server at lync <BR>But When I query the ldap , I get below error in full log .<BR>I expect the ldap query will get back something according input givename=William .</div>
<div style="RIGHT: auto">The REALTiME function cannot retrevie the givename from lync and output null.<BR>There is this key/attribute in lync server .....</div>
<div style="RIGHT: auto">There is openration error .<BR>The lync ldap server is working and I can use the filter (&(objectClass=user)(givenname=William)) to get the result by<BR>php ldap_Search .. it is work .</div>
<div style="RIGHT: auto">Please advice what is wrong in asterisk I use asterisk 1.8.11 ...</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">[Oct 30 00:42:48] DEBUG[9260] app_queue.c: Device 'SIP/3200' changed to state '2' (In use) but we don't care because they're not a member of any queue.<BR>[Oct 30 00:42:48] WARNING[9264] res_config_ldap.c: Failed to query directory. Error: Operations error.<BR>[Oct 30 00:42:48] WARNING[9264] res_config_ldap.c: Query: (&(objectClass=user)(givenname=William))<BR>[Oct 30 00:42:48] DEBUG[9264] pbx.c: Function result is '(null)'<BR>[Oct 30 00:42:48] DEBUG[9264] pbx.c: Launching 'Set'<BR>[Oct 30 00:42:48] VERBOSE[9264] pbx.c: -- Executing [William@from-internal:5] Set("SIP/3200-00000000", "b=""") in new stack</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">Log for asterisk full<BR><A href="https://dl.dropbox.com/u/68357652/full.rar">https://dl.dropbox.com/u/68357652/full.rar</A></div>
<div style="RIGHT: auto"><VAR id=yui-ie-cursor></VAR> </div></div></body></html>