This is how I did it. Let’s assume that the two Asterisk boxes are located in Manila and Cebu. Might be useful to our company’s future sysadmins.
On the Manila side (192.168.1.1)
1. Download, burn, and install trixbox
2. Secure the box
o Disable unnecessary daemons
o Disable root login
o Enforce PKI
o Change default passwords for admin and maint
3. Setup 2 interfaces. 1 for private and the other for public. Setup static routes for VPN, if any.
4. Login to web UI using maint.
5. Go to PBX -> PBX Settings and click on Trunks on the left side
6. Click on Add IAX2 Trunk
Outbound Caller ID: hidden
Dial Rules: 032+NXXXXXX
Trunk Name: To-Cebu (you can call it whatever you want, but for this example, let’s call it To-Cebu)
PEER Details:
deny=all
allow=g729&ulaw&alaw
type=friend
host=192.168.2.2 (public IPs also work, but better do it over VPN)
qualify=yes
context=from-internal
secret=putyoursupersecretpasswordhereok?
7. Click the Submit changes button at the bottom
8. Click the Apply Configuration Changes at the top
9. Click Continue with reload
10. Next, click on Outbound routes on the left.
Route Name: To-Cebu
Dial Pattern:
43XX (considering that the extension range for the Cebu Asterisk is 4300-4399)
0|32. (because Cebu’s area code is 32)
Trunk Sequence: IAX2/To-Cebu
11. Submit changes and Apply Configuration Changes
On the Cebu side (192.168.2.2)
1. Repeat steps 1-5
2. Click on Add IAX2 Trunk
Outbound Caller ID: hidden
Dial Rules: 02+NXXXXXX
Trunk Name: To-Manila (you can call it whatever you want, but for this example, let’s call it To-Manila)
PEER Details:
deny=all
allow=g729&ulaw&alaw
type=friend
host=192.168.1.1 (public IPs also work, but better do it over VPN)
qualify=yes
context=from-internal
secret=putyoursupersecretpasswordhereok?
3. Click the Submit changes button at the bottom
4. Click the Apply Configuration Changes at the top
5. Click Continue with reload
6. Next, click on Outbound routes on the left.
Route Name: To-Manila
Dial Pattern:
41XX (considering that the extension range for the Manila Asterisk is 4100-4199)
0|2. (because Manila’s area code is 2)
Trunk Sequence: IAX2/To-Manila
7. Submit changes and Apply Configuration Changes
On Both Asterisk
1. Create the extensions on both servers.
2. Setup DNS. The hostname must have internal and external records, for convenience’s sake.
You’re all set, for now. You can now call softphone users in both offices.
More to follow.


