[Freeswitch-users] Freeswitch Ldap Integration

John Skopis (Lists) jlists at skopis.com
Wed May 28 21:12:55 EDT 2008


At one point I was very interested in this...then I got a job. =[

I thought mod_ldap was more of a PoC than anything. It might work (I 
couldn't get it working and unfortunately don't remember exactly why..) 
but there really isn't much point. I would have to do at least 5 ldap 
queries (if not more) to get the most of the same functionality as the 
XML dialplan. Also, the elegance of stackable functionality in the XML 
dialplan is hard to imitate, at least with the any amount of efficiency. 
If you don't need to stack actions a regular expression will almost 
certainly be better.

Attached is the schema, config, and sample ldif I used to get the xml 
stuff working.

With a little effort it could work with an existing schema (possibly the 
ITU recomended LDAP schema that ser uses). I am not sure how easy it 
would be to get the same flexibility as key/value pairs (like the FS xml 
uses) though.

-John

Anthony Minessale wrote:
> We have a concept called the "directory interface" not to be confused 
> with the "user directory".
> The directory interface is a pluggable abstract API that looks and feels 
> like LDAP only you can plug in anything you want to implement the 
> functions.
> 
> mod_ldap is a module that registers to this interface and connects LDAP 
> to it.  So essentially you load mod_ldap then you use the freeswitch 
> directory interface as you would have used the ldap code and it will 
> carry over.
> 
> There is a mod_dialplan_directory who uses the directory interface to 
> ask for a dialplan, and installs the results into an extension.  In the 
> case of mod_ldap obviously it allows you to get your dialplan from LDAP.
> 
> Now also in mod_ldap, there is some code someone recently contributed to 
> tie our XML interface to LDAP,
> This is more interesting because then when anything in FreeSWITCH tries 
> to lookup a user, dialplan entry or anything else in our XML config, all 
> the important details are passed to LDAP where it can make a query, pull 
> the info out of LDAP and deliver it back to FreeSWITCH as the XML it was 
> looking for.  This allows you to make all of the registrations, dialplan 
> etc real time driven by LDAP, you can also bind a perl or lua script to 
> this operation as well as mod_xml_curl who will turn the request into an 
> HTTP post to a web server to fetch the data.
> 
> 
> 
> On Wed, May 28, 2008 at 8:09 AM, Michael Jerris <mike at jerris.com 
> <mailto:mike at jerris.com>> wrote:
> 
>     Currently the directory interface is only used for that dialplan, I
>     would like to enhance that in the future.  The directory dialploan
>     uses a filter of exten=destination number, and then has name/value
>     pairs, I will see if I can find the schema we used back when we
>     developed it, short of that, the code is the best reference on that.
>     Another option is to use mod_xml_curl and have your cgi back end to
>     ldap of your choice.   This will give you more flexibility to use
>     other caller information in your ldap lookup.
> 
>     Mike
> 
>     On May 28, 2008, at 1:58 AM, Faraz R. Khan wrote:
> 
>      > First of all- Amazing project. Tired of asterisk deadlocking all the
>      > time we have been deploying asterisk with OpenSER as the registrar.
>      > Freeswitch is a huge relief!
>      >
>      > This is an extremely important feature we have been looking for.
>      > Asterisk realtime ldap integration is very flaky. I found this page:
>      >
>      > http://wiki.freeswitch.org/wiki/FreeSwitch_Dialplan_Directory
>      >
>      > But there are no clues as to the schema, the queries generated and
>      > what
>      > exactly it can hold in Ldap. I am also curious to know whether
>     sofia's
>      > sip registrations, gateways etc can be kept in LDAP.
>      >
>      > We are basically developing an extensive plugin based control panel
>      > and
>      > a Asterisk module is already ready. However, we are writing
>      > asterisk .conf files for managing asterisk. We would be quite
>      > pleased to
>      > develop a FreeSwitch Ldap plugin to manage users,sip gateways,
>     groups,
>      > features, etc.
>      >
>      > Though the XML configuration file is extremely easy to parse and
>      > write,
>      > pure LDAP integration would be amazing. Any pointers on this would be
>      > appreciated.
>      >
>      >
>      > --
>      > Faraz R Khan
>      > Chief Architect
>      > Emergen Consulting Pvt Ltd
>      > +92.21.529.0381 x200
>      > www.emergen.biz <http://www.emergen.biz>
>      >
>      >
>      > _______________________________________________
>      > Freeswitch-users mailing list
>      > Freeswitch-users at lists.freeswitch.org
>     <mailto:Freeswitch-users at lists.freeswitch.org>
>      > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>      >
>     UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>      > http://www.freeswitch.org
> 
> 
>     _______________________________________________
>     Freeswitch-users mailing list
>     Freeswitch-users at lists.freeswitch.org
>     <mailto:Freeswitch-users at lists.freeswitch.org>
>     http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>     UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>     http://www.freeswitch.org
> 
> 
> 
> 
> -- 
> Anthony Minessale II
> 
> FreeSWITCH http://www.freeswitch.org/
> ClueCon http://www.cluecon.com/
> 
> AIM: anthm
> MSN:anthony_minessale at hotmail.com 
> <mailto:MSN%3Aanthony_minessale at hotmail.com>
> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com 
> <mailto:PAYPAL%3Aanthony.minessale at gmail.com>
> IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch
> 
> FreeSWITCH Developer Conference
> sip:888 at conference.freeswitch.org 
> <mailto:sip%3A888 at conference.freeswitch.org>
> iax:guest at conference.freeswitch.org/888 
> <http://iax:guest@conference.freeswitch.org/888>
> googletalk:conf+888 at conference.freeswitch.org 
> <mailto:googletalk%3Aconf%2B888 at conference.freeswitch.org>
> pstn:213-799-1400
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sample.ldif
Url: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080528/0d1fd4f7/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: garbageschema.schema
Url: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080528/0d1fd4f7/attachment-0001.pl 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xml_ldap.conf.xml
Type: text/xml
Size: 595 bytes
Desc: not available
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080528/0d1fd4f7/attachment.xml 


More information about the Freeswitch-users mailing list