summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/xpp/utils/zconf/Zaptel/Chans.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/xpp/utils/zconf/Zaptel/Chans.pm b/kernel/xpp/utils/zconf/Zaptel/Chans.pm
index cb0fb94..53ed277 100644
--- a/kernel/xpp/utils/zconf/Zaptel/Chans.pm
+++ b/kernel/xpp/utils/zconf/Zaptel/Chans.pm
@@ -157,8 +157,8 @@ sub new($$$$$$) {
# Junghanns GSM card
$type = "GSM";
} elsif(defined $signalling) {
- $type = 'FXS' if $signalling =~ /^FXS/;
- $type = 'FXO' if $signalling =~ /^FXO/;
+ $type = 'FXO' if $signalling =~ /^FXS/;
+ $type = 'FXS' if $signalling =~ /^FXO/;
} else {
$type = undef;
}
@@ -216,6 +216,7 @@ sub battery($) {
my $self = shift or die;
my $span = $self->span or die;
+ return undef if (not defined $self->type);
return undef unless $self->type eq 'FXO';
return $self->{BATTERY} if defined $self->{BATTERY};