SIP to PRI question/help


I need some help on a new installation of asterisk.

My setup is 2 servers, FreePBX Distro with a Sangoma A102 (Dual PRI) Card on each. Both Asterisk A and Asterisk B are connected with a SIP trunk to each other. Asterisk A has a also SIP trunk with a VoiP Provider(120channels)

What I want to do is, Asterisk A should route the first 60channels to its PRI and the rest 60 to Asterisk B. Then Asterisk B should route these 60channels to its PRI.

My problem is, how do I setup asterisk A to only accept 60channels and forward the rest to Asterisk B(through SIP trunk)?

Thanks in advance,

Just put the PRI first in the outbound route and put the SIP trunk second then when all 60 PRI channels are busy the calls will be routed over the SIP trunk to the other server.

Well, I know that is the general idea but my problem was how to route an incoming call directly to the outbound route. So, I made this context at extentions_custom.conf and it seems to work so far

exten => _.,1,Goto(outrt-1,${DIALEDNUMBER},1)

Where outrt-1 is the outbound route I made using FreePBX

If you make the context from-internal on the sip trunk on the overflow server B the calls will be routed out as if they originated internally within the server. You just have to be careful you are sending the call from server A with the same dial pattern as server B employs.

I didn’t understand what you said. I should make the context=from-internal at the VoiP ISP SIP Trunk at Server A? And then have an outbound rule with the 2 trunks (PRI, SIPtoB )?


No, make the context of the interconnection trunk on server B from-internal, then calls arriving at the server B from server A on the interconnection trunk will be treated as if they originated in server B and will be routed out per your outbound rules on server B.