×

Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

PhotoDirectory - LDAP Credentials

Answered Question
Sep 21st, 2005
User Badges:

Hello All,

I have playing around with the SDK and think that my LDAP string is incorrect, as I can run a search but do not get any matches. Is this the correct:


String ldapServer = "callmanager";

int ldapPort = 8404;

String ldapRoot = "o=cisco.com";

String ldapUserId = "cn=UserID, cn=Users, o=cisco.com";

String ldapPassword = "***";


Does that seem right to people?


Also, has anyone found a way to make the intercom ASP example terminate on both ends when one user exits? I have been told to send a CiscoIPPhoneExecute RTPTx:Stop command but it doesn't terminate either end.


All help would be much appreciated! Thanks

Correct Answer by aaronw.ca about 11 years 11 months ago

From the photodirectory web page:


"In order for the user's photo to appear, the photoUrl specified below must point to a web page which returns JPG, GIF, or PNG images. This script will append the userID of the user directly onto the end of the photoUrl string and attempt to load the image. For example, when requesting the photo for 'kstearns' using the default photoUrl below, the following URL -

http://directory.cisco.com/get_picture.cgi?name=kstearns

must return a valid photo for that user."


So you need another web application that the photoUrl points to that takes a userid parameter and returns a photo for that person. So that web application would have a list of photographs, perhaps in the format:

.jpg

and when it gets a request such as

http://directory.cisco.com/get_picture.cgi?name=kstearns

it returns kstearns.jpg.


Hope that helps!

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
aaronw.ca Thu, 09/22/2005 - 06:17
User Badges:
  • Silver, 250 points or more

Try changing your ldap userid from cn=Users to ou=Users, such as:

String ldapUserId = "cn=UserID, ou=Users, o=cisco.com";

and see if that helps...

mattiep00 Thu, 09/22/2005 - 22:44
User Badges:

That works perfectly! I thought that my LDAP syntax was incorrect...I am getting no photo however, can the photos be loaded anywhere? Just in the format username.jpg?


String photoUrl = "http://server/get_picture.cgi?name="


Thanks for your assistance!

Correct Answer
aaronw.ca Fri, 09/23/2005 - 10:02
User Badges:
  • Silver, 250 points or more

From the photodirectory web page:


"In order for the user's photo to appear, the photoUrl specified below must point to a web page which returns JPG, GIF, or PNG images. This script will append the userID of the user directly onto the end of the photoUrl string and attempt to load the image. For example, when requesting the photo for 'kstearns' using the default photoUrl below, the following URL -

http://directory.cisco.com/get_picture.cgi?name=kstearns

must return a valid photo for that user."


So you need another web application that the photoUrl points to that takes a userid parameter and returns a photo for that person. So that web application would have a list of photographs, perhaps in the format:

.jpg

and when it gets a request such as

http://directory.cisco.com/get_picture.cgi?name=kstearns

it returns kstearns.jpg.


Hope that helps!

mattiep00 Mon, 10/03/2005 - 20:51
User Badges:

I have now successfully gotten this working! Thank you very much for your help. For all the others out there, I needed to edit the photodirectory.jsp file to include the extension of the filetypes - Eg .jpg

photoUrlObj = new URL(photoUrl + userId + photoExt);


This is now working a treat! (Crappy picture on a 7940 however!)


Thanks for your assistance aaronw!

Actions

This Discussion