- my $parent = Route::Node::get($self->{call});
- my @rout = $parent->del_nodes;
- $self->route_pc21($origin, $line, @rout, $parent) if @rout;
+ my $node = Route::Node::get($self->{call}) ;
+ my @rout;
+ foreach my $n ($node->nodes) {
+ next if $n eq $main::mycall;
+ next if $n eq $self->{call};
+ my $nref = Route::Node::get($n);
+ push @rout, $node->remove_route($nref, $self) if $nref;
+ }
+ $self->route_pc21($origin, $line, @rout) if @rout;
+ for (@rout) {
+ $_->delete;
+ };
+
+ # send the new config