Sip trunking

I would like to have a second box installed and register a sip trunk to the first box. I would then like the first box to send calls to the extensions that are located on the second box to the extension that the second box is registered to. Example, box b registers a sip trunk to box a that has given box b an extension of 200. So if box a needs to call an extension not located in itself it connects it to extension 200. I have tried this but box B does not seem to get the information it needs to then connect the call to the correct extension. I can do this with two sip trunks going both ways but box b frequently changes IP so I figured box B could just register to box a and get its calls on its extension just as it does from my voip provider that sends multiple DIDs over one sip extension. Thanks for any ideas.