12-09-2022 04:45 PM
Researching for a customer application. Trying to get a list of the user devices. When I go to the built in CUCM Web dialer page, it shows the extension mobility device in addition to the user's jabber device and a physical phone.
But, when I execute the webdialer API calls getProfileSoap or getProfileDetailSoap, I don't see the extension mobility device(s) listed.
How do you get the name of the device for the Webdialer API if the user is on EM and you're attemting to use the SOAP api to initate a call?
12-09-2022 06:04 PM
To get the name of the device for the Webdialer API if the user is on Extension Mobility (EM), you can use the getPhone
SOAP API call. This call allows you to retrieve the current active phone for a given user, which includes the device name, model, and other details.
Here is an example of how to use the getPhone
SOAP API call in a Webdialer API request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/12.5">
<soapenv:Header/>
<soapenv:Body>
<ns:getPhone>
<userid>jdoe</userid>
</ns:getPhone>
</soapenv:Body>
</soapenv:Envelope>
This API call will return a response similar to the following, which includes the device name for the user's active phone:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/12.5">
<soapenv:Header/>
<soapenv:Body>
<ns:getPhoneResponse>
<return>
<phone>
<name>EM_Device</name>
<model>9971</model>
<class>Phone</class>
<protocol>SIP</protocol>
<protocolSide>User</protocolSide>
<callingSearchSpaceName>EM_CSS</callingSearchSpaceName>
<devicePoolName>EM_DP</devicePoolName>
<locationName>EM_Location</locationName>
<mediaResourceListName>EM_MRGL</mediaResourceListName>
<ownerUserName>jdoe</ownerUserName>
<primaryPhoneName>EM_Device</primaryPhoneName>
<primaryExtension>1000</primaryExtension>
</phone>
</return>
</ns:getPhoneResponse>
</soapenv:Body>
</soapenv:Envelope>
12-09-2022 06:51 PM
That's very helpful. I'll note two things:
1. This function is NOT in the documentation I can find. Most of the documentation available is very old. The closest thing I can find to a function reference is the services list found at: https://<cucm>:8443/webdialer/services Interestingly, the Webdialer API guide covers 12.5, but doesn't mention this function: https://developer.cisco.com/docs/webdialer/#!webdialer-developer-guide/new-and-changed-information-for-cisco-unified-cm-release-12-5
2. The function also does not seem to exist in version 11.5.
Would you happen to know if this function is in ALL version 12.5 systems, or is it only after a certain SU?
12-09-2022 08:54 PM
When I wrote the previous response, I didn't realize that the reference provided was NOT the Webdialer API, but the AXL API. I have tried to duplicate the results, but have not been able to do so successfully yet. I've tried it in version 11.5, but it returns an error:
12-10-2022 12:49 AM
If the Device Profile is not logged in on a device you would not be able to do the query to find what device it is logged in to. Wouldn’t you say that’s quite given?
12-10-2022 01:44 PM
@Roger Kallberg , while that makes sense, keep in mind I have never used the AXL API before. I know it can be used for configuration, and in that sense, it would make sense that it would appear whether logged in or not. Like I said, I need to spend some additional time testing it, but I'm a bit concerned about the return I do get: <faultstring>No uuid or name element found</faultstring>
That isn't saying no record found, it's saying that I didn't provide an element it can use to search. It can in fact search and find records using "name". It doesn't seem to like "userid". When I look in the WSDL, searching on userid doesn't appear in the AXL toolkit WSDL I downloaded from a 12.5(1) SU1 system. The fact that it word for @MaxShantar is one of the reasons I specifically want to know exactly what version he is using.
12-13-2022 11:52 AM - edited 12-13-2022 12:06 PM
@MaxShantar , I am very confused here. I have built up a 12.5 CUCM with the latest SU, and it returns an error when I try this same query. The option to use a User ID doesn't seem to be in the WSDL. How are you getting this to work? The user is logged into a phone using EM, and the phone is registered. I literally cut and pasted your example and just changed the user name. Screen shot from postman below.
Can you please enlighten me as to how you got this to work?
01-04-2023 07:33 AM
@MaxShantar , still trying to find out how you got your code to work as it doesn't work with any of the builds I've tried in the lab (with the EM Profile logged in). They all complain as outlined above. Might you have time for a short phone call so I can understand how you did this? I'll send a PM as well about this...
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide