cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
11313
Views
32
Helpful
19
Replies

IP Phone Services SDK LDAPSearch filter

I would like to add an LDAP Search filter so that only AD user objects with an ipPhone value will be displayed on an IP Phone's corporate directory - using an IIS server so that I can query AD and span multiple child domains without being restricted by CUCM appliance to only 5 directory associations.

Attached is an example code provided by the Cisco IP Phone Services SDK but don't know how to add the LDAP filter on the ipPhone attribute.

Any ideas?

19 Replies 19

Aaron Harrison
VIP Alumni
VIP Alumni

Hi

I spent some time recently beating my head against those examples... then got bored and decided to write one myself.

See the attached..  not clever, not pretty, but works. Just adjust the line that points at the domain (currently set to dc=marsh,dc=local) to what you have.

I've set the LDAP filter in there so it picks up contacts and users with an ipPhone non-blank value. You can set the filter and list of attributes to retrieve to whatever you like... I've no idea how it behaves in multiple-domain scenarios however. Let me know how you get on...

Regards

Aaron

Please rate helpful posts!

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

Thanks

Hi Aaron,

I got your files for LDAP search and when I call 'LDAPInput.asp' it opens the search options correctly, but when I press 'search' to apply the filter, it answers 'error 404'  that seems page not found.

I think it's a IIS config issue. I have set IIS to work using port 8080, set the anonymous user and a valid domain user to search for LDAP.

Do you have any tip on this ?

Thanks a lot!

Hi

Yep - didn't cater for different ports in that one (like I say, I'm not a 'real' developer :-) )

Adding a bit to detect the port number and insert it to the generated URLs; hopefully this will work better for you.

Regards

Aaron

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

Hi,

I'm currently experimenting with your code and while I'm getting a list from the AD when call the LDAPlist.asp as a service I'm unable to get the search to work.

I see the fields and I'm able to enter the characters but pressing the search button doesn't seem to work.

Regs,

John

Hi

What happens when you search? Do you get an error, or just nothing at all?

Best thing to do would be to do a packet capture (server would be an easy place to do it, or from the back of the phone with pc port vlan access/span-to-pc port enabled); you'll be able to see whether the XML from the server looks OK and whether or not the phone attempts to do anything when you hit the button.

Post up a capture if you like.

Regards

Aaron

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

Gues I adjusted a little to much without paying close attention to comma's and quotes.

Got the search working now to return the mobile numbers.

Is there any way to get the full list returned in an alphabatical order?

Is it also supported to get both the ipPhone and the mobile returned in a single list?

Must compliment you on the effective way of tackling this CUCM limitation.

Still can't understand why Cisco doesn't include the mobile field in AD sync..

Hi

Sorting is easy enough - see attached.

Listing mobiles as well as internal extensions would require a bit of work - basically the 'directory' xml object had fairly static contents. To get two numbers selectable I'd have to reimplement as a menu listing peoples names, with two softkeys for 'mobile' and 'extn', or just pick someone from the menu and that would return any available numbers that would be selectable.

Regards

Aaron

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

Hi - Has anybody got a working script which they are prepared to share to display multiple numbers (e.g. ipPhone, mobile etc.) for a directory entry ?

yep. I have already realized  that...

changed:

Dim sURL: sURL = "http://" & request.servervariables("SERVER_NAME") & ":" & request.servervariables("server_port") & replace(request.servervariables("url"), "LDAPInput.asp", "LDAPList.asp")

worked!

Good to hear :-)

If you use it, please rate it.

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

Hi Aaron,

In your script which does a lookup in LDAP, where do you provide the LDAP IP and port?

thanks

Gaurav Singhal - CCIE # 27496 | Principal Consultant - UC

Presidio | 30 Stanford Drive, 2nd Floor, Farmington, CT 06032

gsinghal@presidio.com | SNR: 860.470.1918 | www.presidio.com

mbasiouny
Level 1
Level 1

Aaron, I made some changes to your scripts, simply added additional fields to allow search by Telephone number, but for some reason I cannot use Numpad, the script accepts only letters.

Is there a way to change this behavior?

Kind regards,

mbasiouny
Level 1
Level 1

Solved

Changing the T in the XML file has done the magic

But now I have yet another problem,

I made new changes to the script to parse the User's Mail and Department along with his Full name & Telephone.

When I open the script in a web browser, everything works as expected "see below"

However CIPC displays only the User's Full name and Telephone Number.

Any explanation

Thank you in advance


This XML file does not appear to have any style information associated with it. The document tree is shown below.
      


Full Directory Search
Select a Staff Member..


User's Name
1111
IT Department
xxxxx@xxxxx



Dial
SoftKey:Dial
1



Exit
SoftKey:Exit
4