login | register
Sat 04 of Jul, 2009 [03:07 UTC]

voip-info.org

History

LDAP

Created by: szunny,Last modification on Tue 30 of Dec, 2008 [17:28 UTC] by cyrenity

Lightweight Directory Access Protocol


LDAP is an open-standard protocol for accessing X.500 directory services. The protocol runs over Internet transport protocols, such as TCP.

LDAP is a lightweight alternative to the X.500 Directory Access Protocol (DAP) for use on the Internet. It uses TCP/IP stack verses the overly complex OSI stack. It also has other simplications, such as the representing most attribute values and many protocol items as textual strings, that are designed to make clients easier to implement.

The directory is a database optimized for read operations.

You can access an LDAP directory in your dialplan with LDAPget.


You can use Asterisk::LDAP to generate Asterisk 1.0 compatible configuration files from LDAP.

The Source of application module LDAPget can be
downloaded from: http://www.mezzo.net/asterisk
.



Asterisk Ldap Realtime Usage


res_config_ldap.c is now part of the Asterisk 1.6.x Beta releases (as of Feb 2008). Download any asterisk 1.6.x beta release greater than 1.6.0beta2 and follow these:

Files you need to alter:
1. /etc/asterisk/extconfig
2. /etc/asterisk/res_ldap.conf
3. /etc/asterisk/extensions.conf (for realtime extensions)

Known Bugs:
1. Pattern matching extensions do NOT work
2. Queue Member lookup fails

To save on time, I am pasting my configuration files here. Please note that:

1. res_ldap.conf is a simple mapping of Asterisk Realtime values to ldap objects (you can name your ldap objectclasses/attributes whatever you want!)
2. Schema provided with the distribution does not conform to res_ldap.conf in the distribution. use THIS schema instead
Image

A lite note: it is best to rename your current res_ldap.conf and replace it with the attachement here. or copy the content of this attachement into the res_ldap.conf


my extconfig:

[settings]
sipusers => ldap,"dc=emergen,dc=biz",sip
sippeers => ldap,"dc=emergen,dc=biz",sip
voicemail => ldap,"dc=emergen,dc=biz",voicemail
voicemail_data => ldap,"dc=emergen,dc=biz",voicemail
extensions => ldap,"dc=emergen,dc=biz",extensions
queues => ldap,"dc=emergen,dc=biz",queue
queue_members => ldap,"dc=emergen,dc=biz",queue_member
musiconhold => mysql,asterisk
queue_log => mysql,asterisk
meetme => ldap,"dc=emergen,dc=biz",meetme
A little note: Copy this piece and place it at the bottom of the extconfig.conf


In extension.conf (For Realtime Extensions) you need to enable the switch to Realtime in that particular context:

For example:

[internal]
switch => Realtime/@


A sample res_ldap.conf file is attached here with complete mappings which adheres to the schema provided above:
Image


There is an auto install script available for installing asterisk 1.2 with realtime ldap driver support, check it out http://cyrenity.wordpress.com/2008/12/28/asterisk-12-with-realtime-ldap-driver/


Comments

Comments Filter
222

333usage

by baklap, Monday 13 of October, 2008 [14:47:32 UTC]
The schema he noted should be added to the schema directory of your SLAPD instance of your LDAP server.

I might as well add that: http://www.redhatmagazine.com/2008/07/24/open-source-telephony-a-fedora-based-voip-server-with-asterisk/

has a very nice guide as to how to get it working (it might be using FDS as an example, i am positive OpenLDAP and the likes will be able to work too with the ldif

(i've added 2 little notes to the page which might make it more explained as to what to do)
222

333

by ghenry, Tuesday 18 of March, 2008 [11:07:10 UTC]
LDAP Realtime is used to store everything you would find in static files in an LDAP Directory.
222

333

by ghenry, Tuesday 18 of March, 2008 [11:05:51 UTC]
The correct LDAP Schema is included:

/asterisk-1.6.0-beta4/contrib/scripts/asterisk.ldap-schema

and

/asterisk-1.6.0-beta4/contrib/scripts/asterisk.ldif

Good work though. I'm just uploading some fixes to it at:

http://bugs.digium.com/view.php?id=12177

Gavin.

http://www.suretecsystems.com/services/openldap/
222

333please elaborate on usage

by sjobeck, Monday 30 of May, 2005 [23:10:21 UTC]
szunny, could you kingly elaborate on this page a bit on what this does, how you are using LDAP, big picture stuff. We use LDAP for a few things but not sure (from reading above) what youre doing with it or what we could be doing with it. Really appreciate it.

Thanks very much.

Peace.

Jason