Ich habe eine Weile gebraucht um den Asterisken zu überreden das er die SIP User gegen eine LDAP DB authentifiziert, hier mal meine Gedanken und Schnipsel dazu. Getestet habe ich das hier mit einem FreeBSD und Asterisk in der Version 1.6.1.4, vermutlich geht auch die Version aus den Ports, das teste ich noch.

Die wichtigsten Punkte:

LDIF eines Users:

dn: cn=hdampf,ou=sipclient,dc=blacktux,dc=de
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
objectClass: AsteriskSIPUser
givenName: Hans
sn: Dampf
uid: hdampf
userPassword: {MD5}gdyb21LQTcIANtvYMT7QVQ==
uidNumber: 1000
gidNumber: 1000
homeDirectory: /home/users/hdampf
cn: hdampf
AstAccountHost: dynamic
AstAccountRealmedPassword: {md5}de1d958500a7c4a50fd44c69f12afad0

res_ldap.conf:

[_general]
url=ldap://10.0.100.49:389
protocol=3                          ; Version of the LDAP protocol to use; default is 3.
basedn=dc=blacktux,dc=de                     ; Base DN
user=cn=ldapAdmin,dc=blacktux,dc=de                           ; Bind DN
pass=1234                     ; Bind password

[sip]
name = cn
amaflags = AstAccountAMAFlags
callgroup = AstAccountCallGroup
callerid = AstAccountCallerID
canreinvite = AstAccountCanReinvite
context = AstAccountContext
dtmfmode = AstAccountDTMFMode
fromuser = AstAccountFromUser
fromdomain = AstAccountFromDomain
fullcontact = AstAccountFullContact
fullcontact = gecos
host = AstAccountHost
insecure = AstAccountInsecure
mailbox = AstAccountMailbox
md5secret = AstAccountRealmedPassword
nat = AstAccountNAT
deny = AstAccountDeny
permit = AstAccountPermit
pickupgroup = AstAccountPickupGroup
port = AstAccountPort
qualify = AstAccountQualify
restrictcid = AstAccountRestrictCID
rtptimeout = AstAccountRTPTimeout
rtpholdtimeout = AstAccountRTPHoldTimeout
type = AstAccountType
disallow = AstAccountDisallowedCodec
allow = AstAccountAllowedCodec
MusicOnHold = AstAccountMusicOnHold
regseconds = AstAccountExpirationTimestamp
regcontext = AstAccountRegistrationContext
regexten = AstAccountRegistrationExten
CanCallForward = AstAccountCanCallForward
ipaddr = AstAccountIPAddress
defaultuser = AstAccountDefaultUser
regserver = AstAccountRegistrationServer
additionalFilter=(objectClass=AsteriskSIPUser)

sip.conf:

[general] 
context=default
allowguest=no
allowoverlap=no
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
srvlookup=yes
alwaysauthreject = yes
rtupdate=no

[authentication]

extconfig.conf:

[settings]
sippeers = ldap,"dc=blacktux,dc=de",sip
sipusers = ldap,"dc=blacktux,dc=de",sip

Schema Datei:

asterisk.schema.txt

 
asterisk_ldap.txt · Zuletzt geändert: 2009/08/13 15:39 von alehmann
 
Falls nicht anders bezeichnet, ist der Inhalt dieses Wikis unter der folgenden Lizenz veröffentlicht:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki