- # put non-pc9x nodes to the back of the queue
- my $l = $level + ($nref->{do_pc9x} && ($nref->{version}||5454) >= 5454 ? 0 : 30);
- dbg("recursing from $call -> $ncall level $l") if isdbg('routec');
- my @rout = findroutes($ncall, $l+1, $seen);
- push @out, @rout;
+ # obtain the dxchannels that have seen this thingy
+ my @parent = $nref->isa('Route::User') ? @{$nref->{parent}} : $call;
+ my %cand;
+ foreach my $p (@parent) {
+ # return immediately if we are directly connected or a user's parent node is
+ $dxchan = DXChannel::get($p);
+ return $dxchan if $dxchan;
+
+ my $r = Route::Node::get($p);
+ if ($r) {
+ my %r = $r->PC92C_dxchan;
+ while (my ($k, $v) = each %r) {
+ $cand{$k} = $v if $v > ($cand{$k} || 0);
+ }