---
name: "dahdi_genconf"
section: "8"
platform: "linux"
package: "dahdi"
version: "1:3.1.0-2.1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/dahdi_genconf"
---

# dahdi\_genconf(8)

Generate configuration for Dahdi channels.

## NAME

dahdi\_genconf - Generate configuration for Dahdi channels.

## SYNOPSIS

dahdi\_genconf \[options\] \[generator...\]

## DESCRIPTION

This script generate configuration files for Dahdi hardware. It uses two information sources:

- Hardware

  ```
   The actual Dahdi hardware is automatically detected on the host.
  ```

- /etc/dahdi/genconf\_parameters

  A configuration file that supplements the hardware information. Its location may be overridden via the `"GENCONF_PARAMETERS"` environment variable.

The dahdi\_genconf script can generate various kinds of configuration files as specified by the generator arguments.  Each generator is a perl class in Dahdi::Config::Gen namespace.  The generator names on the command line are the class names in lowercase.

The following generators are currently implemented: system, modules, spantypes, assignedspans, chandahdi, unicall, users.

For further documentation on each, please user perldoc on the relevant class. E.g: `"perldoc Dahdi::Config::Gen::Chandahdi"`

Each generator on the command line may be passed custom options by assigning a comma separated list of options to the generator name. E.g:

```
 dahdi_genconf system chandahdi=verbose unicall
```

### Global options:

- \-V --version

  Version -- print version string and exit.

- \-v --verbose

  Verbose -- sets the `'verbose'` option for all generators.

- \-F --freepbx

  Freepbx -- sets the `'freepbx'` option for all generators. Currently, chandahdi is affected.

- \--line-mode=*mode*

  *mode* may be E1, J1 or T1.

  Enables the generator **spantypes** and the option **line-mode** to it. (Equivalent to the option `"--line-mode"` to `"dahdi_span_types"`). This will generate a `"span-types.conf"` file with a single wildcard line setting the line mode to *mode*.

### Implementation notes:

- •

  *genconf\_parameters* parsing is done via `"Dahdi::Config::Params"`. An object representing the parsed data is instantiated by: `"Dahdi::Config::Params->new()"`. The `item()` method of this object contains all the hard coded defaults of the configuration directives.

- •

  A configuration object is instantiated by `"Dahdi::Config::Gen->new($params)"`. The mapping of configuration directives into semantic configuration is done in the constructor.

- •

  A single generator is run via the the `run_generator()` method of the configuration object.
