[arm-allstar] Adjusting node DNS timeout
Mike Nix
mnix at wanm.com.au
Wed Jun 10 07:52:04 EDT 2020
Hi David,
I had thought about a wrapper but assumed dns-query was just a
diagnostic tool, not the work horse.
Your wrapper is in place and is working well, with queries reliably
returning a result as expected - Thanks!
Linking now works without assistance too.
Once a stream is established, the satellite link seems quite consistent
most of the time - with at least 95% of inbound audio being excellent
quality. There are occasional problems with jitter getting up around
460ms, but for the most part it's good at around 15 - 35ms.
73, Mike
VK6MN
David McGough wrote on 06/10/2020 03:39 PM:
> 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