How can we help you today?
Start a new topic

Incoming number lookup via LDAP not working

Hi,


I've setup LDAP lookup, basic connection is just fine and I can search the addressbook for names.

However incoming calls aren't translated back to names, only the number is shown.

The ldap query looks fine and Apache Directory Studio returns the correct result for it.

My config:

 

<ldap_search_filter perm="RW">
(&(|(telephoneNumber=*)(Mobile=*)(homePhone=*))(|(cn=*%*)(company=*%*)))
</ldap_search_filter>
<ldap_number_filter perm="RW">
(|(telephoneNumber=*%*)(Mobile=*%*)(homePhone=*%*))
</ldap_number_filter>
<ldap_search_filter_during_call perm="RW">
(&(|(telephoneNumber=*)(Mobile=*)(homePhone=*))(|(cn=*%*)(company=*%*)))
</ldap_search_filter_during_call>
<ldap_number_filter_during_call perm="RW">
(|(telephoneNumber=*%*)(Mobile=*%*)(homePhone=*%*))
</ldap_number_filter_during_call>
<ldap_name_attributes perm="RW">displayName</ldap_name_attributes>
<ldap_number_attributes perm="RW">Mobile telephoneNumber homePhone</ldap_number_attributes>
<ldap_display_name perm="RW">displayName</ldap_display_name>
<ldap_sort_parameters perm="">displayName o telephoneNumber Mobile</ldap_sort_parameters>
<prioritise_asserted perm="">off</prioritise_asserted>

 snomD785-SIP 10.1.42.14 on sipgate team


openldap in debug mode says:
5d9bbf08 SRCH "ou=addressbook,dc=phone,[basedn]" 2 0 50 0 0

5d9bbf08 filter: (|(|(telephoneNumber=*+49175[restofnumber]*)(mobile=*+49175[restofnumber]*)(homePhone=*+49175[restofnumber]*))(|(telephoneNumber=*0175[restofnumber]*)(mobile=*0175[restofnumber]*)(homePhone=*0175[restofnumber]*)))

5d9bbf08 attrs: displayName Mobile telephoneNumber homePhone jpegPhoto

5d9bbf08 mdb_idl_fetch_key: [b49d1940]

5d9bbf08 <= mdb_substring_candidates: (telephoneNumber) not indexed

5d9bbf08 <= mdb_substring_candidates: (mobile) not indexed

5d9bbf08 <= mdb_substring_candidates: (homePhone) not indexed

5d9bbf08 <= mdb_substring_candidates: (telephoneNumber) not indexed

5d9bbf08 <= mdb_substring_candidates: (mobile) not indexed

5d9bbf08 <= mdb_substring_candidates: (homePhone) not indexed

5d9bbf08 send_ldap_result: err=0 matched="" text=""

(Need to work on index settings, I know).

result when fetched via directory studio has cn, sn, mobile, telephonenumber all set just fine.


OK, for everyone coming here from google.

Debug2 told me that the phone doesn't like the display name value. It needs to be

<ldap_display_name perm="RW">%displayName</ldap_display_name>

so with a % in front...

For everyone coming from google. It missed a %, as DEBUG2 logging told me.
Need to be 

 

<ldap_display_name perm="RW">displayName</ldap_display_name> 
should be 
<ldap_display_name perm="RW">%displayName</ldap_display_name>

 

Login or Signup to post a comment