hi. i have 3 boxes with the following names and extensions:
-Gateway with all the sip trunks to the outside world and extension numbers of 3XX. 5 DIDs(eg 123456780-4) will be assigned to 308. 5 DIDs(eg 123456785-9) will be assigned to 309.
-Box A where it has extenions numbers 4XX
-Box B where it has extenions numbers 5XX
i would like boxA to register as extension 308 in Gateway and BoxB as extension 309 in Gateway.
BoxA and BoxB will able to make/receive calls through Gateway only
I am a bit lost on the configuration
This is the hard way to do this. You should get an Session Border Controller. Look for Kamillo (sic) for a box designed to do your external part of the connection. Each of the back-end boxes then register with the gateway as trunks. Much simpler to maintain and configure.
Then use trunks to link all the FreePBXs, either SIP or IAX, don’t register them as extensions. That is what trunking is supposed to be used for, IMHO.