====== Asterisk: Работа с LDAP ======
====== Настройка ======
FIXME
===== OpenLDAP =====
[[openldap:openldap|OpenLDAP]]
{{:asterisk:asterisk.ldif|asterisk.ldif}}
Добавление схемы:
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/asterisk.ldif
----
Источники схемы:
* http://svn.asterisk.org/svn/asterisk/trunk/contrib/scripts/asterisk.ldap-schema
* https://raw.githubusercontent.com/asterisk/asterisk/master/contrib/scripts/asterisk.ldap-schema
====== Поиск входящего в LDAP ======
FIXME
#!/bin/sh
LDAP_Host="ldap"
LDAP_Port="389"
LDAP_BaseDN="dc=domain"
num=$agi_callerid
CIDNAME=`ldapsearch -h "$LDAP_Host" -p $LDAP_Port -x -b "$LDAP_BaseDN" -LLL "(&(|(mobile=$num)(|(telephoneNumber=$num)) (|(homePhone=$num)) ) )" cn |\
grep ^cn::\
|awk '{print $2}' |\
base64 -d`
#echo $CIDNAME
if [ "$CIDNAME" = "" ]
then
exit 0;
else.
echo "SET CALLERID \"$CIDNAME\"<$agi_callerid>"
fi
exit 0;
====== Ссылки ======
[[http://www.theschmandts.org/blog/asterisk-caller-id-lookup-via-ldap-to-a-domino-directory|Asterisk caller id lookup via LDAP to a Domino Directory]]
[[http://asterisk.ru/knowledgebase/Asterisk+Realtime+Ldap|Asterisk Realtime LDAP драйвер]]
[[https://wiki.asterisk.org/wiki/display/AST/LDAP+Realtime+Driver|LDAP Realtime Driver]]
[[https://wiki.asterisk.org/wiki/display/AST/LDAP+Realtime+Driver|Asterisk Realtime Lightweight Directory Access Protocol (LDAP) Driver]]
http://svn.asterisk.org/svn/asterisk/trunk/contrib/scripts/asterisk.ldap-schema
http://svn.asterisk.org/svn/asterisk/trunk/contrib/scripts/asterisk.ldif
[[http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/ExternalServices_id291590.html|Asterisk: The Definitive Guide, Chapter 18. External Services: LDAP Integration]]
[[http://www.voip-info.org/wiki/view/LDAP|voip-info.org: LDAP]]
[[http://www.mezzo.net/asterisk/app_ldap.html|LDAPget application module for the Asterisk PBX]]
[[https://ensiwiki.ensimag.fr/index.php/Asterisk's_external_configuration_(LDAP)|Asterisk's external configuration (LDAP)]]
{{tag>Asterisk LDAP}}