cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
498
Views
10
Helpful
3
Replies

Application User device associations through scripting

jarod.alley
Level 1
Level 1

We're running CUCM 11.5 and have been looking for a method to remove devices from an Application User group and also add them back when needed. We have a CTI application that, given the current hybrid environment, requires us to remove the Jabber profile and instead select their desk phone when they switch from WFH to in office and vice versa when they switch back. After that switch we reset the device and log them into Extension Mobility to allow the CTI application to control the appropriate device to pass on information to our CRM platform. We have the commands to do the Extension Mobility aspects but we're trying to find the best way to add and remove devices to a specific Application User group so it can be scripted and become self-service.

 

When working from the office

Step 1 - Log Off Extension Mobility

Step 2 - Remove CSFXXXXXX from Application User

Step 3 - Add SEPXXXXXXXXXXXX to Application User

Step 4 - Reset 88XX Phone

Step 5 - Log into Extension Mobility

 

When working remote

 

Step 1 - Remove SEPXXXXXXXXXXXX from Application User

Step 2 - Add CSFXXXXXXX to Application User

3 Replies 3

Adam Pawlowski
VIP Alumni
VIP Alumni

You can manage the associated devices of the application user via AXL, no trouble at all.

 

Call getAppUser and grab the associatedDevices list. Add or remove what you want, and then send the new list back with updateAppUser.

 

Just make sure to send it back in the state that you want, as it replaces the existing list with what you supply.

You can call resetPhone or restartPhone as well through AXL.

 

I don't know about EM login/logout automating that, I haven't done that myself yet.

Thank you for the reply Adam. This is helpful and I've seen this methodology on the DevNet site but pulling the current list would still require manual input to the populated list before sending back to the CM. However, if our goal is self-service I'm wary on this methods effectiveness. Suppose we have 80 people that would be allowed to perform that action, and they all look to do it in the morning, it could create a conflict if simultaneous submission is done, no?

The way I'd implemented it was that I added a job queue to my application, and then queued jobs to add/remove device.



That task got the current list, then made the needed change, and submitted it.



AXL has a concept of "sequence" that you can use to tag the call with some locally significant number to ensure you're looking at the right thing, as yes otherwise unless you're maintaining the state of the list locally, you can throw multiple API calls in at the same time and end up with a mess.

I'm sure I didn't do it the best way either, but it works for me.



I'm not sure why you need to remove the device from the application user either - unless the app is pulling the list and trying to do something with it. I would think you'd be able to just leave them all in there, and whichever thing the user is causing the app to poll or look at, it will have the permission to do so without effort on your end.