Outbound call restrictions


Please can anyone help me with setting up a specific setup please?

I am wanting to restrict certain extensions from dialling outbound (apart from emergency numbers), other extensions need to only be able to calls prefixed with 08 and emergency numbers, another set which can ring numbers prefixed with 07, 08 and emergency numbers, etc.

I believe there is a way to do it with contexts - is this correct…? If so, could anyone give me an idea on how to set this up?