benz
Joined: Mon 26 of Mar, 2007
Posted:Thu 22 of Nov, 2007 (10:04 UTC)
I have a AD named wks.com, it's ip is :172.31.0.173
for search the user account in AD,I add the following two lines to /etc/openldap/ldap.conf
HOST 172.31.0.173
BASE dc=wks,dc=com
then the command is works fine,it list more information about the account ben:
ldapsearch -x -D "cn=Administrator,cn=Users,dc=wks,dc=com" -W "sAMAccountName=ben"

now I want to use the LDAPget , I configure the /etc/asterisk/ldap.conf like this:

[cidname]
host = 172.31.0.173
version = 3
user = cn=administrator,cn=Users
pass = 111111
base = dc=wks,dc=com
filter = (&(objectClass=person)(|(samaccountname=ben)))
attribute = telephoneNumber
convert = UTF-8,ISO-8859-1

in the extension.conf
exten => 1000,1,LDAPget(a=cidname)

But when I use a extension phone to dial the 1000, the asterisk terminate and output the following info:
== Parsing '/etc/asterisk/ldap.conf': Found
> LDAPget: ldap://172.31.0.173/dc=wks,dc=com?telephoneNumber?sub?(&(objectClass=person)(|(samaccountname=ben)))
— LDAPget: ldap://172.31.0.173/dc=wks,dc=com?telephoneNumber?sub?(&(objectClass=person)(|(samaccountname=ben)))
ben*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
Asterisk cleanly ending (0).

What can I do?