cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
974
Views
10
Helpful
7
Replies

CUCM SOAP API - Crazy bug when listing users?

pescla
Spotlight
Spotlight

I am doing a very very simple user query on a customers Callmanager to generate a report.

 

Its basically this:

 

from zeep import *
from requests import auth
from requests import *
from urllib3 import disable_warnings
disable_warnings()
session = Session()
session.auth = auth.HTTPBasicAuth("Admin", "Password")
session.verify = False
client = Client(wsdl='AXL/AXLAPI.wsdl', transport = Transport(session=session))
service = client.create_service('{http://www.cisco.com/AXLAPIService/}AXLAPIBinding', "https://CUCM:8443/axl/")
criteria = {
    "userid": "901286"
}
tags = {
    "firstName": "",
    "userid": "",
    "lastName": "",
    "primaryExtension": {
        "pattern": ""},
    "directoryUri": "",
    "telephoneNumber": "",
    "department": "",
    "title": ""
}

resp = service.listUser(criteria, tags)
print(resp)

Impossible to do wrong, right?

Heres the crazy part: It works as expected on our own cluster (14.0.1.10000-20) - i put in an exact name, or use a % wildcard, and get back exactly what i expect.

 

But when i do the exact same query on the customers CM (12.5.1.13900-152), i do find the correct user result. But it returns it 56 times. Yes, fifty six. Its always 56. I have no clue what kind of magic number that is - it doesnt matter what i search for, my result is always multiplied by 56. Its pretty funny because its so absurd, but im really wondering what the hell could cause this. Any ideas?

7 Replies 7

npetrele
Cisco Employee
Cisco Employee

I tested this out to satisfy my curiosity and perhaps catch a defect, but it works fine for me. Are you using the right WSDL? Don't use the 12.5.1 WSDL, make sure you're using the 14.0 wsdl.

 

But here's another thing.  You're only looking for information about ONE user, so it doesn't make sense to use listUser.  Try getUser, instead.  listUser is for listing users who match a range, like "joe%" (where % is a wild card).

 

 

Oh, i didnt knew that - the WSDL i am using is indeed 12.5, i wouldnt have thought thats a problem since its working with my (14.0) CUCM but not with the 12.5 CUCM - i will try downloading a new WSDL from the CUCM im having the issue on

Hmm nope, WSDL for 14.0 wont work at all with a 12.5 CUCM... No idea where i can start checking what the issue could be..

Hi, I meant use the 14.0 WSDL with CUCM 14 and use the 12.5 WSDL with CUCM 12.5.

Of course, i did exactly that - didnt change anything sadly

I can't reproduce the problem here, so I'm afraid I'm out of suggestions.

Alright, i was not able to reproduce the issue either, on the same cluster there are also issues with bulk jobs not starting on their own, so ill probably open a bug case for this