Go to file
Shaun Ruffell c0e19d47e8 dahdi_span_assignments, dahdi_span_types: Allow conf file to be overridden.
The environment variables that specified the full path the the configuration
files for dahdi_span_types and dahdi_span_assignments was documented, but they
were not actually set from the environment.

Also, the case of the variable was changed to match the one for the directory
where the rest of the config files are located.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2013-11-26 13:50:02 -06:00
build_tools build_tools/make_version: Teach version string about git. 2013-06-26 16:45:03 -05:00
doc dahdi_span_assignments, dahdi_span_types: Allow conf file to be overridden. 2013-11-26 13:50:02 -06:00
ppp PPP: Fix an incorrect function call that was causing dahdi.so to fail to load 2010-08-31 16:12:53 +00:00
xpp Add dahdi_ prefix to handle_device, span_types, span_assignments, and span_config. 2013-11-26 13:50:02 -06:00
.gitignore Ignore generated files 2013-05-23 17:16:27 -05:00
LICENSE Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
LICENSE.LGPL Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
Makefile Add dahdi_ prefix to handle_device, span_types, span_assignments, and span_config. 2013-11-26 13:50:02 -06:00
README README: include pinned spans config files 2013-11-24 16:48:29 +02:00
UPGRADE.txt README, UPGRADE.txt, system.conf.sample: Add documentation for using HWEC 2010-12-09 22:44:52 +00:00
acinclude.m4 Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
assigned-spans.conf.sample Terminology rename: "pinned" -> "assigned" 2013-11-24 16:42:15 +02:00
autoconfig.h.in astribank_is_starting: use semop if no semtimedop 2010-10-17 18:41:24 +00:00
bittest.h Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
blacklist.sample wcte43x: Teach tools about the wcte43x driver. 2013-11-11 15:40:11 -06:00
bootstrap.sh Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
config.guess Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
config.sub Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
configure configure: regenerate for 6d10525 2013-11-24 18:11:04 +02:00
configure.ac pinned-spans: remove '--enable-pinned' from configure 2013-11-24 16:13:51 +02:00
dahdi.init dahdi.init: Remove spurious "Missing '/sys/bus/astribanks/drivers/xppdrv/sync'". 2013-11-24 10:06:11 -06:00
dahdi.rules Add dahdi_ prefix to handle_device, span_types, span_assignments, and span_config. 2013-11-26 13:50:02 -06:00
dahdi.xml Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
dahdi_cfg.c dahdi_cfg: can optionally read config from stdin 2013-10-08 10:05:09 -04:00
dahdi_diag.c Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
dahdi_handle_device Add dahdi_ prefix to handle_device, span_types, span_assignments, and span_config. 2013-11-26 13:50:02 -06:00
dahdi_maint.c Fix GCC 4.6 "set but not used" warnings 2011-11-02 21:57:25 +00:00
dahdi_monitor.c dahdi-monitor: Fix broken control-C behavior and -F output option 2012-09-21 17:25:48 +00:00
dahdi_pcap.c dahdi_pcap: Imported user space utility for managing pcap streams 2011-11-01 18:10:14 +00:00
dahdi_scan.c dahdi_scan: Support gaps in channel numbering. 2013-04-16 23:25:28 -05:00
dahdi_span_assignments dahdi_span_assignments, dahdi_span_types: Allow conf file to be overridden. 2013-11-26 13:50:02 -06:00
dahdi_span_config Add dahdi_ prefix to handle_device, span_types, span_assignments, and span_config. 2013-11-26 13:50:02 -06:00
dahdi_span_types dahdi_span_assignments, dahdi_span_types: Allow conf file to be overridden. 2013-11-26 13:50:02 -06:00
dahdi_speed.c Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
dahdi_test.c dahdi_test: Enforce range from 0.0% - 100.0% for accuracy. 2011-09-29 17:00:59 +00:00
dahdi_tool.c Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
dahdi_tools_version.h Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
fxotune.c fxotune: Now options '-b/-e' also apply with '-s' 2013-11-24 16:35:10 +02:00
fxotune.h Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
fxstest.c fxstest: Use DAHDI_SPECIFY when opening by integer channel number. 2013-05-28 12:34:03 -05:00
hdlcgen.c Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
hdlcstress.c Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
hdlctest.c Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
hdlcverify.c Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
ifup-hdlc Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
init.conf.sample udev scripts now read /etc/dahdi/init.conf 2013-11-24 16:20:08 +02:00
install-sh Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
makeopts.in pinned-spans: remove '--enable-pinned' from configure 2013-11-24 16:13:51 +02:00
modprobe.conf.sample Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
modules.sample wcte43x: Teach tools about the wcte43x driver. 2013-11-11 15:40:11 -06:00
patgen.c tools: Allow pattern tools to access channels above the device file limit 2011-06-07 19:44:34 +00:00
patlooptest.c patlooptest: Ignore the first buffered event 2011-07-21 17:29:34 +00:00
pattest.c tools: Allow pattern tools to access channels above the device file limit 2011-06-07 19:44:34 +00:00
sethdlc.c Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
span-types.conf.sample pinned-spans: fix examples in configuration files 2013-11-24 16:08:31 +02:00
system.conf.sample system.conf.sample: Add note regarding cross connecting spans on B410P. 2011-07-05 20:13:49 +00:00
timertest.c Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
tonezone.c Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
tonezone.h Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
wavformat.h Import DAHDI-Tools r9159 2010-08-18 13:49:24 +00:00
zonedata.c zonedata: Add support for United Arab Emirates. 2011-05-24 15:14:32 +00:00

