Forwarding extensions between PBX1 and PBX2 over IAX2

I’m trying to test a new FreePBX deployment.
I want to forward incoming calls that come in thru the primary (and only) SIP trunk on PBX1, over the IAX2 trunk to PBX2 and ring a phone on that PBX.

OR

I want to forward incoming calls that come in thru the primary (and only) SIP trunk on PBX1, over the IAX2 trunk to PBX2 and ring a phone that is configured to work on PBX1.

Incoming Call >>> AT&T SIP >>> PBX1 >>> FWD over IAX2 >>> PBX2 >>>> RING PBX2 Phone
or…
Incoming Call >>> AT&T SIP >>> PBX1 >>> FWD over IAX2 >>> PBX2 >>> RING PBX1 Phone

How can I accomplish this? I have the trunks set up and they seem to be talking to each other.

You should be able to do this. Are you forwarding at the INBOUND ROUTES level? (IE matching an inbound route at PBX1 and sending it out the IAX trunk to PBX2?)

I tried that. I end up getting the message “you have reached a non working number” and it states a switch - like AT&T doesn’t know where to put it when it tries to go out the pbx2 trunk.
When I switch the inbound route back to PBX1 it works fine again.

Are there config differences from our old version of Asterisk to our newer version that may be preventing this from working?

Here are the versions…

PBX1 Asterisk version 1.8.11-cert10
PBX2 Asterisk version 13.19.1

Here is the IAX config on each one.

PBX1 Outgoing
Trunk Name: ToPBX2-g6
host=10.172.1.22
username=pbx2-beta
secret=PBX2-beta!
type=friend
context=from-internal
qualify=yes
qualifyfreqok=25000
transfer=no
trunk=yes
forceencryption=yes
encryption=yes
auth=md5

PBX1 Incoming
User context: pbx1
secret=PBX1-!
type=user
context=from-trunk


PBX2 Outgoing
Trunk Name: ToPBX1
host=10.172.1.20
username=pbx1
secret=PBX1-old!
type=friend
context=from-internal
qualify=yes
qualifyfreqok=25000
transfer=no
trunk=yes
forceencryption=yes
encryption=yes
auth=md5

PBX2 Incoming
User context: pbx2-g6
secret=PBX2-beta!
type=user
context=from-trunk

Do I need an outbound route on pbx2? A specific dialplan on PBX1 or PBX2?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.