Class Of Service (COS) Option?

I’m trying to work out how this should work, so I thought I would open with a discussion of how it should be implemented.

What I am looking for is the ability to define a Class of Service variable, something as simple as single integer digit, that is applied against, and here is the first question, either the user or the device. And the second question is how does that apply when using only Extensions. My initial assumption is that the COS would be associated with the user. The end goal is to use the COS variable in the auto provisioning scripts to limit the functions enabled on a phone when it is provisioned. It can be done with the existing Aastra/Trixbox scripts which I have ported over to both Elastics and PBXIAF. The type of phone has some limitation built in now, but I would like to be able to use the same phone for both Managers and General Users, and also for Call Center Agents and Call Center Managers. All four user types would have different buttons enabled based on the COS. Changing the Users COS and having them reboot their phone would reconfigure their phones.

How hard would it be to implement this feature in FreePBX so it returned was accessible as AA_COS or something similar in the XML?

Mark Holm AKA OneObserver