README

DAHDI Telephony Interface Driver
=================================
Asterisk Development Team <asteriskteam@digium.com>
$Revision$, $Date$

DAHDI stands for Digium Asterisk Hardware Device Interface. This
package contains the user-space tools to configure the kernel modules
included in the package dahdi-linux.

Build Requirements
------------------
This package needs the headers from dahdi-linux. Thus you should install
dahdi-linux before building dahdi-tools.

Build System
~~~~~~~~~~~~
GCC and friends. Generally you will need to install the package gcc.
There may be cases where you will need a specific version of gcc to build
kernel modules.


Extra Libraries
~~~~~~~~~~~~~~~
Some libraries are needed for extra utilities that are provided with
DAHDI.

- libusb is needed for building fpga_load, needed for firmware loading of
  the Xorcom Astribank.
- libnewt is needed to build the optional but useful utility dahdi_tool.


Installation
~~~~~~~~~~~~
Note: If using `sudo` to build/install, you may need to add /sbin to your PATH.
----------------------------------
./configure
make
make install
# To install init scripts and config files:
#make config
----------------------------------


Build Tweaks
~~~~~~~~~~~~
Partial Build/Install
^^^^^^^^^^^^^^^^^^^^^
There are some make targets that are provided to build or install just
parts of DAHDI:

. Build targets:
  - make: Build DAHDI user-space programs. partial
    targets of it:
    * make 'utilname': builds 'utilname' alone (e.g: `make dahdi_diag`)
    * make utils: Build libtonezone.
    * make libs: Build libtonezone.
. Install targets:
  - make install: Installs user space tools into /usr/sbin/ (TODO - list
    partial targets)
  - make config: should be run once to configure 


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 the real system.

  make install DESTDIR=targetdir

This can be useful for any partial install target from the list above.


Options For ./configure
^^^^^^^^^^^^^^^^^^^^^^^
The configure script executes various tests and based on them generates
makeopts. You can pass it --with options and variable settings, for
instance:

  ./configure --without-ncurses CC="gcc-4.10"

If you just want to recreate the same files without a full detection
run, use:

  ./config.status

To re-run ./configure with the same parameters it was run with last
time, use:

  ./config.status --recheck


Configuration
-------------
Configuration for DAHDI resides under /etc/dahdi . 

/etc/dahdi/system.conf
~~~~~~~~~~~~~~~~~~~~~~
The main method to configure DAHDI devices is using the utility
*dahdi_cfg*. dahdi_cfg reads data from the configuration file 
/etc/dahdi/system.conf , figures out what configuration to send to 
channels, and send it to the kernel.

A sample annotated system.conf is included in this directory and
installed by default. Edit it to suit your configuration. Alternatively 
use the script dahdi_genconf to generate one that should work with your 
system. Note that while dahdi_genconf will generate a working configuration,
it will not automatically detect hardware echo cancellation modules.  These
will have to be enabled manually in system.conf.

