So you have two PRIs to the pstn.
Let’s say you have those connecting to PRI port 1 and 2 on the gateway.
Is your goal then to route all calls common from your 6xxx freepbx extensions out through PRI port 1, and calls coming from 7xxx through PRI port 2?
Those gateways are running Asterisk and you are dealing with a dual nic Asterisk situation.
I am using Digium PRI gateways myself, albeit the smaller models with two PRI ports and no dual nic.
I think you can have that easier.
Just run one trunk between the gateway and Freepbx.
You can route via dialed number on the gateway.
You e.g. you can say if a call comes into the Digium and the dialed number matches a specific string, then send it out port 1 or 2.
If you absolutely must send all calls from your 6xxx freepbx extensions out through port 1 and 7xxx through port 2, I would have only one trunk on Freepbx, but two outbound routes.
Force 6xxx to use outbound route 1 and pretend a unique identifier, an extra digit string to the dialed number, e.g. 22, which you remove again on the gateway, but which allows your gateway to route calls starting with 22 out a specific port, whereas others will be sent out port 2.
I can show you how to configure routing rules on the gateway to make this work.