10-12-2015 12:02 PM
We are trying to update user's primary extension by assigning a new primary extension with existing pattern/partition information in a .NET application via UpdateUserReq. It returns true (no errors/exceptions) but on CUCM primary extension remains blank. Any additional attributes that we need to set to achieve this? Thank you in advance for your help.
Solved! Go to Solution.
10-14-2015 08:48 AM
I recommend that approach (two steps). There's also another way to bypass the restriction of the primary line having to be one of the user's associated devices before you set it as the primary extension. Use addExtensionInfo, instead, and set the sortOrder to 0, which assigns it to the primary extension.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.5">
<soapenv:Header/>
<soapenv:Body>
<ns:updateUser>
<userid>nicholas</userid>
<addExtensionsInfo>
<extension>
<sortOrder>0</sortOrder>
<pattern>3000</pattern>
<routePartition></routePartition>
</extension>
</addExtensionsInfo>
</ns:updateUser>
</soapenv:Body>
</soapenv:Envelope>
10-13-2015 07:27 AM
Can you post a sample of the XML request(s) you're using?
10-13-2015 09:25 AM
I am not using XML. I have compiled WSDL and using function "UpdateUserReq" exposed by it.
10-13-2015 10:25 AM
So what are you using? Java or .NET? You're still sending XML, it's what the API does. Could you either post the code that prepares the data for the update, or you can use something like Fiddler to capture the XML, and then post the XML. I actually use Java itself to output the XML. Here's a sample of the kind of code I use:
//Create a String writer object which will be
//used to write jaxbElment XML to string
StringWriter writer = new StringWriter();
// create JAXBContext which will be used to update writer
JAXBContext context = JAXBContext.newInstance(XFkType.class);
// marshall or convert jaxbElement containing student to xml format
context.createMarshaller().marshal(jaxbObj, writer);
//print XML string representation of Student object
System.out.println( writer.toString() );
10-14-2015 07:16 AM
Sorry, I don't know why I missed the .NET in your original post.
It would help if you could show the XML that you're sending. Also, are you specifying the routePartitionName (yes, even if it is blank)?
10-14-2015 07:50 AM
yes, we are setting routePartitionName in the update. I will grab the XML using Fiddler and share with you.
10-14-2015 08:35 AM
here is XML that is going to the server:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<updateUser xmlns="http://www.cisco.com/AXL/API/10.5">
<userid xmlns="">xyzyyzz</userid>
<userLocale xmlns="" />
<associatedDevices xmlns="">
<device>CSFxyzxyz</device>
</associatedDevices>
<primaryExtension xmlns="">
<pattern>20046</pattern>
<routePartitionName>PT_XXXYYY</routePartitionName>
</primaryExtension>
<associatedPc xmlns="" />
<associatedGroups xmlns="">
<userGroup>
<name>Standard CCM End Users</name>
<userRoles>
<userRole>Standard CCM End Users</userRole>
<userRole>Standard CCMUSER Administration</userRole>
</userRoles>
</userGroup>
<userGroup>
<name>Standard CTI Enabled</name>
<userRoles>
<userRole>Standard CTI Enabled</userRole>
</userRoles>
</userGroup>
<userGroup>
<name>Standard CTI Allow Control of Phones supporting Connected Xfer and conf</name>
<userRoles>
<userRole>Standard CTI Allow Control of Phones supporting Connected Xfer and conf</userRole>
</userRoles>
</userGroup>
<userGroup>
<name>Standard CTI Allow Control of Phones supporting Rollover Mode</name>
<userRoles>
<userRole>Standard CTI Allow Control of Phones supporting Rollover Mode</userRole>
</userRoles>
</userGroup>
</associatedGroups>
<digestCredentials xmlns="" />
<phoneProfiles xmlns="">
<profileName uuid="bd7190d8-73e2-7f53-be33-52170979ffb6">CSTTestDeviceProfile</profileName>
</phoneProfiles>
<presenceGroupName xmlns="">Standard Presence group</presenceGroupName>
<subscribeCallingSearchSpaceName xmlns="">CSS_XYZXYZ</subscribeCallingSearchSpaceName>
<enableMobility xmlns="">true</enableMobility>
<enableMobileVoiceAccess xmlns="">true</enableMobileVoiceAccess>
<primaryDevice xmlns="" />
<enableEmcc xmlns="">false</enableEmcc>
<ctiControlledDeviceProfiles xmlns="" />
<patternPrecedence xmlns="" />
<numericUserId xmlns="" />
<mlppPassword xmlns="" />
<homeCluster xmlns="">true</homeCluster>
<imAndPresenceEnable xmlns="">true</imAndPresenceEnable>
<serviceProfile xmlns="" uuid="{A46437D0-2222-B226-F5AA-70F471CC733E}">UCSP_JABBER_XYZ</serviceProfile>
<directoryUri xmlns="" xsi:nil="true" />
<selfService xmlns="">20046</selfService>
<userProfile xmlns="" />
<ldapDirectoryName xmlns="" />
<userIdentity xmlns="">xyzyyzz@myorg.com</userIdentity>
<nameDialing xmlns="" />
<ipccExtension xmlns="" />
<convertUserAccount xmlns="" />
<accountType xmlns="" xsi:nil="true" />
<authenticationType xmlns="" xsi:nil="true" />
</updateUser>
</soap:Body>
</soap:Envelope>
10-13-2015 10:55 PM
Which AXL version and which CUCM version do you use?
10-14-2015 08:36 AM
10.5 AXL on 10.5 CUCM.
10-14-2015 08:40 AM
Just a thought (I can't test this at the moment), but I know that the Primary Line is validated to ensure it is present on one of the user's associated devices. If you are trying to update the user to add the device at the same time as setting the primary line, there might be a race condition where AXL attempts to do one before the other.
Maybe try making this a two-request process where you associate the device, and then do a subsequent updateUser to set the Primary Line..?
10-14-2015 08:48 AM
I recommend that approach (two steps). There's also another way to bypass the restriction of the primary line having to be one of the user's associated devices before you set it as the primary extension. Use addExtensionInfo, instead, and set the sortOrder to 0, which assigns it to the primary extension.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.5">
<soapenv:Header/>
<soapenv:Body>
<ns:updateUser>
<userid>nicholas</userid>
<addExtensionsInfo>
<extension>
<sortOrder>0</sortOrder>
<pattern>3000</pattern>
<routePartition></routePartition>
</extension>
</addExtensionsInfo>
</ns:updateUser>
</soapenv:Body>
</soapenv:Envelope>
10-14-2015 08:49 AM
User and device (with the line) are already associated. In this request, we are just trying to update primary extension. It returns true but changes nothing on the user.
10-14-2015 08:56 AM
In that case, you may want to not re-include the device association part of the request, as I suspect that will have the effect of AXL first removing all associated devices, and then re-adding the (same) device - possibly causing the race condition previously mentioned.
10-15-2015 12:31 PM
We tried the approach of not including device association again and just update primary extension - same result.
In .Net, we did not find any API for updating "extension info". We are now trying to do it using raw XML instead. I will post the results once we complete this change and test it.
10-16-2015 11:06 AM
It worked with raw XML. Thank you.
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