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

gjungwirth/fix_tests
Andrew Pogrebennyk 13 years ago
parent f6f4e33c6b
commit cc9fe6ed5e

@ -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