diff options
Diffstat (limited to 'kernel/xpp/utils/zconf/Zaptel/Chans.pm')
-rw-r--r-- | kernel/xpp/utils/zconf/Zaptel/Chans.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/xpp/utils/zconf/Zaptel/Chans.pm b/kernel/xpp/utils/zconf/Zaptel/Chans.pm index 53ed277..aa58d1d 100644 --- a/kernel/xpp/utils/zconf/Zaptel/Chans.pm +++ b/kernel/xpp/utils/zconf/Zaptel/Chans.pm @@ -149,18 +149,19 @@ sub new($$$$$$) { # WP[TE]1: Sangoma. TODO: this one tells us if it is TE or NT. # cwain: Junghanns E1 card. $type = "PRI"; - } elsif ($fqn =~ m{\b(ZTHFC%d*|ztqoz\d*)/.*}) { + } elsif ($fqn =~ m{\b(B4|ZTHFC\d*|ztqoz\d*)/.*}) { + # B4: The Digium wcb4xxp ZAPTEL driver # ZTHFC: HFC-s single-port card (zaphfc/vzaphfc) # ztqoz: qozap (Junghanns) multi-port HFC card $type = "BRI"; } elsif ($fqn =~ m{\bztgsm/.*}) { # Junghanns GSM card $type = "GSM"; - } elsif(defined $signalling) { + } elsif($signalling ne '') { $type = 'FXO' if $signalling =~ /^FXS/; $type = 'FXS' if $signalling =~ /^FXO/; } else { - $type = undef; + $type = $self->probe_type(); } $self->type($type); $self->span()->type($type) @@ -216,8 +217,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 undef unless defined $self->type && $self->type eq 'FXO'; return $self->{BATTERY} if defined $self->{BATTERY}; my $xpd = $span->xpd; |