Connecting 2 servers

Has anyone successfully connected 2 servers using fully qualified domain names. I configured the system used the article at: http://www.cadvision.com/blanchas/Asterisk/IAX2Trunk.html. However, when checking “iax2 show peers” in the Asterisk CLI, it indicates “unreachable” status. After setting up the IAX2 trunks, configured as follows.

Box A - Trunk Name: 106-peer

Peer Detail:
host=myname1.dyndns.org
username=101-user
secret=1234
type=peer
qualify=yes

Box A Incoming Settings :

User Context: 106-user

User Details:
secret=1234
type=user
context=from-trunk (Note: Also tried using context=from-internal and same result.)

Box B - Trunk Name: 101-peer

Peer Details:
host=myname2.dyndns.org
username=106-user
secret=1234
type=peer
qualify=yes

Box B Incoming Settings:

User Context: 101-user

User Detail:
secret=1234
type=user
context=from-trunk (Note: Also tried using context=from-internal and same result.)

Any help would be appreciated.

on myname1 if you type ping myname2.dyndns.org and get a IP result? and if on myname2 you type ping myname1.dyndns.org you get a ip result?

If not you need to fix that dns issue first.

We do IAX trunking with DNS names with no problem. But the names are static and don’t change and our DNS is very good.

Also we use friend instead of user/peer.

There is a good doc on this site that shows how also look in the documentation , administration near the bottom for the link.

http://www.freepbx.org/support/documentation/administration-guide/connecting-2-or-more-boxes