IAX trunk between 2 freepbx servers

Hello,

I’m setting up a IAX trunk between 2 freepbx servers. I’m just starting out on this so I’m setting up extension to extension calling between the two locations first and will move to allowing calling out SIP trunking providers from either location, routing incoming calls across both PBX’s, and so on afterwards. I’m trying to determine what is the best/safest setting for the IAX trunk PEER and USER details. And if there is just a better way to do this.

In particular I’m interested if my type and context settings are ideal. I get a bit lost with the “from-internal”, “front-trunk” stuff. Also curious if using type=friend vs type=peer and user makes a difference. Could the use of a register string make it safer (if so, how might I do that)?

What I’ve done is as follows;

PBX1

PBX2

So I’m using a Peer & User configuration. I know I will change User details context=from-internal if I want to make outbound calls through the other PBX SIP trunks.

I’ve read that you can also setup the Peer Details with a type=friend and a shared username/password. And you delete the User Details. Is there any advantage/disadvantage between these two methods (User&Peer vs Friend)?

Hi,

All the configuration is case sensitive.

First Server:

Trunk Name: Second Server

Trunk Name: SECOND-SERVER

Peer details:

host=ip_second_server
username=FIRST-SERVER
secret=some_secret
type=friend
context=from-internal
transfer=no
allow=alaw&ulaw
disallow=all

Second Server:

Trunk Name: First Server

Trunk Name: FIRST-SERVER

Peer details:

host=ip_first_server
username=SECOND-SERVER
secret=some_secret
type=friend
context=from-internal
transfer=no
allow=alaw&ulaw
disallow=all

There is no need for the user details.

Thank you,

Daniel Friedman
Trixton LTD.

Mobile: +41.79.868.7050
Email: [email protected]

3 Likes

This is GOLD ! Should be in the wiki someplace.

1 Like

It is - it’s in lots of them. The problem is that there are hundreds of variations that also work.

Here is a good description in the wiki:
http://wiki.freepbx.org/plugins/servlet/mobile#content/view/4161588

Using registration doesn’t hurt, but it’s main function is to let a server know the IP address of another server that registers to it.

If you don’t have dynamic IP addresses, you don’t need registration.
Qualify is used to periodically check if a peer is up.