Unable to register using LDAP

I am trying to use our LDAP (Active Directory, to be honest) to register SIP peers in my asterisk (Elastix, to be honest).

I can see my LDAP server,
realtime show ldap status
Connected to ‘ldap://’, baseDN DC=CM,DC=GOV,DC=AR with username cn=phone_ip,ou=Genericos,DC=CM,DC=GOV,DC=AR for 43 minutes, 43 seconds.

and can get information from it (I deleted information that is not related to my problem)
realtime load sipusers name “deira*”
_ Column Name Column Value_
_ -------------------- --------------------_
_ objectClass top_
_ objectClass person_
_ objectClass organizationalPerson_
_ objectClass user_
_ cn Deira, Martin_
_ sn Deira_
_ c AR_
_ l C.A.B.A._
_ st C.A.B.A._
_ physicalDeliveryOfficeName TECNOLOGIA_
_ instanceType 4_
_ whenCreated 20160502143023.0Z_
_ whenChanged 20171018143457.0Z_
_ name Deira, Martin_
_ uSNCreated 26271_
_ garbageCollPeriod 1209600_
_ mDBUseDefaults TRUE_
_ mailNickname martin.deira_
_ badPasswordTime 131528030821137836_
_ lastLogoff 0_
_ lastLogon 131528030884733170_
_ callerid 6100_
_ context from-internal_
_ md5secret d5b3d4000a39a350518a29442b77972c_
_ dtmfmode RFC2833_

I have generated the md5secret in all possible ways I could think of, and/or read on different posts. I have changed the realm in the SIP config files, I have used the password alone and in combinations like “callerId:realm:password” All to no avail, I still get the message
[2017-10-18 11:48:37] NOTICE[4928] chan_sip.c: Registration from ‘sip:6100@rtpbx’ failed for ‘’ - Wrong password

Does anybody out there know what do I have to put in there I order to make it work ?
Thanks in advance.