How can I config incoming and outgoing calls over IAX

Hello everyone.
I have a problem and I hope you’ll help me.
I have two PBX with FreePBX at two locations and connect them with IAX. Communication between two PBX works great. This means that they can call phone extensions at two locations. There is only one PBX via SIP trunks connected to telecom.
I have two questions.
First: How to configure an incoming call 123 456 that is ringing the second extension on the PBX 100
Second: To me this same extension 100 has an outgoing call 123,456th
Thank you and regards.

Please rephrase your question. Maybe make a drawing and post it. I could not follow what you are asking.

I have two FreePBX in two locations, and FreePBX1 FreePBX2.
FreePBX1 has two trunks:

  • SIP trunk (for DID numbers)to the Telecom
  • IAX trunk to PBX2.
    FreePBX2 has a trunk:
  • IAX trunk to PBX1.

FreePBX1 has 5 extensions:

  • Ext.101 with DID number 100 101
  • Ext.102 with DID number 100 102
  • Ext.103 with DID number 100 103
  • Ext.104 with DID number 100 104
  • Ext.105 with DID number 100 105

FreePBX2 has 5 extensions:

  • Ext.201 with DID number 100 106
  • Ext.202 with DID number 100 107
  • Ext.203 with DID number 100 108
  • Ext.204 with DID number 100 109
  • Ext.205 with DID number 100 110

My question is:
How It configures the incoming call is ringing on DID 100 100 ext.205.
How It configures the outgoing call in the public network with the DID number ext.205 100,100th.

NOTE: FreePBX1 works great with incoming and outgoing calls and calls between FreePBX1 and FreePBX2.

Thank you.