powered by Jive Software

How to display additional LDAP fields on roster (like the telephone-number)


if I add some users (LDAP) on my roster it will show me “firstname lastname” as contact, example:

Frank Niedermann

That’'s fine (better than username@server) but it would be superior if another LDAP field could be appended, like the telephone number:

Frank Niedermann 225

Is that possible?



Message was edited by:



That’'s not possible out of the box. However, you could provide you own implementation of the LdapUserProvider class that did this by extending or copying the current implementation.



ignore this message

Message was edited by:

Frank Niedermann

Hi Matt,

with the help of a colleague I just managed to display the telephone numbers on the roster.

Is it possible to integrate the changes I did to the source distribution into the binary distribution?

If that would be possible I wouldn’'t need to use the source package for my live environment …

I searched for some files named ldap* but the binary distribution contains none.



Here is a patch for the cvs version of messenger (05-02-17) if somebody is also interested in this modification:


(sorry I can not attach it directly to this message)

Use it this way:

  1. get the source/cvs of Messenger and put them into the directory messenger

  2. copy the patch into the same directory where the messenger directory is

drwxr-xr-x 6 root root 4096 Feb 17 10:06 messenger

-rw-rr 1 root root 4132 Feb 17 10:48 patch-messenger-ldaptelephone-cvs050217

  1. patch the sources

patch -p0 < patch-messenger-ldaptelephone-cvs050217

patching file messenger/src/java/org/jivesoftware/messenger/ldap/LdapManager.java

patching file messenger/src/java/org/jivesoftware/messenger/ldap/LdapUserProvider.java

Compile and use Messenger, after that your users will get a roster like this:


Note: this is a “quick” modification of the source, I’‘m not sure if it’‘s qualified Java source and it’'s not approved by any of the Jive developers.



I’'ve updated the patch to match the Messenger 2.1.2 source:


This is what I do to get the telephonenumber-feature into the 2.1.2 package (not source) to enjoy the messenger startup script:

/usr/jivemessenger # tar xvfz jive_messenger_src_2_1_2.tar.gz

/usr/jivemessenger # patch -p0 < telephonepatch-messenger_src_2_1_2.patch

/usr/jivemessenger/jive_messenger_src_2_1_2/build # ant

/usr/jivemessenger # tar xvfz jive_messenger_2_1_2.tar.gz

/usr/jivemessenger # cp -r jive_messenger_src_2_1_2/target/jspc jive_messenger/

/usr/jivemessenger # cp jive_messenger_src_2_1_2/target/lib/*.jar jive_messenger/lib/

/usr/jivemessenger # cp jive_messenger_src_2_1_2/target/plugins/admin/webapp/WEB-INF/lib/admin-jsp.jar jive_messenger/plugins/admin/webapp/WEB-INF/lib/admin-jsp.jar

/usr/jivemessenger/jive_messenger/bin # ./messenger start

Starting messenger

That’'s it and it seems to work fine (at least for my environment).

Hope this helps anybody who also wants to have this feature, btw is anybody using this?