I"m hoping this can be achieved with the CLI but in my quick reading I'm not very optimistic.
I'm after a query/command structure to do the following:
1 - Find a list of all WebRTC phones
2 - Query if the user associated with that WebRTC phone is inactive or deleted and if they are...
3 - Delete the WebRTC phone
Unfortunately, the CLI is not going to do all of these things out of the box. It can easily do this with a little bit of Powershell or python glue code. Let me chat with a few people on my team and see if anyone has some bandwidth to throw together an example.
Thanks,
John Carnell
Manager, Developer Engagement