[dahdi-commits] tzafrir: tools/trunk r9979 - in /tools/trunk/xpp: ./ perl_modules/Dahdi/
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Thu Jun 16 04:35:40 CDT 2011
Author: tzafrir
Date: Thu Jun 16 04:35:32 2011
New Revision: 9979
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9979
Log:
dahdi_genconf: apply termtype to Digium HA8 BRI
Make the pri_termtype setting in genconf_parameters apply to any BRI/PRI
carddeclared as "soft NT". ATM, this is only the Xorcom E1/T1 device
and the Digium HA8 (BRI) module of the TDM card.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Acked-by: Shaun Ruffell <sruffell at digium.com>
Modified:
tools/trunk/xpp/dahdi_genconf
tools/trunk/xpp/perl_modules/Dahdi/Span.pm
Modified: tools/trunk/xpp/dahdi_genconf
URL: http://svnview.digium.com/svn/dahdi/tools/trunk/xpp/dahdi_genconf?view=diff&rev=9979&r1=9978&r2=9979
==============================================================================
--- tools/trunk/xpp/dahdi_genconf (original)
+++ tools/trunk/xpp/dahdi_genconf Thu Jun 16 04:35:32 2011
@@ -38,7 +38,7 @@
my $gconfig = shift || die;
my @spans = @_;
foreach my $span (@spans) {
- if($span->is_pri) {
+ if($span->is_pri || $span->is_bri) {
$span->pri_set_fromconfig($gconfig);
}
}
Modified: tools/trunk/xpp/perl_modules/Dahdi/Span.pm
URL: http://svnview.digium.com/svn/dahdi/tools/trunk/xpp/perl_modules/Dahdi/Span.pm?view=diff&rev=9979&r1=9978&r2=9979
==============================================================================
--- tools/trunk/xpp/perl_modules/Dahdi/Span.pm (original)
+++ tools/trunk/xpp/perl_modules/Dahdi/Span.pm Thu Jun 16 04:35:32 2011
@@ -150,6 +150,11 @@
'Rhino R1T1 (T1)/PRI Card', # r1t1
'WP(E1|T1)/.* "wanpipe', # Sangoma E1/T1
);
+
+my @soft_term_type_strings = (
+ 'Xorcom XPD.*: (E1|T1)', # Astribank PRI
+ '(WCBRI)', # has selectable NT/TE modes via dahdi_cfg
+);
our $DAHDI_BRI_NET = 'bri_net';
our $DAHDI_BRI_CPE = 'bri_cpe';
@@ -196,6 +201,7 @@
$self->{TYPE} = "BRI_$termtype";
$self->{DCHAN_IDX} = 2;
$self->{BCHAN_LIST} = [ 0, 1 ];
+ $self->init_proto('BRI');
last;
}
}
@@ -214,6 +220,13 @@
$self->{IS_PRI} = 1;
$self->{TERMTYPE} = $termtype;
$self->init_proto($proto);
+ last;
+ }
+ }
+ $self->{IS_SOFT_TERM_TYPE} = 0;
+ foreach my $cardtype (@soft_term_type_strings) {
+ if($head =~ m/$cardtype/) {
+ $self->{IS_SOFT_TERM_TYPE} = 1;
last;
}
}
@@ -305,7 +318,11 @@
my $span = shift || die;
my $termtype = shift || die;
$span->{TERMTYPE} = $termtype;
- $span->{SIGNALLING} = ($termtype eq 'NT') ? $DAHDI_PRI_NET : $DAHDI_PRI_CPE ;
+ if ($span->is_pri) {
+ $span->{SIGNALLING} = ($termtype eq 'NT') ? $DAHDI_PRI_NET : $DAHDI_PRI_CPE ;
+ } elsif ($span->is_bri) {
+ $span->{SIGNALLING} = ($termtype eq 'NT') ? $DAHDI_BRI_NET : $DAHDI_BRI_CPE ;
+ }
$span->{TYPE} = $span->proto . "_$termtype";
}
@@ -313,6 +330,7 @@
my $span = shift || die;
my $genconf = shift || die;
my $name = $span->name;
+ return unless $span->is_soft_term_type;
# if(defined $termtype) {
# die "Termtype for $name already defined as $termtype\n";
# }
More information about the dahdi-commits
mailing list