cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
2184
Views
3
Helpful
17
Replies
Highlighted
Beginner

Associate Devices(Phones) to end users

Our development team put down AXL methods to update end user properties "Home Cluster" and "Controlled Devices" in Call Manager 9.1.2 environment.

When they execute those AXL APIs, response doesn't show any errors. But when I checked on Call Manager, "Home Cluster" parameter updated but not associated devices. Controlled Device field is empty.

Attaching a file containing AXL SOAP request and Call Manager AXL debug.

Any thoughts?

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<updateUser xmlns="http://www.cisco.com/AXL/API/9.0"><userid xmlns="">jtest015</userid>
<firstName xmlns="">Cisco</firstName><lastName xmlns="">Test</lastName>
<telephoneNumber xmlns="">1236541234</telephoneNumber>
<department xmlns="">JBRW</department>
<userLocale xsi:nil="true" xmlns="" />
<associatedDevices xmlns="">
<device>jbw6CNCM9KDQ7</device>
</associatedDevices>
<enableCti xmlns="">true</enableCti>
<digestCredentials xsi:nil="true" xmlns="" />
<subscribeCallingSearchSpaceName xmlns="" />
<enableMobility xmlns="">false</enableMobility>
<enableMobileVoiceAccess xmlns="">false</enableMobileVoiceAccess>
<maxDeskPickupWaitTime xmlns="">10000</maxDeskPickupWaitTime>
<remoteDestinationLimit xmlns="">4</remoteDestinationLimit>
<primaryDevice xmlns="" />
<ctiControlledDeviceProfiles xmlns="" />
<patternPrecedence xmlns="">Default</patternPrecedence>
<mlppPassword xsi:nil="true" xmlns="" />
<homeCluster xmlns="">false</homeCluster>
<imAndPresenceEnable xmlns="">false</imAndPresenceEnable>
<serviceProfile uuid="{3D66AFD3-3A2A-E7BA-3145-BF20343CA812}" xmlns="">Test Service Profile</serviceProfile>
<directoryUri xmlns="" />
</updateUser></soap:Body>
</soap:Envelope>


