[cisco-voip] Automating association devices and profiles to PG_User application user?

NateCCIE nateccie at gmail.com
Tue Apr 18 16:23:42 EDT 2017


You can do a simple SQL insert.  This is a base Query I have used to add all hard phones to an app user, that aren’t already associated to the user (for apps like phoneview)

 

Add all phones to an app user:

 

<sql>INSERT INTO ApplicationUserDeviceMap

(fkdevice, fkApplicationUser,tkuserassociation)

SELECT device.pkid, 'be93a493-3b9b-d0f4-d360-fafb54babb70', '1' from device where Device.pkid NOT IN (SELECT fkDevice FROM ApplicationUserDeviceMap AS MAP  WHERE MAP.fkApplicationUser = 'be93a493-3b9b-d0f4-d360-fafb54babb70') and  tkclass = '1' and name like 'SEP%'

</sql>

 

 

From: cisco-voip [mailto:cisco-voip-bounces at puck.nether.net] On Behalf Of Nick Barnett
Sent: Tuesday, April 18, 2017 2:17 PM
To: Cisco VoIP Group <cisco-voip at puck.nether.net>
Subject: [cisco-voip] Automating association devices and profiles to PG_User application user?

 

We have automation that builds devices, EM_Profiles, DNs, and just about everything else... except for the manual add of the controlled devices to the pg user application user for UCCE. We also use Nice for recording and there is a nice app user that needs these associations as well.

 

I have figured out how to do this by using a getAppUser AXL call, parsing the returned data, inserting my NEW device/profile where appropriate (into a new tag) and then submitting the information back as an updateAppUser. I think this this the only method we have available to automating this portion.

 

It kind of worries me to do it this way because I can see how the database may see it as disassociating all devices from the PG User and then re-associating all devices. Depending on processor utilization etc, I can also see where they may be a short period of time where the PG user has no associated devices.

 

Are my worries substantiated by any fact? Does anyone else do this? Are there better ways to accomplish this task?

 

Thanks,

Nick

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20170418/32babcfa/attachment.html>


More information about the cisco-voip mailing list