cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1137
Views
20
Helpful
7
Replies

Webdialer and extension mobility

Clifford McGlamry
Spotlight
Spotlight

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?  

7 Replies 7

MaxShantar
Cisco Employee
Cisco Employee

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>

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?

 

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:

<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <soapenv:Fault>
            <faultcode>soapenv:Server</faultcode>
            <faultstring>No uuid or name element found</faultstring>
            <detail>
                <axlError>
                    <axlcode>5003</axlcode>
                    <axlmessage>No uuid or name element found</axlmessage>
                    <request>getPhone</request>
                </axlError>
            </detail>
        </soapenv:Fault>
    </soapenv:Body>
</soapenv:Envelope>
 
But, if I change the request from UserID to Name, and change the user name value to the name of a phone, it works.  Apparently finding devices by name isn't supported in version 11.5 in the AXL API, at least not with the getPhone call.
 
I have a 12.5(1) SU1 machine in my lab, and I tried it there.  When I make the call into it, it gets the same error.  The device profile isn't logged in (I'm going to have to attach some phones to it and spend some more time on setup to see if logging in the DP fixes it...or if I have to go to a specific version.  
 
I've never used the AXL API before, and from my perspective, it's certainly not as clear as it could be.  The WSDL arrangement is almost unreadable the way it's put together (again, to me).  Frustrating....

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?



Response Signature


@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.  

@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?

 

CliffordMcGlamry_0-1670961146088.png

 

Clifford McGlamry
Spotlight
Spotlight

@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...