Feature #20
closedPossibility to sort LDAP output
100%
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
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
Updated by Andreas Vitting about 4 years ago
- File image001.png image001.png added
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: projects@shbe.net <projects@shbe.net>
Gesendet: Mittwoch, 14. Oktober 2020 13:29
Betreff: [L2CPBG - Feature #20] Possibility to sort LDAP output
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!
Updated by Jörg Ebeling about 4 years ago
- Estimated time changed from 2:00 h to 4:00 h
Updated by Jörg Ebeling about 4 years ago
- Status changed from New to In Progress
Updated by Jörg Ebeling about 4 years ago
- Status changed from In Progress to Resolved
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
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