Dnsmgr.conf

From "PTTLink Wiki"
Jump to navigation Jump to search

dnsmgr.conf is used to enable dnsmgr in asterisk. This is extremely important as nodes register using IAX2 to register.pttlink.org, and the IP may change of this server from time to time. Prior to 2018 there was only one registration server and it was a single point of failure. If dnsmgr is not enabled, asterisk will only do a lookup once for the server when it is started. The server IP may change and asterisk will use the old IP address (and fail registering) until it's restarted.

With dnsmgr enabled, asterisk will refresh the IP address of register.pttlink.org once every five minutes.

dnsmgr.conf

   [general]
   enable=yes              ; enable creation of managed DNS lookups
                           ; default is 'no'
   refreshinterval=300     ; refresh managed DNS lookups every <n> seconds
                           ; default is 300 (5 minutes)

Simply add this config file and restart asterisk.

Verify

   PTTLink*CLI>iax2 show registry
   Host                  dnsmgr  Username    Perceived             Refresh  State
   44.72.21.13:4569      Y       44233       44.98.249.6:4569           60  Registered
   44.72.21.13:4569      Y       42032       44.98.249.6:4569           60  Registered

The "Y" under dnsmgr shows you that dnsmgr is running and your nodes are registered to 44.72.21.13 with an external IP of 44.98.249.6. If you don't see this, dnsmgr isn't running and you'll need to troubleshoot it.