MT#3997 MT#5193 Fix build_via_routes with only one external sbc.

agranig/rest
Andrew Pogrebennyk 12 years ago committed by Andreas Granig
parent f11ae484ef
commit d52049a8f7

@ -63,8 +63,14 @@ sub build_via_routes {
my @options = ();
push @options, { label => 'None', value => '' };
foreach my $via(@{ $self->form->ctx->config->{sip}->{external_sbc} }) {
my $uri = '<' . $via . ';lr>';
my $sbcref = $self->form->ctx->config->{sip}->{external_sbc};
if(ref $sbcref eq "ARRAY") {
foreach my $via(@{ $sbcref }) {
my $uri = '<' . $via . ';lr>';
push @options, { label => $uri, value => $uri };
}
} else {
my $uri = '<' . $sbcref . ';lr>';
push @options, { label => $uri, value => $uri };
}
return \@options;

Loading…
Cancel
Save