Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8358a234a5 | ||
|
|
5795575cf2 | ||
|
|
a33696c81e | ||
|
|
2f10cda05a | ||
|
|
e9ea988620 | ||
|
|
0245fef736 | ||
|
|
e8c7b0042e | ||
|
|
ff04c5db31 | ||
|
|
b3824291d5 | ||
|
|
58afc8f173 |
4
README
4
README
@@ -66,7 +66,7 @@ Installation to a Subtree
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
The following may be useful when testing the package or when preparing a
|
||||
package for a binary distribution (such as an rpm package) installing
|
||||
onto a subtree rather than on th real system.
|
||||
onto a subtree rather than on the real system.
|
||||
|
||||
make install DESTDIR=targetdir
|
||||
|
||||
@@ -138,7 +138,7 @@ include::genconf_parameters.asciidoc[]
|
||||
Tonezones
|
||||
~~~~~~~~~
|
||||
The file zonedata.c contains the information about the tone zones used
|
||||
in libtonezone (and hence also in ztcfg). Here is a list of those zones:
|
||||
in libtonezone (and hence also in dahdi_cfg). Here is a list of those zones:
|
||||
|
||||
include::tonezones.txt[]
|
||||
|
||||
|
||||
@@ -43,27 +43,42 @@ an FXO module of two ports.
|
||||
|
||||
Building and Installation
|
||||
-------------------------
|
||||
Apart from the standard DAHDI build requirements, you also need libusb
|
||||
development headers to build the fpga_load firmware loader. This is
|
||||
typically the package libusb-dev on Debian (and derivatives like Ubuntu)
|
||||
or libusb-devel on RedHat (and derivatives like CentOS/Trixbox).
|
||||
Apart from the standard DAHDI build requirements, you also need:
|
||||
|
||||
Patch for BRI
|
||||
~~~~~~~~~~~~~
|
||||
(As of DAHDI 2.2 this patch is no longer needed. Furthermore, it does
|
||||
not apply. The same directory has a newer patch that applies. This
|
||||
section is kept in the document for the time being for the benefit of
|
||||
those with older versions)
|
||||
* *libusb development headers* to build the fpga_load firmware loader.
|
||||
This is typically the package libusb-dev on Debian (and derivatives
|
||||
like Ubuntu) or libusb-devel on RedHat (and derivatives like
|
||||
CentOS/Trixbox).
|
||||
* *Echo Canceller Module firmware*: If you have an Astribank with an
|
||||
echo canceller module, see the following section.
|
||||
|
||||
In order for the BRI module (xpd_bri.ko) to build, you still need an
|
||||
external patch:
|
||||
Follow the build instructions of DAHDI-linux and DAHDI-tools. But
|
||||
Basically, in dahdi-linux run:
|
||||
|
||||
http://updates.xorcom.com/astribank/bristuff/dahdi_bri_dchan.diff[]
|
||||
make
|
||||
make install # as root
|
||||
|
||||
You need to apply it to the dahdi-linux tarball before building:
|
||||
And later in dahdi-tools:
|
||||
|
||||
wget http://updates.xorcom.com/astribank/bristuff/dahdi_bri_dchan.diff
|
||||
patch -p1 <dahdi_bri_dchan.diff
|
||||
./configure
|
||||
make
|
||||
make install # as root
|
||||
|
||||
|
||||
Echo Canceller Firmware
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
If you install from source, you should copy OCT6104E-256D.ima to the
|
||||
source tree (before running make install:
|
||||
|
||||
wget http://updates.xorcom.com/astribank/hwec/OCT6104E-256D.ima
|
||||
mv OCT6104E-256D.ima drivers/dahdi/xpp/firmwares/
|
||||
|
||||
Alternatively, if you have already installed DAHDI-linux (e.g. from a
|
||||
binary package that does not include the firmware) you can just copy
|
||||
it directly to the target directory, /usr/share/dahdi using:
|
||||
|
||||
cd /usr/share/dahdi
|
||||
wget http://updates.xorcom.com/astribank/hwec/OCT6104E-256D.ima
|
||||
|
||||
|
||||
Installation Scenarios
|
||||
|
||||
@@ -131,7 +131,7 @@ my @bri_strings = (
|
||||
'(?:quad|octo)BRI PCI ISDN Card.* \[(NT|TE)\]',
|
||||
'octoBRI \[(NT|TE)\] ',
|
||||
'HFC-S PCI A ISDN.* \[(NT|TE)\] ',
|
||||
'(B4XXP) \(PCI\) Card', # Does not expose NT/TE type
|
||||
'(B4XXP) \(PCI\) Card', # Use dahdi_scan to determine TE/NT mode
|
||||
'(WCBRI)', # has selectable NT/TE modes via dahdi_cfg
|
||||
);
|
||||
|
||||
@@ -177,6 +177,28 @@ sub init_proto($$) {
|
||||
$self->{TYPE} = "${proto}_$self->{TERMTYPE}";
|
||||
}
|
||||
|
||||
sub get_digital_spantype {
|
||||
my $span_no = shift;
|
||||
my @lines = split /\n/, `dahdi_scan`;
|
||||
my $found_span = 0;
|
||||
foreach my $line (@lines) {
|
||||
if (! $found_span) {
|
||||
if ($line =~ m/\[$span_no\]/) {
|
||||
$found_span = 1;
|
||||
}
|
||||
} else {
|
||||
if ($line !~ m/^\[/) {
|
||||
if ($line =~ m/digital-(TE|NT)/ ){
|
||||
return $1;
|
||||
}
|
||||
} else {
|
||||
$found_span = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
die "Cannot determine digital spantype";
|
||||
}
|
||||
|
||||
sub new($$) {
|
||||
my $pack = shift or die "Wasn't called as a class method\n";
|
||||
my $proc_file = shift or die "Missing a proc file parameter\n";
|
||||
@@ -191,10 +213,16 @@ sub new($$) {
|
||||
$self->{IS_DIGITAL} = 0;
|
||||
$self->{IS_BRI} = 0;
|
||||
$self->{IS_PRI} = 0;
|
||||
$self->{TERMTYPE} = "UNKNOWN";
|
||||
foreach my $cardtype (@bri_strings) {
|
||||
if($head =~ m/$cardtype/) {
|
||||
my $termtype = $1;
|
||||
$termtype = 'TE' if ( $1 eq 'B4XXP' or $1 eq 'WCBRI' );
|
||||
if ($1 eq 'B4XXP') {
|
||||
$termtype = get_digital_spantype($num);
|
||||
}
|
||||
if ($1 eq 'WCBRI') {
|
||||
$termtype = 'TE';
|
||||
}
|
||||
$self->{IS_DIGITAL} = 1;
|
||||
$self->{IS_BRI} = 1;
|
||||
$self->{TERMTYPE} = $termtype;
|
||||
@@ -230,6 +258,11 @@ sub new($$) {
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
if (($self->is_soft_term_type == 0) and ($self->termtype eq "UNKNOWN")) {
|
||||
$self->{IS_SOFT_TERM_TYPE} = 1;
|
||||
}
|
||||
|
||||
($self->{NAME}, $self->{DESCRIPTION}) = (split(/\s+/, $head, 4))[2, 3];
|
||||
$self->{IS_DAHDI_SYNC_MASTER} =
|
||||
($self->{DESCRIPTION} =~ /\(MASTER\)/) ? 1 : 0;
|
||||
@@ -368,7 +401,7 @@ SPEC:
|
||||
#print STDERR "match: $match\n";
|
||||
foreach my $pattern (@patlist) {
|
||||
#print STDERR "testmatch: $pattern =~ $match\n";
|
||||
if($pattern =~ $match) {
|
||||
if($pattern =~ /^$match$/) {
|
||||
#print STDERR "MATCH '$pattern' ~ '$match' termtype=$termtype\n";
|
||||
$match_termtype = $termtype;
|
||||
last SPEC;
|
||||
|
||||
@@ -29,6 +29,7 @@ set -e
|
||||
# For lab testing
|
||||
mydir=`dirname $0`
|
||||
PATH="${mydir}:${PATH}"
|
||||
XPP_WAIT_AB_TIMEOUT=80
|
||||
|
||||
[ -r /etc/dahdi/init.conf ] && . /etc/dahdi/init.conf
|
||||
|
||||
@@ -56,7 +57,7 @@ fi
|
||||
|
||||
# Wait for driver and first device
|
||||
echo -n 1>&2 "Astribanks detection "
|
||||
tries=40
|
||||
tries="$XPP_WAIT_AB_TIMEOUT"
|
||||
while [ ! -e "/sys/bus/astribanks/devices/xbus-00" ]
|
||||
do
|
||||
if [ "$tries" -le 0 ]; then
|
||||
|
||||
Reference in New Issue
Block a user