- $clref = DXCluster->get_exact($ref->{to});
- unless ($clref) { # otherwise look for a homenode
- my $uref = DXUser->get_current($ref->{to});
- my $hnode = $uref->homenode if $uref;
- $clref = DXCluster->get_exact($hnode) if $hnode;
- }
- if ($clref && !grep { $clref->{dxchan} == $_ } DXCommandmode::get_all()) {
- next if $clref->call eq $main::mycall; # i.e. it lives here
- $noderef = $clref->{dxchan};
- $ref->start_msg($noderef) if !get_busy($noderef->call) && $noderef->state eq 'normal';
+ $clref = Route::get($ref->{to});
+# unless ($clref) { # otherwise look for a homenode
+# my $uref = DXUser->get_current($ref->{to});
+# my $hnode = $uref->homenode if $uref;
+# $clref = Route::Node::get($hnode) if $hnode;
+# }
+ if ($clref) {
+ $dxchan = $clref->dxchan;
+ if ($dxchan) {
+ if ($dxchan->is_node) {
+ next if $clref->call eq $main::mycall; # i.e. it lives here
+ $ref->start_msg($dxchan) if !get_busy($dxchan->call) && $dxchan->state eq 'normal';
+ }
+ } else {
+ dbg("Route: No dxchan for $ref->{to} " . ref($clref) ) if isdbg('msg');
+ }