FreePBX | Register | Issues | Wiki | Portal | Support

FreePBX + Digium gateway 2G402F?


(Avayax) #21

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.


(Avayax) #22

I am pretty confident that the solution I described above is gonna work for you, although there might also be an option to route the call on the gateway depending on which nic it came in on.

Post a screenshot of a routing rule on the gateway, so we can look at the options you have there.


(Chivas Cao) #23

I created two sip endpoints in gateway:

then created the call routing rules
image

image

Please help


(Avayax) #24

Create only one trunk and one endpoint on the gateway.
In FreePBX create another outbound route for all yor 6xxx extensions, with 6xxx in the CallerID field in the dial patterns tab, and 222 in the prepend field. Put that route on top of the order.


Have a second route to your gateway for all other calls, without the 222 and the CallerID field in the dial patterns tab empty.

Now on the Digium, do this in your Routing rule. Send call through the port you want your 6xxx to go out on.

Have a second routing rule without the 222 and route through the other port.


(Chivas Cao) #25

Thank Avayax, I will try and feedback


(Chivas Cao) #26

Thank all for help, I configured like Avayax’s guide and it works. Thank so much