[Ldap] Integration with asterisk 11.5

Hello All,

Since monday, i’m try to integrate use asterisk with Ldap and use realtime features … Ldap is hosted on CentOS 6.4 with 389DS and asterisk running on Debian 7.0.
Asterisk is compiled with ldap realtime support, and files are configured as below :

res_ldap.conf

[_general]
url=ldap://ldap.voxtest.fr:389
protocol=3
basedn="dc=voxtest,dc=fr"
user=cn=admin
pass=test1234

[config]
additionalFilter=(objectClass=AstConfig)
filename = AstConfigFilename
category = AstConfigCategory
variable_name = AstConfigVariableName
variable_value = AstConfigVariableValue
cat_metric = AstConfigCategoryMetric
commented = AstConfigCommented

[extensions]
context  =  AstContext
exten  =  AstExtension
priority = AstPriority
app = AstApplication
appdata = AstApplicationData
additionalFilter=(objectClass=AsteriskExtension)

[sippeers]
name = cn
amaflags = AstAccountAMAFlags
callgroup = AstAccountCallGroup
callerid = AstAccountCallerID
canreinvite = AstAccountCanReinvite
context = AstAccountContext
dtmfmode = AstAccountDTMFMode
fromuser = AstAccountFromUser
fromdomain = AstAccountFromDomain
fullcontact = AstAccountFullContact
host = AstAccountHost
ipaddr = AstAccountIPAddress
insecure = AstAccountInsecure
mailbox = AstAccountMailbox
md5secret = AstMD5secret
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
defaultuser = AstAccountDefaultUser
regserver = AstAccountRegistrationServer
additionalFilter = (objectClass=AsteriskSIPUser)

And my sip.conf (simple):

[general] videosupport=yes allow=all bindaddr=0.0.0.0 realm=voxtest.fr rtcachefriends=yes

and my extensions.conf :

[code][c001]
switch => Realtime/@

[c002]
switch => Realtime/@

[default]
switch => Realtime/@
[/code]

When i start asterisk, no problem, realtime status is ok :

realtime show ldap status Connected to 'ldap://ldap.voxtest.fr:389', baseDN "dc=voxtest,dc=fr" with username cn=admin for 17 minutes, 38 seconds.

But when i try to connect one sip user, i have this message :

[Aug  7 10:25:29] NOTICE[3785]: chan_sip.c:27919 handle_request_register: Registration from '<sip:c001-1000@sip.voxtest.fr>' failed for '192.168.16.106:5060' - Wrong password

Password has been hashed by md5 and stored in AstMD5 secret …

I don’t understand why my users can not register … Could you please help me to debug this case ?

Thanks in advance,
Loic.

Hello,

One import missing information, sip account will be save, for each client, on a sub-tree.

Example:

dc=voxtest,dc=fr
|--- ou = clients
      |---ou = client1
          |--- ou = sippeers
          |     |--- dn = c001-1000
          | --- ou = extensions
          |     |---dn = c001-100-1

I think asterisk is able to pick sip account on each subtree but not sure. Could you please confirm ?
Regards,
Loic.