Skip to content

Commit 466357f

Browse files
asteriskteamsruffell
authored andcommitted
Import DAHDI-Tools r9159
This revision of DAHDI-Tools is the base revision for the switch to git. git-svn-id: http://svn.astersk.org/svn/dahdi/tools/tools/trunk@9159
1 parent a885b2c commit 466357f

File tree

132 files changed

+39890
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+39890
-0
lines changed

LICENSE

+341
Large diffs are not rendered by default.

LICENSE.LGPL

+504
Large diffs are not rendered by default.

Makefile

+420
Large diffs are not rendered by default.

README

+233
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
DAHDI Telephony Interface Driver
2+
=================================
3+
Asterisk Development Team <[email protected]>
4+
$Revision$, $Date$
5+
6+
DAHDI stands for Digium Asterisk Hardware Device Interface. This
7+
package contains the userspace tools to configure the kernel modules
8+
included in the package dahdi-linux.
9+
10+
Build Requirements
11+
------------------
12+
This package needs the headers from dahdi-linux. Thus you should install
13+
dahdi-linux before building dahdi-tools.
14+
15+
Build System
16+
~~~~~~~~~~~~
17+
gcc and friends. Generally you will need to install the package gcc.
18+
There may be cases where you will need a specific version of gcc to build
19+
kernel modules.
20+
21+
22+
Extra Libraries
23+
~~~~~~~~~~~~~~~
24+
Some libraries are needed for extra utilities that are provided with
25+
DAHDI.
26+
27+
- libusb is needed for building fpga_load, needed for firmware loading of
28+
the Xorcom Astribank.
29+
- libnewt is needed to build the optional but useful utility dahdi_tool.
30+
31+
32+
Installation
33+
~~~~~~~~~~~~
34+
Note: If using `sudo` to build/install, you may need to add /sbin to your PATH.
35+
----------------------------------
36+
./configure
37+
# optional step: select custom configuration:
38+
#make menuselect
39+
make
40+
make install
41+
# To install init scripts and config files:
42+
#make config
43+
----------------------------------
44+
45+
46+
Build Tweaks
47+
~~~~~~~~~~~~
48+
Partial Build/Install
49+
^^^^^^^^^^^^^^^^^^^^^
50+
There are some make targets that are provided to build or install just
51+
parts of DAHDI:
52+
53+
. Build targets:
54+
- make: Build DAHDI userspace programs. partial
55+
targets of it:
56+
* make 'utilname': builds 'utilname' alone (e.g: `make dahdi_diag`)
57+
* make utils: Build libtonezone.
58+
* make libs: Build libtonezone.
59+
. Install targets:
60+
- make install: Installs user space tools into /usr/sbin/ (TODO - list
61+
partial targets)
62+
- make config: should be run once to configure
63+
64+
65+
Installation to a Subtree
66+
^^^^^^^^^^^^^^^^^^^^^^^^^
67+
The following may be useful when testing the package or when preparing a
68+
package for a binary distribution (such as an rpm package) installing
69+
onto a subtree rather than on th real system.
70+
71+
make install DESTDIR=targetdir
72+
73+
This can be useful for any partial install target from the list above.
74+
75+
76+
Options For ./configure
77+
^^^^^^^^^^^^^^^^^^^^^^^
78+
The configure script various several tests and based on them generates
79+
some files ( build_tools/menuselect-deps and makeopts). You can pass it
80+
--with options and variable settings, for instance:
81+
82+
./configure --without-ncurses CC="gcc-4.10"
83+
84+
If you just want to recreate the same files without a full detection
85+
run, use:
86+
87+
./config.status
88+
89+
To re-run ./configure with the same parameters it was run with last
90+
time, use:
91+
92+
./ocnfig.status --recheck
93+
94+
95+
Configuration
96+
-------------
97+
Configuration for DAHDI resides under /etc/dahdi .
98+
99+
/etc/dahdi/system.conf
100+
~~~~~~~~~~~~~~~~~~~~~~
101+
The main method to configure DAHDI devices is using the utility
102+
*dahdi_cfg*. dahdi_cfg reads data from the configuration file
103+
/etc/dahdi/system.conf , figures out what configuration to send to
104+
channels, and send it to the kernel.
105+
106+
A sample annotated system.conf is included in this directory and
107+
installed by default. Edit it to suit your configuration. Alternatively
108+
use the script dahdi_genconf to generate one that should work with your
109+
system.
110+
111+
/etc/dahdi/init.conf
112+
~~~~~~~~~~~~~~~~~~~~
113+
The configuration file of the dahdi init.d script is
114+
/etc/dahdi/init.conf . That file is used to override defaults that are
115+
set at the beginning of the init.d script.
116+
117+
Reference Configuration
118+
~~~~~~~~~~~~~~~~~~~~~~~
119+
Sample system.conf
120+
~~~~~~~~~~~~~~~~~~
121+
include::system.conf.asciidoc[]
122+
123+
124+
Sample init.conf
125+
~~~~~~~~~~~~~~~~
126+
include::init.conf.asciidoc[]
127+
128+
129+
Sample genconf_parameters
130+
~~~~~~~~~~~~~~~~~~~~~~~~~
131+
FIXME: still not properly formatted.
132+
133+
include::genconf_parameters.asciidoc[]
134+
135+
136+
Tonezones
137+
~~~~~~~~~
138+
The file zonedata.c contains the information about the tone zones used
139+
in libtonezone (and hence also in ztcfg). Here is a list of those zones:
140+
141+
include::tonezones.txt[]
142+
143+
144+
DAHDI PERL modules
145+
~~~~~~~~~~~~~~~~~~
146+
The directory xpp has, in addition to helper utilities for the
147+
Xorcom Astribank, a collection of perl modules to provide information
148+
related to DAHDI. The perl modules themselves are under xpp/perl_modules/ .
149+
In xpp/ there are several utilities that use those modules:
150+
- xpp-specific: dahdi_registration, xpp_sync, xpp_blink .
151+
- General: lsdahdi, dahdi_genconf, dahdi_hardware, dahdi_drivers
152+
153+
The DAHDI perl modules will currently only be automatically installed if you
154+
happen to install the xpp directory. Those utilities require the perl modules
155+
to be installed, however they will also look for them in the directory
156+
perl_modules, and thus can be run directly from the DAHDI source tree. For
157+
example:
158+
159+
./xpp/dahdi_hardware -v
160+
161+
To get usage information on a program, you can also use perldoc
162+
(sometimes provided in a package separate from perl itself). For
163+
instance:
164+
165+
perldoc ./xpp/lsdahdi
166+
167+
Some of them are specific for the Xorcom Astribank and described in its
168+
docuemntation. the others are:
169+
170+
lsdahdi::
171+
A somewhat glorified `cat /proc/dahdi/*`.
172+
dahdi_genconf::
173+
Generates configuration based on the existing DAHDI channels and on
174+
/etc/dahdi/genconf_parameters (replaces genzaptelconf as well).
175+
dahdi_drivers::
176+
A two-liner script (not installed by default) that simply returns the
177+
modules that should be modprobed on this system.
178+
dahdi_hardware::
179+
Uses the information from sysfs and its own knowledge to show
180+
what PCI/USB DAHDI hardware is connected and if it is currently used
181+
by a driver. Shows also some more information for Astribanks from
182+
/proc/xpp .
183+
184+
185+
PPP Support
186+
~~~~~~~~~~~
187+
DAHDI digital cards can provide data channels through ppp as
188+
point-to-point connections. This requires a plugin to the ppp daemon
189+
that is included in the ppp/ subdirectory. To install it:
190+
191+
1. Make sure you have the PPP source / headers installed. On Debian:
192+
193+
apt-get install ppp-dev
194+
195+
2. Run 'make' on the ppp subdirectory:
196+
197+
make -C ppp
198+
make -C ppp install
199+
200+
3. Make sure your kernel has support for both PPP (which is common is
201+
distribution kernels and for HDLC (much less common) - CONFIG_PPP and
202+
CONFIG_HDLC .
203+
204+
205+
include::UPGRADE.txt[]
206+
207+
208+
License
209+
-------
210+
This package is distributed under the terms of the GNU General Public License
211+
Version 2, except for some components which are distributed under the terms of
212+
the GNU Lesser General Public License Version 2.1. Both licenses are included
213+
in this directory, and each file is clearly marked as to which license applies.
214+
215+
If you wish to use the DAHDI drivers in an application for which the license
216+
terms are not appropriate (e.g. a proprietary embedded system), licenses under
217+
more flexible terms can be readily obtained through Digium, Inc. at reasonable
218+
cost.
219+
220+
221+
Reporting Bugs
222+
--------------
223+
Please report bug and patches to the Asterisk bug tracker at
224+
http://bugs.digium.com/[] in the "DAHDI" category.
225+
226+
227+
Links
228+
-----
229+
- http://asterisk.org/[] - The Asterisk PBX
230+
- http://voip-info.org/[]
231+
- http://voip-info.org/wiki/view/DAHDI[]
232+
- http://docs.tzafrir.org.il/dahdi-tools/README.html[Up-to-date HTML version
233+
of this file]

