Connecting two PBX loop

I have two PBXs ( FreePBX 2.8.1.4 ) connected with an intra-company iax2 trunk.
Extensions from BPX A can call those of BPX B, and vice versa. Any time a call is transferred from A to B or from B to A a new iax2 channel is used.
So if an extension from PBX A calls an extension in PBX B, then a iax2 channel is used. If the call is transferred back to an extension in PBX A, then another iax2 channel is used. So I have two iax2 channels occupied for a call starting from PBX A and terminating on the same PBX box.
I wonder whether is there a mean to let PBX A to understand that caller and callee are his extensions so it should not use the iax2 channels when it is not needed.

****The configuration of PBX B is:

General Settings
Trunk Name: PbxA-link
Outbound Caller ID: 123

Outgoing Settings
Trunk Name: PbxA-PbxB
PEER Details:
host=
qualify=yes
username=PbxA-link
secret=mysecret
type=peer
context=from-internal
trunk=yes
disallow=all
allow=g729

Incoming Settings
USER Context: PbxB-link
USER Details:
host=
secret=mysecret
type=user
context=from-internal
disallow=all
allow=g729

****The configuration of PBX A is:

General Settings
Trunk Name: PbxB-link
Outbound Caller ID: 321

Outgoing Settings
Trunk Name: PbxA-PbxB
PEER Details:
host=
qualify=yes
username=PbxB-link
secret=mysecret
type=peer
context=from-internal
trunk=yes
disallow=all
allow=g729

Incoming Settings
USER Context: PbxA-link
USER Details:
host=
secret=mysecret
type=user
context=from-internal
disallow=all
allow=g729