Call Manager Debug:
2016-07-18 09:16:45,818 DEBUG [http-bio-443-exec-80] servletRouters.AXLFilter - DBLCNQueue Count: 0
2016-07-18 09:16:45,818 DEBUG [http-bio-443-exec-80] servletRouters.AXLFilter - Successfully set the value of counter: 4 value: 0
2016-07-18 09:16:45,818 DEBUG [http-bio-443-exec-80] servletRouters.AXLFilter - --------------- Version matched ----------------
2016-07-18 09:16:45,819 INFO  [http-bio-443-exec-80] servletRouters.AXLAlpha - SOAPAction : "CUCM:DB ver=9.0 updateUser"
2016-07-18 09:16:45,843 DEBUG [http-bio-443-exec-80] servletRouters.AXLAlpha - addToCache("cipc_test")
2016-07-18 09:16:45,843 INFO  [http-bio-443-exec-80] servletRouters.AXLAlpha - Going to axis--->
2016-07-18 09:16:45,848 DEBUG [http-bio-443-exec-80] axlapiservice.Handler - getPkid Query is :select pkid from EndUser where my_lower(userid ) =my_lower('jtest015' )
2016-07-18 09:16:45,867 DEBUG [http-bio-443-exec-80] axlapiservice.UpdateUserHandler - strpatternprecedenceDefault
2016-07-18 09:16:45,869 DEBUG [http-bio-443-exec-80] axlapiservice.UpdateUserHandler - select precedencelevel from TypePatternPrecedence where name = 'Default'
2016-07-18 09:16:45,870 DEBUG [http-bio-443-exec-80] axlapiservice.Handler - fkCallingSearchspace_restrict  IS Being assigned a null value in addfkdataaxis
2016-07-18 09:16:45,871 DEBUG [http-bio-443-exec-80] axlapiservice.Handler - delete from EndUserLicense where fkEndUser='32e05b12-9980-0011-d206-29424266b96f'
2016-07-18 09:16:45,876 DEBUG [http-bio-443-exec-80] axlapiservice.Handler - getPkid Query is :select pkid from UCServiceProfile where my_lower(name ) =my_lower('Test Service Profile' )
2016-07-18 09:16:45,882 DEBUG [http-bio-443-exec-80] axlapiservice.Handler - update EndUser set fkCallingSearchspace_restrict=null,fkUCServiceProfile='3d66afd3-3a2a-e7ba-3145-bf20343ca812',LastName='Test',EnableMobility='f',IsLocalUser='f',EnableMobileVoice='f',AllowCTIControlFlag='t',DirectoryURI='',RemoteDestinationLimit='4',TelephoneNumber='1236541234',FirstName='Cisco',MaxDeskPickupWaitTime='10000',Department='JBRW' where pkid='32e05b12-9980-0011-d206-29424266b96f'
2016-07-18 09:16:45,948 DEBUG [http-bio-443-exec-80] axlapiservice.UpdateUserHandler - select pkid as mlpppkid from EndUserMLPPAuthentication where fkEndUser = '32e05b12-9980-0011-d206-29424266b96f'
2016-07-18 09:16:45,954 DEBUG [http-bio-443-exec-80] axlapiservice.UpdateUserHandler - select pkid from device where my_lower(name) = my_lower('jbw6CNCM9KDQ7')
2016-07-18 09:16:45,959 DEBUG [http-bio-443-exec-80] axlapiservice.UpdateUserHandler - select fkDevice from EndUserDeviceMap where fkEndUser = '32e05b12-9980-0011-d206-29424266b96f' and tkUserAssociation = '7'
2016-07-18 09:16:45,963 DEBUG [http-bio-443-exec-80] axlapiservice.Handler - delete from EnduserDeviceMap where fkEndUser='32e05b12-9980-0011-d206-29424266b96f' and tkUserAssociation='6'
2016-07-18 09:16:45,988 DEBUG [http-bio-443-exec-80] axlapiservice.Handler - delete from EndUserLicense where fkEndUser='32e05b12-9980-0011-d206-29424266b96f'
2016-07-18 09:16:45,994 DEBUG [http-bio-443-exec-80] axlapiservice.UpdateUserHandler - UpdateUser completed
2016-07-18 09:16:45,995 INFO  [http-bio-443-exec-80] servletRouters.AXLAlpha - Request processed by AXIS
2016-07-18 09:16:45,995 DEBUG [http-bio-443-exec-80] servletRouters.AXLFilter - ---------------AXLFiler > responseString ----------------  : <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns:updateUserResponse xmlns:ns="http://www.cisco.com/AXL/API/8.0"><return>{32E05B12-9980-0011-D206-29424266B96F}</return></ns:updateUserResponse></soapenv:Body></soapenv:Envelope>
2016-07-18 09:16:45,996 INFO  [http-bio-443-exec-80] servletRouters.AXLFilter - <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns:updateUserResponse xmlns:ns="http://www.cisco.com/AXL/API/9.0"><return>{32E05B12-9980-0011-D206-29424266B96F}</return></ns:updateUserResponse></soapenv:Body></soapenv:Envelope>
2016-07-18 09:16:45,996 INFO  [http-bio-443-exec-80] servletRouters.AXLFilter - Request 1468578876702 was process in 192ms
2016-07-18 09:16:46,096 INFO  [http-bio-443-exec-80] servletRouters.AXLFilter - Received request 1468578876703 from cipc_test at IP 10.16.177.231
2016-07-18 09:16:46,097 DEBUG [http-bio-443-exec-80] servletRouters.RequestWrapper - : changeNamespace - nameSpac_9_0
2016-07-18 09:16:46,097 DEBUG [http-bio-443-exec-80] servletRouters.RequestWrapper - : setNameSpaceFlag - New nameSpace:9.0
2016-07-18 09:16:46,097 INFO  [http-bio-443-exec-80] servletRouters.AXLFilter - AXL REQUEST :

17 REPLIES 17
Highlighted
Cisco Employee

Hi Pradeep,

  I have moved your Post Under AXL community. Request to check the following url for related information-AXL and Cisco Support Field access

Thanks and Regards,