UPGRADE.txt

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
Upgrade Notes
2+
-------------
3+
4+
Information for upgrading from Zaptel 1.2 or 1.4 to DAHDI 2.0
5+
6+
Upgrading from Zaptel to DAHDI is fairly straightforward; install this
7+
package using the installation instructions, and then reconfigure and
8+
rebuild Asterisk; Asterisk 1.4 releases later than 1.4.21, and all
9+
releases of Asterisk 1.6, will automatically use DAHDI in preference
10+
to Zaptel, even if Zaptel is still installed on the system.
11+
12+
Important notes about upgrading:
13+
14+
The Zaptel package, which included both kernel modules and userspace
15+
tools for configuring and managing the modules, has been split into
16+
two packages:
17+
18+
* dahdi-linux: kernel modules
19+
* dahdi-tools: userspace tools
20+
21+
In addition, there is a dahdi-linux-complete package that contains both
22+
dahdi-linux and dahdi-tools for simplified installation.
23+
24+
NOTE: The dahdi-linux and dahdi-tools packages have *separate*
25+
version numbers; they will not be released 'in sync', and it is
26+
perfectly acceptable to use (for example) dahdi-tools 2.0.6 with
27+
dahdi-linux 2.0.11. The dahdi-linux-complete package version number will
28+
always include *both* of these version numbers so that you will know
29+
what is included in it.
30+
31+
32+
DAHDI-Linux
33+
~~~~~~~~~~~
34+
Module Names
35+
^^^^^^^^^^^^
36+
The primary kernel modules have changed names; the new names are:
37+
38+
zaptel.ko -> dahdi.ko
39+
ztd-eth.ko -> dahdi_dynamic_eth.ko
40+
ztd-loc.ko -> dahdi_dynamic_loc.ko
41+
ztdummy.ko -> dahdi_dummy.ko
42+
ztdynamic.ko -> dahdi_dynamic.ko
43+
zttranscode.ko -> dahdi_transcode.ko
44+
45+
* The kernel modules for card drivers have *not* changed names,
46+
although the wcusb and torisa drivers are no longer included.
47+
48+
* This package no longer includes the 'menuselect' utility for
49+
choosing which modules to build; all modules that can be built are
50+
built automatically.
51+
52+
53+
Echo Canceller Modules
54+
^^^^^^^^^^^^^^^^^^^^^^
55+
It is no longer possible and needed to select a software echo canceler
56+
at compile time to build into dahdi.ko; all four included echo
57+
cancelers (MG2, KB1, SEC and SEC2) are built as loadable modules.
58+
If the Digium HPEC binary object file has been placed into the
59+
proper directory the HPEC module will be built as well.
60+
61+
Any or all of these modules can be loaded at the same time, and the echo
62+
canceler to be used on the system's channels can be configured using
63+
the dahdi_cfg tool from the dahdi-tools package.
64+
65+
IMPORTANT: It is *mandatory* to configure an echo canceler for the
66+
system's channels using dahdi_cfg unless the interface cards in use
67+
have echo canceler modules available and enabled. There is *no*
68+
default software echo canceler with DAHDI. See
69+
<<_echo_cancellers,section on echo cancellers>> in sample system.conf.
70+
71+
72+
DAHDI-Tools
73+
~~~~~~~~~~~
74+
Many tool names have changed:
75+
76+
ztcfg -> dahdi_cfg
77+
ztmonitor -> dahdi_monitor
78+
ztscan -> dahdi_scan
79+
ztspeed -> dahdi_speed
80+
zttest -> dahdi_test
81+
zttool -> dahdi_tool
82+
zapconf -> dahdi_genconf (deprecates genzaptelconf)
83+
84+
* The system configuration file has moved from /etc/zaptel.conf to
85+
<<_sample_system_conf,/etc/dahdi/system.conf>>.
86+
87+
* The dahdi_cfg tool can now be used to select an echo canceler on a
88+
channel-by-channel basis in the system configuration file; see
89+
system.conf.sample for examples of how to do this.
90+
91+
* The configuration for XPP init_card_* scripts is done now
92+
in /etc/dahdi/xpp.conf and uses a simple syntax (example included).
93+
For PRI modules, the 'pri_protocol' setting, determines how
94+
to configure it (E1/T1).
95+
96+
* In Astribank PRI modules, the LED behaviour represents which ports
97+
are *CLOCK MASTER* (red color) and which are *CLOCK SLAVE* (green color).
98+
Usually (but not always), this corresponds to the NT/TE settings in Asterisk.
99+
100+
* The /etc/sysconfig/zaptel (or /etc/default/zaptel file, depending
101+
on your distribution) is now split into two separate files:
102+
/etc/dahdi/modules control which modules are loaded and module options are
103+
set via /etc/modprobe.d/dahdi.

0 commit comments

Comments
 (0)