08-14-2018 08:09 AM
I am using Python to automate the User Device association, what I have achieved is making an association of device to a User using the following call:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body> <axl:updateUser xmlns:axl="http://www.cisco.com/AXL/API/1.0" sequence="12055"> <userid>ar</userid> <associatedDevices> <device>SEP12334555D455</device> </associatedDevices> </axl:updateUser > </SOAP-ENV:Body> </SOAP-ENV:Envelope>
But now what I want to achieve is the association UserID in a Phone. is this possible with a single API call? What might the syntax of the XML be?
08-14-2018 10:03 AM
If you're referring to the 'Owner User ID' field in the phone config, this can be updated via <updatePhone> and the <ownerUserId> element. Note that the user->device association and the Owner User ID field are used for somewhat different purposes (the latter is mainly an indicator for licensing.)
08-15-2018 09:34 PM
08-15-2018 09:54 PM
I am using the following call to associate the OwnerId in a Phone Config and change the Owner from anonymous to user. I am using Python to run the code, it's showing successful updation, but the changes are not reflected in the Call Manager. is there anything I am doing wrong:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body> <axl:updatePhone xmlns:axl="http://www.cisco.com/AXL/API/1.0" sequence="12055"> <ownerUserId>john.doe</ownerUserId> <owner>User</owner> <name>SEP987654321098</name> </axl:updatePhone> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
08-15-2018 10:07 PM
Hi,
The value of ownerUserId is uuid, not the name
I changed it as follows
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<axl:updatePhone xmlns:axl="http://www.cisco.com/AXL/API/1.0" sequence="12055">
<ownerUserId>User's Uuid</ownerUserId>
</axl:updatePhone>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
You need to get uuid of john.doe as in your sample.
Hope it would help you.
Regards,
T Doan
08-15-2018 10:57 PM
08-15-2018 11:13 PM
Hi,
The uuid will be created automatically after adding a new user.
I used getUser to get the user's details as shown below
//
....
<ns:getUser sequence="1">
<userid>Agent001</userid>
<returnedTags><firstName/><lastName/><userid/>
</returnedTags>
</ns:getUser>
....
//getUserResponse
<?xml version="1.0"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:getUserResponse xmlns:ns="http://www.cisco.com/AXL/API/10.0">
<return>
<user uuid="{33CF90D3-7E96-A544-7995-426828546118}">
<firstName>Jane</firstName>
<lastName>Doe</lastName>
<userid>Agent001</userid>
</user>
</return>
</ns:getUserResponse>
</soapenv:Body>
</soapenv:Envelope>
//
uuid is {33CF90D3-7E96-A544-7995-426828546118}. You will use this uuid for updatePhone.
Regards,
TDoan
08-15-2018 11:30 PM
Thanks for the reply. I was able to retrieve the uuid of the user using the syntax you sent earlier. But when I am running the following code, its still not updating in the Call manager. Is there something else, I am missing in the syntax.
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body> <axl:updatePhone xmlns:axl="http://www.cisco.com/AXL/API/1.0" sequence="12055"> <ownerUserId>5D32F080-AC28-294E-39E1-8EB80542667E</ownerUserId> <name>SEP987654321098</name> </axl:updatePhone> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
08-15-2018 11:40 PM - edited 08-15-2018 11:53 PM
Hi,
Yes. Please change ownUserId to ownerUserName as follow.
....
<ownerUserName>
<uuid>{5D32F080-AC28-294E-39E1-8EB80542667E}</uuid>
</ownerUserName>
....
Regards,
TDoan
08-16-2018 02:34 AM
After Updating my XML below:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body> <axl:updatePhone xmlns:axl="http://www.cisco.com/AXL/API/1.0" sequence="12055"> <ownerUserName> <uuid>{B2A75DFC-F05E-E12D-A820-164E4D9870A4}</uuid> </ownerUserName> <name>SEPE8B7480316D6</name> </axl:updatePhone> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
I am getting the Error Message
Item not valid: The specified User Id was not found
The user is there in the CUCM, but this error message keeps coming, hope this time I am getting the syntax right.
08-16-2018 05:29 AM
As a possible solution to my question, my problem got solved when I used the following syntax:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body> <axl:updatePhone xmlns:axl="http://www.cisco.com/AXL/API/12.0" sequence="12055"> <ownerUserName>john.doe1</ownerUserName> <uuid>{2B46E9DC-D511-B47B-F1BF-27FB6DAC1ECE}</uuid> </axl:updatePhone> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
08-14-2018 06:57 PM - edited 08-14-2018 07:05 PM
Hi,
Would you like to display the UserID on the handset (Phone)?
If you want to show the Name on the handset, then you can use updatePhone (lines -> line -> label, lines -> line -> display) and updateLine (alertingName, asciiAlertingName). And if not you can use updatePhone (ownerUserName - uuid) to update uuid of user as well.
Hope it would help you.
Regards,
Thuy Doan
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: