Restricting no. of capacity/port and vmr for each department

How to create a policy to allocate no. of capacity/ports and vmr for each department.
When user call it, it check if there is sufficient license for that department.

eg. Company has 1000 port capacity and 500 VMR, it has 5 departments, Sales (500, 100), Technical (200, 100), Admin (100, 50), Finance (100, 50), IT (100, 50).

Any sample code?

Hi @Joseph,

The only way that I can think to achieve this would be to create a database that tracks the amount of callers at a current time. An event sink would be triggered to add/update a record in the database each time that someone connected to track that connection, when the disconnect event sink triggered it would take it away. The external policy would check this database each time to check the amount of connections and accept or reject.

I have a question, how do you know which department they belong to? Is it a domain based rule or is it the first part of the URI?


@CameronMcGuffie re this: “how do you know which department they belong to” - for a device you could use the service tag field