- my @dxchan = @_;
- foreach my $p (@{$self->{parent}}) {
- my $ref = $self->get($p);
- push @dxchan, $ref->alldxchan(@dxchan) if $ref;
+ unless (@dxchan) {
+ foreach my $p (@{$self->{parent}}) {
+# dbg("Trying parent $p") if isdbg('routech');
+ next if $p eq $main::mycall; # the root
+ my $dxchan = DXChannel->get($p);
+ if ($dxchan) {
+ push @dxchan, $dxchan unless grep $dxchan == $_, @dxchan;
+ } else {
+ next if grep $p eq $_, @_;
+ my $ref = Route::Node::get($p);
+# dbg("Next node $p " . ($ref ? 'Found' : 'NOT Found') if isdbg('routech') );
+ push @dxchan, $ref->alldxchan($self->{call}, @_) if $ref;
+ }
+ }