summaryrefslogtreecommitdiff
path: root/xpp/perl_modules/Dahdi/Span.pm
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-12-08 14:02:25 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-12-08 14:02:25 +0000
commit7a2ff2ba23fc6952fca63fd31a987aa3bfe7cf83 (patch)
tree16a9b0c29838f0df8bc391390f7d6ce2c6851a11 /xpp/perl_modules/Dahdi/Span.pm
parentb3e8ddc056feb1068314f3d9c44172316ab9138b (diff)
Fix detection of the B410P card.
All ports will be reported as TE. Tested by write_erase on #asterisk-dev. git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@5452 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'xpp/perl_modules/Dahdi/Span.pm')
-rw-r--r--xpp/perl_modules/Dahdi/Span.pm11
1 files changed, 7 insertions, 4 deletions
diff --git a/xpp/perl_modules/Dahdi/Span.pm b/xpp/perl_modules/Dahdi/Span.pm
index 96a18b4..5606611 100644
--- a/xpp/perl_modules/Dahdi/Span.pm
+++ b/xpp/perl_modules/Dahdi/Span.pm
@@ -133,7 +133,8 @@ my @bri_strings = (
'BRI_(NT|TE)',
'(?:quad|octo)BRI PCI ISDN Card.* \[(NT|TE)\]\ ',
'octoBRI \[(NT|TE)\] ',
- 'HFC-S PCI A ISDN.* \[(NT|TE)\] '
+ 'HFC-S PCI A ISDN.* \[(NT|TE)\] ',
+ '(B4XXP) \(PCI\) Card', # Does not expose NT/TE type
);
my @pri_strings = (
@@ -188,10 +189,12 @@ sub new($$) {
$self->{IS_PRI} = 0;
foreach my $cardtype (@bri_strings) {
if($head =~ m/$cardtype/) {
+ my $termtype = $1;
+ $termtype = 'TE' if ( $1 eq 'B4XXP' );
$self->{IS_DIGITAL} = 1;
$self->{IS_BRI} = 1;
- $self->{TERMTYPE} = $1;
- $self->{TYPE} = "BRI_$1";
+ $self->{TERMTYPE} = $termtype;
+ $self->{TYPE} = "BRI_$termtype";
$self->{DCHAN_IDX} = 2;
$self->{BCHAN_LIST} = [ 0, 1 ];
last;
@@ -259,7 +262,7 @@ sub new($$) {
# Infer some info from channel name:
my $first_chan = ($self->chans())[0] || die "$0: No channels in span #$num\n";
my $chan_fqn = $first_chan->fqn();
- if($chan_fqn =~ m(ZTHFC.*/|ztqoz.*/|XPP_BRI_.*/)) { # BRI
+ if($chan_fqn =~ m(ZTHFC.*/|ztqoz.*/|XPP_BRI_.*|B4/.*)) { # BRI
$self->{FRAMING} = 'ccs';
$self->{SWITCHTYPE} = 'euroisdn';
$self->{SIGNALLING} = ($self->{TERMTYPE} eq 'NT') ? $DAHDI_BRI_NET : $DAHDI_BRI_CPE ;