summaryrefslogtreecommitdiff
path: root/xpp/perl_modules
diff options
context:
space:
mode:
Diffstat (limited to 'xpp/perl_modules')
-rw-r--r--xpp/perl_modules/Dahdi/Chans.pm3
-rw-r--r--xpp/perl_modules/Dahdi/Config/Gen/System.pm10
-rw-r--r--xpp/perl_modules/Dahdi/Span.pm11
3 files changed, 19 insertions, 5 deletions
diff --git a/xpp/perl_modules/Dahdi/Chans.pm b/xpp/perl_modules/Dahdi/Chans.pm
index 531eb8b..820deef 100644
--- a/xpp/perl_modules/Dahdi/Chans.pm
+++ b/xpp/perl_modules/Dahdi/Chans.pm
@@ -151,7 +151,8 @@ sub new($$$$$$) {
# cwain: Junghanns E1 card.
# R[124]: Rhino r1t1/rxt1 cards
$type = "PRI";
- } elsif ($fqn =~ m{\b(B4|ZTHFC\d*|ztqoz\d*)/.*}) {
+ } elsif ($fqn =~ m{\b(WCBRI|B4|ZTHFC\d*|ztqoz\d*)/.*}) {
+ # WCBRI: The Digium Hx8 series cards with BRI module.
# B4: The Digium wcb4xxp DAHDI driver
# ZTHFC: HFC-s single-port card (zaphfc/vzaphfc)
# ztqoz: qozap (Junghanns) multi-port HFC card
diff --git a/xpp/perl_modules/Dahdi/Config/Gen/System.pm b/xpp/perl_modules/Dahdi/Config/Gen/System.pm
index d1dfe40..d7c2523 100644
--- a/xpp/perl_modules/Dahdi/Config/Gen/System.pm
+++ b/xpp/perl_modules/Dahdi/Config/Gen/System.pm
@@ -112,6 +112,10 @@ sub gen_digital($$$) {
$span_crc4 = (defined $span_crc4) ? ",$span_crc4" : '';
my $span_yellow = $span->yellow();
$span_yellow = (defined $span_yellow) ? ",$span_yellow" : '';
+ my $span_termination = $span->termination();
+ $span_termination = (defined $span_termination) ? ",$span_termination" : '';
+ my $span_softntte = $span->softntte();
+ $span_softntte = (defined $span_softntte) ? ",$span_softntte" : '';
# "MFC/R2 does not normally use CRC4"
# FIXME: a finer way to override:
if ($gconfig->{'pri_connection_type'} eq 'R2') {
@@ -119,14 +123,16 @@ sub gen_digital($$$) {
$framing = 'cas';
}
$timing = ($termtype eq 'NT') ? 0 : $bri_te_last_timing++;
- printf "span=%d,%d,%d,%s,%s%s%s\n",
+ printf "span=%d,%d,%d,%s,%s%s%s%s%s\n",
$num,
$timing,
$lbo,
$framing,
$coding,
$span_crc4,
- $span_yellow;
+ $span_yellow,
+ $span_termination,
+ $span_softntte;
printf "# termtype: %s\n", lc($termtype);
my $dchan_type;
if ($span->is_bri()) {
diff --git a/xpp/perl_modules/Dahdi/Span.pm b/xpp/perl_modules/Dahdi/Span.pm
index b7987e1..943ab2b 100644
--- a/xpp/perl_modules/Dahdi/Span.pm
+++ b/xpp/perl_modules/Dahdi/Span.pm
@@ -135,6 +135,7 @@ my @bri_strings = (
'octoBRI \[(NT|TE)\] ',
'HFC-S PCI A ISDN.* \[(NT|TE)\] ',
'(B4XXP) \(PCI\) Card', # Does not expose NT/TE type
+ '(WCBRI)', # has selectable NT/TE modes via dahdi_cfg
);
my @pri_strings = (
@@ -194,7 +195,7 @@ sub new($$) {
foreach my $cardtype (@bri_strings) {
if($head =~ m/$cardtype/) {
my $termtype = $1;
- $termtype = 'TE' if ( $1 eq 'B4XXP' );
+ $termtype = 'TE' if ( $1 eq 'B4XXP' or $1 eq 'WCBRI' );
$self->{IS_DIGITAL} = 1;
$self->{IS_BRI} = 1;
$self->{TERMTYPE} = $termtype;
@@ -259,6 +260,8 @@ sub new($$) {
$self->{CHANS} = \@channels;
$self->{YELLOW} = undef;
$self->{CRC4} = undef;
+ $self->{SOFTNTTE} = undef;
+ $self->{TERMINATION} = undef;
if($self->is_bri()) {
$self->{CODING} = 'ami';
$self->{DCHAN} = ($self->chans())[$self->{DCHAN_IDX}];
@@ -266,7 +269,11 @@ 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_.*|B4/.*)) { # BRI
+ if($chan_fqn =~ m(ZTHFC.*/|ztqoz.*/|XPP_BRI_.*|B4/.*|WCBRI/.*)) { # BRI
+ if($chan_fqn =~ m(WCBRI/.*)) { # make sure to set termination resistors on hybrid cards
+ $self->{TERMINATION} = 'term';
+ $self->{SOFTNTTE} = 'te';
+ }
$self->{FRAMING} = 'ccs';
$self->{SWITCHTYPE} = 'euroisdn';
$self->{SIGNALLING} = ($self->{TERMTYPE} eq 'NT') ? $DAHDI_BRI_NET : $DAHDI_BRI_CPE ;