My SIP provider has mentioned that their trunk now works on a round robin of IP addresses that
can scale up or down based on demand and that I may need to adjust my DNS settings on asterisk to check for peers every 60 seconds to match their TTL.
Can anyone kindly advise how I do this on FreePBX?
I’d suggest that 60 seconds is a bit aggressive.
It is done in /etc/asterisk/dnsmgr.conf. As of 2019, at least, it would appear that there was no GUI support for this, and I haven’t found anything more recent that contradicts that.
I do not believe that chan_sip supports this.
You will need to provide match information for the complete range of possible addresses, to recognize incoming traffic.
The sample configuration file is at asterisk/dnsmgr.conf.sample at master · asterisk/asterisk · GitHub
Yes it seems my outdated version of freepbx doesn’t have the dnsmgr.conf file. Looking at the fail2ban log when I get errors that say sip peer unreachable, I usually get a now reachable message within the minute. So does that mean it’s already 60 seconds or lower? What is the default? The reason my provider has suggested this is because today I’ve been having very intermittent connection issues where I’d get busy tone and looking at the fail2ban it shows peer unreachable. This is mainly happening today. Looking at previous day’s it doesn’t seem to show those errors
Default is disabled, i.e. DNS is only resolved when the configuration is reloaded. The example given in the sample file is 5 minutes,
This is an Asterisk file, that isn’t included in FreePBX. You will have to copy and configure the sample file, unless I’ve overlooked support being recently added.
OK, so if I copy that dnsmgr.conf example file to /etc/asterisk/ folder reboot freepbx, do you think the DNS will re-query every x seconds?
I’m assuming their IP address changes from time to time and if DNS isn’t refreshed then freePBX will used the cached IP address of the hostname? that may explain why problem disappeared for a while when I made changes to DNS servers setting.
If freepbx doesn’t support it, could I not just create a cron job to refresh DNS on the freepbx system itself by connecting via SSH?
You will need to remove the ; comment markers and change enabled to yes.
It isn’t FreePBX that is using DNS here, it is Asterisk. Asterisk support dnsmgr.conf, but FreePBX does not provide one and doesn’t provide a GUI.
I’m not sure I understand your last proposal.
Ok thanks I will try that. Is there a way to test or make sure it’s actually working and doing the DNS refresh?
It looks as though it logs at debug level 6, but that will produce a lot of noise in the debug/full log.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.