Geevarghese

Highlighted

The request does look correct.  The only things I can think of:

- Check that the device actually exists: jbw6CNCM9KDQ7 seems like an unlikely device name (usually they begin with 'SEPxxx', however it could be a soft device.  If the device does not exist, I suspect the <updateUser> will just succeed but with no device associated.

- Perhaps try removing the extraneous xmlns="" attributes.  The AXL implementation is hand-coded - I've seen it balk at unexpected things like that before

If neither of those pan out, I would suggest opening a DevNet Developer Support ticket so we can look at the logs and CUCM configuration in more detail: https://developer.cisco.com/site/devnet/support/

Highlighted

Hi, I made the updateuser request as below:

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Body>

  <updateUser xmlns="http://www.cisco.com/AXL/API/11.5">

    <userid xmlns="">jialinli</userid>

    <associatedDevices xmlns="">

      <device>SEPC47295000000</device>

    </associatedDevices>

   </updateUser>

</soap:Body>

</soap:Envelope>

But this request will remove the former devices associated to the user. How can I associate new device to a user while the user's old devices can be also kept?

Highlighted

Hi Jia

Did you find a solution for this. I'm trying to do the same on CUCM version 10.5, But it's removing the existing once and over writing it with the new device

Many Thanks

Shameer

Highlighted

You'll want to do <getUser> to get the list of existing device associations, modify the XML list, and then do <updateUser> providing the complete list.  This list completely replaces the existing list.

(This is a fairly common pattern with AXL requests, though note some requests do provide <addXXX> and <removeXXX> lists where you can add/remove items instead of manipulating the full list.)

Highlighted

Can you give an example of what you mean by this:

some requests do provide <addXXX> and <removeXXX> lists where you can add/remove items instead of manipulating the full list.
Highlighted

<updateCss> is a request that has this pattern:

https://pubhub.devnetcloud.com/media/axl-schema-reference/docs/Files/AXLSoap_updateCss.html#LinkE81

where you can manipulate the full list via <members> or add/remove only via <addMembers>/<removeMembers>

Highlighted

Excellent, got you now.

Highlighted

Thanks for the reply, yes this will work by adding all the devices as an update. But I have a script which pass the new device as a variable to AXL, so it's going to be tricky to get the device and store in a veriable as some users may not have a device association and some have 1, 2 or more.

Is there any SQL command that we could run to add the device to the list withiout overwriting the existing once

Thanks

Shameer

Highlighted

INSERT INTO enduserdevicemap

    (fkenduser, fkdevice, tkuserassociation)

VALUES

    ('{eu_pkid}', '{d_pkid}', 1)

In the AFNP paradigm, you could do this in a try/catch construct, and filter the error to ignore for duplicate inserts if you get them.  I think this is quicker than an AXL get/update trawling through an xml sequence.

Assumes you have both PKIDs.  otherwise you'd need to get them first or with sql querying.

Highlighted

.Hi Jonathan

this is good, I will try this and let you know

INSERT INTO enduserdevicemap (fkenduser, fkdevice, tkuserassociation) VALUES ('{sfareed_em}', '{sham_cipc}', 1)"

I can see a double quote " at the end, is that correct

Regards

Shameer

Highlighted

Please remove the double quote.

You need to replace everything that's in the braces with a valid pkid.  The braces are obviously not part of the sql statement.

I'm not sure what `sfareed_em` is, but please note that you need a user pkid there.

Highlighted

Hi Jonathan

Thanks for the quick response

I tried on CLI

admin:

admin:run sql INSERT INTO enduserdevicemap (fkenduser, fkdevice, tkuserassociation) VALUES ('{sfareed3}', '{SEPABCDABCD1234}', 1)

Missing key in referenced table for referential constraint (informix.fk_enduserdevicemap_fkdevice).

admin:

Getting this error "Missing key in referenced table for referential constraint (informix.fk_enduserdevicemap_fkdevice)"

any idea

Highlighted

Hi,

As I said:

  • don't include the braces {}
  • You need to specify the pkid values for each. you're incorrectly specifying userid and device name
Content for Community-Ad

This widget could not be displayed.