For those of you using asterisk@home, I put this together if you just want to do this via the GUI and avoid VI
(Excuse the crudity…but i did test it and it worked just fine…but I would be interested of any tuning that could be done with it)
PBX1 IP address = 192.168.17.100
PBX2 IP address = 192.168.17.100
ON PBX1
Select "Trunks”
Select “Add IAX2 Trunk”
Scroll to “Outgoing Settings”
Trunk Name: “PBX2”
Under PEER Details place the following:
allow=ulaw
disallow=all
host=192.168.17.200
secret=1234
type=friend
username=PBX2
Scroll to “Incoming Settings”
User Context: “PBX1”
Under USER Details place the following:
allow=ulaw
context=from-internal
disallow=all
host=192.168.17.200
secret=1234
type=user
username=PBX1
Click on “Submit Changes” button and then “Apply” your changes
Goto “Outbound Routing”
Give it a route name of your choice, example “PBX1toPBX2”
Scroll down to Dial Patterns and enter: 4|.
Under Trunk Sequence pick your IAX2 Trunk in the drop box “IAX/PBX2”
Click ADD
Click SUBMIT
Apply your changes
ON Computer 2, IPAddress = 192.168.17.200
Select "Trunks” from the left menu under “Setup”
Select “Add IAX2 Trunk”
Scroll to “Outgoing Settings”
Trunk Name: “PBX1”
Under PEER Details place the following:
allow=ulaw
disallow=all
host=192.168.17.100
secret=1234
type=friend
username=PBX1
Scroll to “Incoming Settings”
User Context: “PBX2”
Under USER Details place the following:
allow=ulaw
context=from-internal
disallow=all
secret=1234
type=user
username=PBX2
Submit Changes and apply
Goto “Outbound Routing”
Give it a route name of your choice, example “PBX2toPBX1”
Scroll down to Dial Patterns and enter: 3|.
Under Trunk Sequence pick your IAX2 Trunk in the drop box “IAX/PBX1”
Click ADD
Click SUBMIT
Apply your changes
Now, users of each PBX can now call users on the other by adding in the proper dial pattern in front of the call.
In our example, users on the PBX2 on 192.168.17.200 simply dial a 3, followed by the extension number of the user on PBX1 192.168.17.100 and the extension will ring. Users on the other PBX simply dial a 4 followed by the extension number.