From 7a2ff2ba23fc6952fca63fd31a987aa3bfe7cf83 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Mon, 8 Dec 2008 14:02:25 +0000 Subject: 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 --- xpp/perl_modules/Dahdi/Span.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'xpp/perl_modules') 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 ; -- cgit v1.2.3