Asterisk and LDAP integration

Hello,
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://192.168.0.101:389’, 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.

Hello,

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 “realm=something.com

2)making the hash:
echo -n :<something.com>: | 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
433be2548da27948e0e9ac8087227bbb

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@192.168.2.221:5060;transport=UDP’ failed for ‘192.168.2.1:64022’ - Wrong password