Asterisk and LDAP integration

I am trying to integrate Asterisk and openLDAP, to authenticate SIP users by LDAP.
I have installed openLDAP and Asterisk on same box Ubuntu.
I can add users to openLDAP, but not able to authenticate, while authenticating it says wrong password.

I go through asterisk definitive guide for such integration,

Below command shows ldap connected from asterisk cli,
realtime show ldap status
Connected to ‘ldap://’, baseDN dc=sam,dc=com with username cn=admin,dc=sam,dc=com for 3 hours, 31 minutes, 40 seconds.

But not able to authenticate, please help.


did you fill hashed password to AstAccountRealmedPassword in LDAP ? I was having the same problems, but making it right did the trick.

  1. sip.conf
    add “

2)making the hash:
echo -n :<>: | md5sum

  1. fill it in, restart asterisk and register

Same issue here, if anyone please help.

servuspruebas2*CLI> realtime show ldap status
Connected to ‘ldap://localhost:389’, baseDN dc=inf with username cn=admin,dc=inf for 37 seconds.

servuspruebas2*CLI> sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status Description Realtime
juanan (Unspecified) D Auto (No) No 0 Unmonitored Cached RT
1 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 1 offline]

in sip.conf --> realm=inf

root@servuspruebas2:~# echo -e “juanan:inf:juanan” | md5sum

in user_juanan.ldif --> AstAccountRealmedPassword: 433be2548da27948e0e9ac8087227bbb

and when I try to do the authentication:

[Oct 23 22:36:15] NOTICE[1665]: chan_sip.c:27891 handle_request_register: Registration from ‘sip:juanan@;transport=UDP’ failed for ‘’ - Wrong password