[arm-allstar] Adjusting node DNS timeout

David McGough kb4fxc at inttek.net
Wed Jun 10 03:39:21 EDT 2020


Hi Mike,

There is no way to currently adjust the dns-query program for such long 
timeouts. With such high levels of variable latency, I question whether 
you'll have success trying to run VoIP over that satellite link?

Anyhow, you can simply add a wrapper-script around the dns-query program 
to lengthen the delay.

To try this, simply mode the /usr/local/sbin/dns-query symbolic link to 
another name, and place this sample script in its place....No guarantees 
about how this may (or may not) work.  Adjust the timing as needed.


#########################################################################
#### Replacement script for /usr/local/sbin/dns-query
#########################################################################
#!/bin/bash

D=/usr/local/hamvoip-dnsreg/sbin/dns-query
A=/usr/bin/awk

for i in 1 2 3 4 5 ; do
	J=$($D $* 2>/dev/null)
	K=$($A '-F|' '{print $1}' <<< $J)
	if [ "$K" == "+OK" ] ; then
		break
	fi
	sleep .2
done
echo $J
#########################################################################


73, David KB4FXC



On Wed, 10 Jun 2020, "Mike Nix via ARM-allstar" wrote:

> Hi All,

Is there a way to adjust the timeout on DNS lookups by nodes?

I have a satellite based internet connection which means the ping times
across the link are typically 600ms or more - download speeds are great,
but latency is terrible.

Most DNS queries by dig complete in about 800 - 1000ms, with the odd one
taking 2000+.

When I run
    #time dns-query <node>
it consistently returns with a timeout after 755ms, however if I try the
same node again a few seconds later it returns with a result in a few ms
- obviously cached by the named on the node.

If I try to connect an outgoing link in asterisk (using DTMF, or the web
interface or asterisk commands) it appears to fail because the DNS
lookup times out. If I do
    CLI> rpt lookup <node>
it will report not found, but if I try again a few seconds later it
reports the correct info for the node.

If I then try to connect the link straight away it succeeds and works
perfectly for as long as I leave it up.

It seems to me that the dns-query timeout - and likely the asterisk rpt
lookup timeout are too short for my high-latency internet connection and
configuring it to be 2 - 3 seconds should solve my issue, but how/where
do I do that?

I'm running hamvoip RPi2-3-4_V1.6-01_Allstar.img.xz
<https://www2.hamvoip.org/RPi2/RPi2-3-4_V1.6-01_Allstar.img.xz>
downloaded a week or so ago and updated.

*** before anyone suggests it, no, I don't feel like moving my QTH or
dragging a satellite into a lower orbit to reduce the link latency :-)

Mike
VK6MN

_______________________________________________

ARM-allstar mailing list
ARM-allstar at hamvoip.org
http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar

Visit the BBB and RPi2/3/4 web page - http://hamvoip.org



More information about the ARM-allstar mailing list