Project

General

Profile

Actions

Feature #20

closed

Possibility to sort LDAP output

Added by Andreas Vitting about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
10/13/2020
Due date:
10/27/2020
% Done:

100%

Estimated time:
4:00 h

Description

Some voice over IP phones are not able to sort LDAP phonebook.
Please add in config file a parameter sort with different attributes.

Examples
sort = cn
sort = sn, givenname

Result
LDAP is sorted by criteria above before transferred to IP phone


Files

image001.png (33 KB) image001.png Andreas Vitting, 10/15/2020 12:06 AM
l2cpbg-0.8.1-beta-1-linux-x64.tgz (21.5 MB) l2cpbg-0.8.1-beta-1-linux-x64.tgz Jörg Ebeling, 10/18/2020 11:13 PM
Actions #1

Updated by Jörg Ebeling about 4 years ago

Hi Andreas,

thanks a lot for this useful sounding feature request.

Just did a quick look to the sources, and for sure, it should be
implementable.

However, I got the idea about a useful sorting, without additional config
parameter, and less generic (an L2CPBG config option would affect all
connected phones).
So I had the idea to use i.e. the "LDAP Name Attribute" like available
in Yealink phones: Readme_080

The idea behind it is, that if one want to get the names listed by "cn
company", then for sure he's also interested to get them sorted in that
order.
In addition another phone user keep the individuality to list(& sort)
them i.e. by "firstName lastName".

Unfortunately, the documentation I found about your Fanvil X4 is quite
slim, whereas Fanvil has a generic LDAP documentation
https://www.fanvil.com/Uploads/Temp/download/20191219/5dfb106241ad5.pdf
in which they show a phone-config-screen with the possibility to enter
an "Sort Attribute" (Page 39).

Are you able to send me an image of your phone's LDAP setting options,
or acknowledge the existence of that "Sort Attribute" field in your
relevant phone(s)?

Greetings, Jörg

Actions #2

Updated by Andreas Vitting about 4 years ago

Hi!

I found this sort parameter in documentation too, but this parameter is only available on X5 and above. X4 and below is not able to sort.

Other phones are able to sort LDAP phone book internally, so it doesn’t matter, if LDAP output is sorted or not. If not needed, this config parameter should be simply empty (same behavior as right now).

Sort parameter has nothing to do with mapping, correct? All users have to define, what they want to see on their phone. If I look into your program debug output, I can examine all parameter names, your program is using to map CARDDAV to LDAP.

These parameter should be used to set the sort order.

Best regards

Andreas

Von: <>
Gesendet: Mittwoch, 14. Oktober 2020 13:29
Betreff: [L2CPBG - Feature #20] Possibility to sort LDAP output

Actions #3

Updated by Jörg Ebeling about 4 years ago

Hi Andreas,

Andreas Vitting wrote:

...
I found this sort parameter in documentation too, but this parameter is only available on X5 and above. X4 and below is not able to sort.

Good, that we clarified this. Would be useless if some older or lower phones can't use it.

Other phones are able to sort LDAP phone book internally, so it doesn’t matter, if LDAP output is sorted or not. If not needed, this config parameter should be simply empty (same behavior as right now).

I agree

Sort parameter has nothing to do with mapping, correct? All users have to define, what they want to see on their phone. If I look into your program debug output, I can examine all parameter names, your program is using to map CARDDAV to LDAP.

These parameter should be used to set the sort order.

The mapping is only used to map CardDAV fields to LDAP Attributes. I practice there's a small SQL DB between them.

Luckily your phone config has the "Namen Anzeigen" option and I think we shall use this also for sorting. It get send for each LDAP name lookup request, so I'm able to catch that.
And in my interpretation it would be fully logical: If someone want the names displayed as "cn company" the I guess he also expect them in "cn company" order ;-)

Thanks a lot for your feedback/support!

Actions #4

Updated by Jörg Ebeling about 4 years ago

  • Estimated time changed from 2:00 h to 4:00 h
Actions #5

Updated by Jörg Ebeling about 4 years ago

  • Status changed from New to In Progress
Actions #6

Updated by Jörg Ebeling about 4 years ago

  • % Done changed from 0 to 50
Actions #7

Updated by Jörg Ebeling about 4 years ago

  • % Done changed from 50 to 100
Actions #8

Updated by Jörg Ebeling about 4 years ago

  • Status changed from In Progress to Resolved
Actions #9

Updated by Jörg Ebeling about 4 years ago

Hi Andreas,

sorting should work now.

Attached please find an early beta of the upcoming 0.8.1 release.

If it doesn't sort as expected, please take a look to the debug output of "setSqlOrder()" or "doSearch(), req.sql = ...". Both list the attributes (in order) used for the sorting.

Looking forward to your feedback ;-)

Cya
Jörg

Actions #10

Updated by Jörg Ebeling about 4 years ago

  • Status changed from Resolved to Closed

Andreas acknowledged via Mail:

Hi Jörg,

Good work! Tested different settings (sn, givenname, cn and company).

All combinations worked as expected.

One additional question, perhaps nothing to do with this feature.

IP-Phone shows always two spaces between words. Is this related to my phone, or related to the LDAP server return value? Btw I do not see any spaces in the debug output from server…

Thank you very much for implementing this feature, it helps a lot make my phone more useable together with LDAP ;-)

Andreas

Actions

Also available in: Atom PDF

Go to top