I am working on a SQL query to list the device name, description, model, class type ,product, pool name and the associated DN if any using the following query:
select a.name as device, a.description, b.name as pool, typemodel.name as model,p.name as product,
c.name as class,n.dnorpattern as DN from device as a,numplan as n left join devicepool
as b on a.fkdevicepool = b.pkid inner join typemodel on a.tkmodel=typemodel.enum inner join
typeproduct as p on p.tkmodel = a.tkmodel inner join typeclass as c on c.enum = a.tkclass inner join
devicenumplanmap as dnpm on dnpm.fkdevice = a.pkid where c.name="Phone"
and dnpm.fknumplan = n.pkid and a.tkclass = 1
But i am not able to get the result. It's showing the error
An ON clause has an invalid table reference
... View more
I am using AXL to add a User in the CUCM. I am using the following AXL syntax:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/9.1">
<soapenv:Header/>
<soapenv:Body>
<ns:addUser sequence="?">
<user>
<firstName>John</firstName>
<lastName>Doe</lastName>
<userid>john.doe</userid>
<password>1234</password>
<mailid>jd@g.com</mailid>
<department>IT</department>
<enableMobility>T</enableMobility>
<phoneProfiles>
<profileName>john.doe_EM</profileName>
</phoneProfiles>
<associatedDevices>
<device>SEP001F3A924223</device>
</associatedDevices>
</user>
</ns:addUser>
</soapenv:Body>
</soapenv:Envelope>
The above works when I remove the tags for adding defaultProfile and primaryExtension. As a turn around i used the SQL statement for adding the defaultProfile but I am still not able to add the primaryExtension. is there an SQL statement for that?
... View more
I am trying to construct the SQL for getting the Phone button template name for a particular product. The following is my query:
select p.name from phonetemplate as p inner join p.tkmodel=typemodel.pkid where typemodel.name="Cisco 6961"
But it's not working. Where am i making the mistake.
... View more
For adding a new DN, I am using the following AXL,
<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:addLine xmlns:axl="http://www.cisco.com/AXL/API/12.0" sequence="12055">
<pattern>5007</pattern>
<description>Test<description>
<usage>For test purposes</usage>
</axl:addLine>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
is the syntax correct?, it's showing an error
... View more
I have the following AXL syntax for removing all the associations of devices from the User:
<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/11.5" sequence="12055">
<userid>john.doe</userid>
<associatedDevices>
</associatedDevices>
</axl:updateUser >
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I just keep the associated devices tag blank, and all the association is deleted. My problem is what if I have to remove a single association from a list of associatedDevices, how will the syntax be like.
And after removing the association will the ownerUserName in the Phone config be removed.
... View more
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>
... View more
I am working on a script to automate the adding of DN to Phone and than adding then making directory number association with a User. I am not able to figure out the AXL syntax for that, will it using SQL or there is some tag for it.
... View more
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.
... View more
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>
... View more
I am not able to get the uuid for my user, when I run the query select * from enduser where userid="john.doe". Is uuid automatically assigned, or we have to feed it manually when adding a user.
... View more
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>
... View more
Want a clarification, when we do a user-device association using updateUser tag, the ownerid, in the Phone config is not set, will a call to UpdatePhone and updating the ownerid complete the process of association.
... View more
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?
... View more