Manager call between IVR & extensions

I am facing difficulties to restrict call between different company extinctions

For example:

I have there IVR of different companies: IVR1, IVR2, IVR3

Under IVR1 there are three extensions: 100,102,103

Under IVR2 there are three extensions: 200,202,203

Under IVR3 there are three extensions: 300,302,303

Now extension 100 can call to 200, 200 can call to 300, 300 can call to 100

How i will allow call from one extension to another extension of same company IVR only not the other company IVR extensions

Please help how I will do this?
If the 3 companies need to be separate, setup a domain for each. This is one of the main features of Freeswitch/FusionPBX.

If you just need to keep the IVR limited, set “direct dial” to false in the IVR and specify each of the allowed destinations in the IVR menu