Asterisk cmd LDAPget

LDAPget


Synopsis

Retrieve a value from an LDAP directory server (e.g. OpenLDAP or ActiveDirectory).
LDAPget does not require you to use a specific LDAP schema.

Description

LDAPget(varname=config-file-section[/key1,key2,...])

To lookup the Caller-ID's name you could configure your extensions.conf like this:

exten => 1234,1,LDAPget(CALLERIDNAME=cidname/${CALLERIDNUM},${CALLERIDNUM})

The corresponding section In the ldap.conf file could look like this:

[cidname]
host = ldap.mydomain.com
version = 3
user = cn=root,ou=People,o=mydomain.com
pass = secret
filter = (&(objectClass=person)(|(telephoneNumber=%s)(fax=%s)))
base = ou=Addressbook,o=mydomain.com

The "%s"s will be replaced by key1,key2, etc.
Asterisk variables in 'filter' and 'base' will also be evaluated. So you could also write the example above like this:

exten => 1234,1,LDAPget(CALLERIDNAME=cidname)

with the following filter in ldap.conf

filter = (&(objectClass=person)(|(telephoneNumber=${CALLERIDNUM})(fax=${CALLERIDNUM})))

TIP: On Mac OS you can use AddressBook2LDAP to Export your AddressBook to an LDAP directory.

Return values

Always returns 0. If the requested key is not found, jumps to priority n+101 if available.

Version information

LDAPget() is not included in Asterisk releases or CVS, it's a third party application.
and it's downloadable from here

See also


Go back to Asterisk

LDAPget


Synopsis

Retrieve a value from an LDAP directory server (e.g. OpenLDAP or ActiveDirectory).
LDAPget does not require you to use a specific LDAP schema.

Description

LDAPget(varname=config-file-section[/key1,key2,...])

To lookup the Caller-ID's name you could configure your extensions.conf like this:

exten => 1234,1,LDAPget(CALLERIDNAME=cidname/${CALLERIDNUM},${CALLERIDNUM})

The corresponding section In the ldap.conf file could look like this:

[cidname]
host = ldap.mydomain.com
version = 3
user = cn=root,ou=People,o=mydomain.com
pass = secret
filter = (&(objectClass=person)(|(telephoneNumber=%s)(fax=%s)))
base = ou=Addressbook,o=mydomain.com

The "%s"s will be replaced by key1,key2, etc.
Asterisk variables in 'filter' and 'base' will also be evaluated. So you could also write the example above like this:

exten => 1234,1,LDAPget(CALLERIDNAME=cidname)

with the following filter in ldap.conf

filter = (&(objectClass=person)(|(telephoneNumber=${CALLERIDNUM})(fax=${CALLERIDNUM})))

TIP: On Mac OS you can use AddressBook2LDAP to Export your AddressBook to an LDAP directory.

Return values

Always returns 0. If the requested key is not found, jumps to priority n+101 if available.

Version information

LDAPget() is not included in Asterisk releases or CVS, it's a third party application.
and it's downloadable from here

See also


Go back to Asterisk

Created by: szunny, Last modification: Thu 12 of Jan, 2006 (17:55 UTC) by andres
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+