{"id":20302578,"url":"https://github.com/asterisk/dahdi-tools","last_synced_at":"2025-04-11T13:43:20.684Z","repository":{"id":8085787,"uuid":"9499494","full_name":"asterisk/dahdi-tools","owner":"asterisk","description":"This is the official dahdi-tools repository. All issues and PR should be raised here.","archived":false,"fork":false,"pushed_at":"2024-12-23T01:13:37.000Z","size":1496,"stargazers_count":18,"open_issues_count":14,"forks_count":30,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-25T09:53:03.464Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asterisk.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-04-17T14:28:05.000Z","updated_at":"2025-03-19T13:38:37.000Z","dependencies_parsed_at":"2023-02-10T07:15:52.434Z","dependency_job_id":"93e0408c-688f-406e-9059-3b8e556e1d63","html_url":"https://github.com/asterisk/dahdi-tools","commit_stats":null,"previous_names":[],"tags_count":61,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asterisk%2Fdahdi-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asterisk%2Fdahdi-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asterisk%2Fdahdi-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asterisk%2Fdahdi-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asterisk","download_url":"https://codeload.github.com/asterisk/dahdi-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248410852,"owners_count":21098782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T16:32:35.630Z","updated_at":"2025-04-11T13:43:20.665Z","avatar_url":"https://github.com/asterisk.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"DAHDI Telephony Interface Driver\n=================================\nAsterisk Development Team \u003casteriskteam@digium.com\u003e\n$Revision$, $Date$\n\nDAHDI stands for Digium Asterisk Hardware Device Interface. This\npackage contains the user-space tools to configure the kernel modules\nincluded in the package dahdi-linux.\n\nBuild Requirements\n------------------\nThis package needs the headers from dahdi-linux. Thus you should install\ndahdi-linux before building dahdi-tools.\n\nBuild System\n~~~~~~~~~~~~\nGCC and friends. Generally you will need to install the package gcc.\n\nAutotools (autoconf, automake and libtool) are needed if you clone from\nGit.\n\n\nExtra Libraries\n~~~~~~~~~~~~~~~\nSome libraries are needed for extra utilities that are provided with\nDAHDI.\n\n- libusb is needed for building astribank_hexload, needed for firmware\n  loading of the Xorcom Astribank.\n- libnewt is needed to build the optional but useful utility dahdi_tool.\n- libpcap is needed for building dahdi_pcap.\n- pppd is needed to build the dahdi pppd plugin.\n\n\nInstallation\n~~~~~~~~~~~~\nNote: If using `sudo` to build/install, you may need to add /sbin to your PATH.\n----------------------------------\n# Only if you cloned from git:\nautoreconf -i\n\n./configure\nmake\nmake install\n# To install some extra configuration files:\n#make install-config\n----------------------------------\n\n\nBuild Tweaks\n~~~~~~~~~~~~\nPartial Build/Install\n^^^^^^^^^^^^^^^^^^^^^\nThere are some make targets that are provided to build or install just\nparts of DAHDI:\n\n. Build targets:\n  - make: Build DAHDI user-space programs and libraries.\n  - make docs: Generate some extra documentation files.\n. Install targets:\n  - make install: Install everything\n  - make install-config: install configuration files\n\n\nInstallation to a Subtree\n^^^^^^^^^^^^^^^^^^^^^^^^^\nThe following may be useful when testing the package or when preparing a\npackage for a binary distribution (such as an rpm package) installing\nonto a subtree rather than on the real system.\n\n  make install DESTDIR=targetdir\n\nThis can be useful for any partial install target from the list above.\n\n\nOptions For ./configure\n^^^^^^^^^^^^^^^^^^^^^^^\nThe configure script executes various tests and the build will depend on\ntheir result. You can pass it --with options and variable settings, for\ninstance:\n\n  ./configure --without-ncurses CC=\"gcc-4.10\"\n\nIf you just want to recreate the same files without a full detection\nrun, use:\n\n  ./config.status\n\nTo re-run ./configure with the same parameters it was run with last\ntime, use:\n\n  ./config.status --recheck\n\n\nConfiguration\n-------------\nConfiguration for DAHDI resides under /etc/dahdi . \n\n/etc/dahdi/system.conf\n~~~~~~~~~~~~~~~~~~~~~~\nThe main method to configure DAHDI devices is using the utility\n*dahdi_cfg*. dahdi_cfg reads data from the configuration file \n/etc/dahdi/system.conf , figures out what configuration to send to \nchannels, and send it to the kernel.\n\nA sample annotated system.conf is included in this directory and\ninstalled by default. Edit it to suit your configuration. Alternatively \nuse the script dahdi_genconf to generate one that should work with your \nsystem. Note that while dahdi_genconf will generate a working configuration,\nit will not automatically detect hardware echo cancellation modules.  These\nwill have to be enabled manually in system.conf.\n\n/etc/dahdi/init.conf\n~~~~~~~~~~~~~~~~~~~~\nThe configuration file of the dahdi init.d script is\n/etc/dahdi/init.conf . That file is used to override defaults that are \nset at the beginning of the init.d script.\n\n/etc/dahdi/assigned-spans.conf\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nAssigns span number and initial channel number for spans in each device.\nJust like system.conf it may be generated with dahdi_genconf:\n\n  dahdi_span_assignments auto\n  dahdi_genconf\n\nIt may also be edited manually to allow reserving span and channel\nnumbers for specific devices.\n\n/etc/dahdi/span-types.conf\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nTheoretically, this file is similar to assigned-spans.conf. It allows\nsetting the type (E1/T1) of a \"PRI\" span. This cannot be configured\nanywhere else: it needs to be done before the span is assigned as it\nchanges the number of channels the span has.\n\nIn practice most systems don't mix E1 and T1 and thus this file will\ntypically have at most a single wild-card line setting all cards to be\neither E1 or T1.\n\n\nReference Configuration\n~~~~~~~~~~~~~~~~~~~~~~~\nSample system.conf\n^^^^^^^^^^^^^^^^^^\ninclude::system.conf.asciidoc[]\n\n\nSample init.conf\n^^^^^^^^^^^^^^^^\ninclude::init.conf.asciidoc[]\n\n\nSample genconf_parameters\n^^^^^^^^^^^^^^^^^^^^^^^^^\nFIXME: still not properly formatted.\n\ninclude::genconf_parameters.asciidoc[]\n\n\nSample assigned-spans.conf\n^^^^^^^^^^^^^^^^^^^^^^^^^^\ninclude::assigned-spans.conf.asciidoc[]\n\n\nSample span-types.conf\n^^^^^^^^^^^^^^^^^^^^^^\ninclude::span-types.conf.asciidoc[]\n\n\nTonezones\n~~~~~~~~~\nThe file zonedata.c contains the information about the tone zones used\nin libtonezone (and hence also in dahdi_cfg). Here is a list of those zones:\n\ninclude::tonezones.txt[]\n\n\nDAHDI PERL modules\n~~~~~~~~~~~~~~~~~~\nThe directory xpp has, in addition to helper utilities for the\nXorcom Astribank, a collection of PERL modules to provide information\nrelated to DAHDI. The PERL modules themselves are under xpp/perl_modules/ .\nIn xpp/ there are several utilities that use those modules:\n- xpp-specific: dahdi_registration, xpp_sync, xpp_blink .\n- General: lsdahdi, dahdi_genconf, dahdi_hardware, dahdi_drivers\n\nThe DAHDI PERL modules will currently only be automatically installed if you\nhappen to install the xpp directory. Those utilities require the PERL modules\nto be installed, however they will also look for them in the directory \nperl_modules, and thus can be run directly from the DAHDI source tree. For \nexample:\n\n  ./xpp/dahdi_hardware -v\n\nTo get usage information on a program, you can also use perldoc\n(sometimes provided in a package separate from perl itself). For\ninstance:\n\n  perldoc ./xpp/lsdahdi\n\nSome of them are specific for the Xorcom Astribank and described in its\ndocumentation. the others are:\n\nlsdahdi:: \n  A somewhat glorified `cat /proc/dahdi/*`.\ndahdi_genconf::\n  Generates configuration based on the existing DAHDI channels and on\n  /etc/dahdi/genconf_parameters (replaces genzaptelconf as well).\ndahdi_drivers::\n  A two-liner script (not installed by default) that simply returns the\n  modules that should be modprobe-d on this system.\ndahdi_hardware:: \n  Uses the information from SysFS and its own knowledge to show\n  what PCI/USB DAHDI hardware is connected and if it is currently used\n  by a driver. Shows also some more information for Astribanks from\n  /proc/xpp .\n\n\nPPP Support\n~~~~~~~~~~~\nDAHDI digital cards can provide data channels through PPP as\npoint-to-point connections. This requires a plug-in to the PPP daemon\nthat is included in the ppp/ subdirectory. To install it:\n\n1. Make sure you have the PPP source / headers installed. On Debian:\n\n   apt-get install ppp-dev\n\n2. Run 'make' on the ppp subdirectory:\n\n   make -C ppp \n   make -C ppp install\n\n3. Make sure your kernel has support for both PPP (which is common is\n   distribution kernels and for HDLC (much less common) - CONFIG_PPP and\n   CONFIG_HDLC .\n\n\nInitialization\n--------------\nThis section documents the start up sequence of the DAHDI modules.\n\nThere are generally two options: explicit (using an init script) and\nimplicit (run from UDEV hook scripts).\n\nExplicit\n~~~~~~~~\nThe dahdi init scripts does the following tasks:\n\n* Loading the module dahdi and any other module listed in\n  /etc/dahdi/modules.\n* For xpp (Astribanks) - some specific initializations. See\n  README.Astribank.\n* Runs link:doc/dahdi_cfg.8.html[dahdi_cfg] after all modules were\n  loaded.\n* A number of other tools may need to be run:\n** link:doc/fxotune.8.html[fxotune]\n** dahdihpec_enable\n\nOnly at this point Asterisk (or any other user of DAHDI) can be run.\n\n\nImplicit\n~~~~~~~~\n(Also known as \"hot-plug\" or \"pinned-spans\". This requires:\n\n* dahdi \u003e= 2.8.0\n* Setting the module parameter auto_assign_spans of dahdi to 0\n* (Recommended) Asterisk \u003e= 12 - which supports \"dahdi create channels\".\n\nWhen a device driver of a DAHDI device finishes initialization, it\ncreates a dahdi_device kernel object. A dahdi_device represents a single\nDAHDI device (such as a PCI card) and may have several spans. If the\nvalue of auto_assign_spans is 1 when dahdi_device is created, spans are\nassigned automatically - each new span gets the first available span\nnumber and range of channels. However if it is set to 0, spans will not\nget assigned, and user space programs need to assign them. The\nlow-level interface for doing so is explained in the section \"Span\nAssignment\" in the README of DAHDI-Linux.\n\nNew Devices\n^^^^^^^^^^^\nWhen a kernel object is created or destroyed, the kernel sends an event\nto user space. Those events are normally handled by udevd. Configurations\nfor udevd (\"udev rules\") may be placed in /etc/udev/rules.d or\n/lib/udev/rules.d. This package installs rules that instruct udevd to\nrun the script `/usr/share/dahdi/dahdi_handle_device` on each new\ndevice, which runs all the scripts in `/usr/share/dahdi/handle_device.d`.\nThose scripts will:\n\n* If `/etc/dahdi/span-types.conf` exists, apply it to the device. It is\n used for E1/T1/J1 settings. See\n \u003c\u003c_sample_span_types_conf,sample span-types.conf\u003e\u003e.\n\n* If `/etc/dahdi/assigned-spans.conf` exists, assign the span according\n to it (if it is not specified there: don't assign it).\n used for E1/T1/J1 settings. See\n \u003c\u003c_sample_assigned_spans_conf,sample assigned-spans.conf\u003e\u003e.\n\n* But if that file does not exist, assign the span to the first\n  available place.\n\nThis script mainly uses the commands\nlink:doc/dahdi_span_types.8.html[dahdi_span_types] and\nlink:doc/dahdi_span_assignments.8.html[dahdi_span_assignments].\n\nDAHDI devices are listed under `/sys/bus/dahdi_devices/devices`.\n\nIf you want to disable running this script, add the following line to\n`/etc/dahdi/init.conf`:\n.............................\nDAHDI_UDEV_DISABLE_DEVICES=yes\n.............................\n\n\nNew Spans\n^^^^^^^^^\nOnce a span is assigned, a kernel object will appear for it. It will be\nlisted under its device. As a new kernel object was created, an event is\nsent to udev.\n\nThe standard DAHDI udev rules instruct udevd to run the script\n`/usr/share/dahdi/dahdi_span_config` which runs all the scripts in\n`/usr/share/dahdi/span_config.d`. Those script configures the new\nspan:\n\n* If system.conf does not exist, generates a temporary configuration\n  for the span using link:doc/dahdi_genconf.8.html[dahdi_genconf\n  system].\n\n* Runs link:doc/dahdi_cfg.8.html[dahdi_cfg] on the new span (using `-S`\n  and -C`).\n\n* Runs `asterisk -rx 'dahdi create channels'` to add the new channels\n  and spans to Asterisk (if they were configured in advance).\n\nIf you want to disable running this script, add the following line to\n`/etc/dahdi/init.conf`:\n.............................\nDAHDI_UDEV_DISABLE_SPANS=yes\n.............................\n\n\nNew Channels\n^^^^^^^^^^^^\nDAHDI channels have their own representation in the kernel. The standard\nudev rules that dahdi-tools includes for them, however, don't run a\nscript for each device. Each DAHDI channel creates a block device file\nat /dev/dahdi/chan/'span'/'rel-chan', where 'span' and 'rel-chan' are\neach three-digit numbers (e.g: 035). 'span' is the span number and\n'rel-chan' is the channel number relative to the span.\n\nThe udev rules generate the following extra symlinks under /dev/dahdi:\n\n* /dev/dahdi/'num' - the channel number. As it was originally (but\n  continues beyond 250).\n* /dev/dahdi/devices/'hardware_id'/'rel-span'/'rel-chan' - if the DAHDI\n  device has a hardware ID field, provide listing of the device's span\n  and channels.\n* /dev/dahdi/devices/@'hardware_id'/'rel-span'/'rel-chan' - likewise for\n  the connector field. It has a \"@\" prefix.\n\n\ninclude::UPGRADE.txt[]\n\n\nLicense\n-------\nThis package is distributed under the terms of the GNU General Public License\nVersion 2, except for some components which are distributed under the terms of\nthe GNU Lesser General Public License Version 2.1. Both licenses are included\nin this directory, and each file is clearly marked as to which license applies.\n\nIf you wish to use the DAHDI drivers in an application for which the license\nterms are not appropriate (e.g. a proprietary embedded system), licenses under\nmore flexible terms can be readily obtained through Digium, Inc. at reasonable\ncost.\n\n\nReporting Bugs\n--------------\nPlease report bug and patches to the Asterisk bug tracker at\nhttp://bugs.digium.com/[] in the \"DAHDI\" category.\n\n\nLinks\n-----\n- http://asterisk.org/[] - The Asterisk PBX\n- http://voip-info.org/[]\n- http://voip-info.org/wiki/view/DAHDI[]\n- http://docs.tzafrir.org.il/dahdi-tools/README.html[Up-to-date HTML version\n  of this file]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasterisk%2Fdahdi-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasterisk%2Fdahdi-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasterisk%2Fdahdi-tools/lists"}