/etc/dahdi/init.conf
~~~~~~~~~~~~~~~~~~~~
The configuration file of the dahdi init.d script is
/etc/dahdi/init.conf . That file is used to override defaults that are 
set at the beginning of the init.d script.

Reference Configuration
~~~~~~~~~~~~~~~~~~~~~~~
Sample system.conf
~~~~~~~~~~~~~~~~~~
include::system.conf.asciidoc[]


Sample init.conf
~~~~~~~~~~~~~~~~
include::init.conf.asciidoc[]


Sample genconf_parameters
~~~~~~~~~~~~~~~~~~~~~~~~~
FIXME: still not properly formatted.

include::genconf_parameters.asciidoc[]


Sample assigned-spans.conf
~~~~~~~~~~~~~~~~~~~~~~~~~~
include::assigned-spans.conf.asciidoc[]


Sample span-types.conf
~~~~~~~~~~~~~~~~~~~~~~
include::span-types.conf.asciidoc[]


Tonezones
~~~~~~~~~
The file zonedata.c contains the information about the tone zones used
in libtonezone (and hence also in dahdi_cfg). Here is a list of those zones:

include::tonezones.txt[]


DAHDI PERL modules
~~~~~~~~~~~~~~~~~~
The directory xpp has, in addition to helper utilities for the
Xorcom Astribank, a collection of PERL modules to provide information
related to DAHDI. The PERL modules themselves are under xpp/perl_modules/ .
In xpp/ there are several utilities that use those modules:
- xpp-specific: dahdi_registration, xpp_sync, xpp_blink .
- General: lsdahdi, dahdi_genconf, dahdi_hardware, dahdi_drivers

The DAHDI PERL modules will currently only be automatically installed if you
happen to install the xpp directory. Those utilities require the PERL modules
to be installed, however they will also look for them in the directory 
perl_modules, and thus can be run directly from the DAHDI source tree. For 
example:

  ./xpp/dahdi_hardware -v

To get usage information on a program, you can also use perldoc
(sometimes provided in a package separate from perl itself). For
instance:

  perldoc ./xpp/lsdahdi

Some of them are specific for the Xorcom Astribank and described in its
documentation. the others are:

lsdahdi:: 
  A somewhat glorified `cat /proc/dahdi/*`.
dahdi_genconf::
  Generates configuration based on the existing DAHDI channels and on
  /etc/dahdi/genconf_parameters (replaces genzaptelconf as well).
dahdi_drivers::
  A two-liner script (not installed by default) that simply returns the
  modules that should be modprobe-d on this system.
dahdi_hardware:: 
  Uses the information from SysFS and its own knowledge to show
  what PCI/USB DAHDI hardware is connected and if it is currently used
  by a driver. Shows also some more information for Astribanks from
  /proc/xpp .


PPP Support
~~~~~~~~~~~
DAHDI digital cards can provide data channels through PPP as
point-to-point connections. This requires a plug-in to the PPP daemon
that is included in the ppp/ subdirectory. To install it:

1. Make sure you have the PPP source / headers installed. On Debian:

   apt-get install ppp-dev

2. Run 'make' on the ppp subdirectory:

   make -C ppp 
   make -C ppp install

3. Make sure your kernel has support for both PPP (which is common is
   distribution kernels and for HDLC (much less common) - CONFIG_PPP and
   CONFIG_HDLC .


include::UPGRADE.txt[]


License
-------
This package is distributed under the terms of the GNU General Public License
Version 2, except for some components which are distributed under the terms of
the GNU Lesser General Public License Version 2.1. Both licenses are included
in this directory, and each file is clearly marked as to which license applies.

If you wish to use the DAHDI drivers in an application for which the license
terms are not appropriate (e.g. a proprietary embedded system), licenses under
more flexible terms can be readily obtained through Digium, Inc. at reasonable
cost.


Reporting Bugs
--------------
Please report bug and patches to the Asterisk bug tracker at
http://bugs.digium.com/[] in the "DAHDI" category.


Links
-----
- http://asterisk.org/[] - The Asterisk PBX
- http://voip-info.org/[]
- http://voip-info.org/wiki/view/DAHDI[]
- http://docs.tzafrir.org.il/dahdi-tools/README.html[Up-to-date HTML version
  of this file]