span_assignments − handle DAHDI spans registration
span_assignments [−v|−−verbose] [−n|−−dry−run] <add|remove> devpath [devpath ...]
span_assignments [−v|−−verbose] [−n|−−dry−run] auto
span_assignments [−v|−−verbose] list
span_assignments [−v|−−verbose] [−k|−−key key] dumpconfig
When the kernel module parameter dahdi.auto_assign_span is unset, DAHDI devices (such as DAHDI PCI cards) that register with DAHDI don’t register their spans (e.g.: each digital port is normally a span) with DAHDI. This allows user-space to order DAHDI to register them to specific span and channel numbers. This allows registering different spans out of order.
span_assignments is used to register those spans or to help creating the configuration file used in their registration: /etc/dahdi/pinned-spans.conf .
There are several sub-commands:
add devpath [devpath ...]
Parameters are paths (in SysFS) to DAHDI devices with unregistered spans. The command will register with DAHDI according to according to configuration in pinned-spans.conf.
remove devpath [devpath ...]
Parameters are paths (in SysFS) to DAHDI devices with registered spans. The command will unregister with DAHDI.
Register all non-registered spans. Each span registers to first available span number and channel numbers, as if dahdi.auto_assign_span was set.
List all spans in the system.
List all registered spans in the system in a format fit to be used in pinned-spans.conf. Use this to generate a configuration file after you have (perhaps manually) registered all existing spans.
dahdi_genconf pinnedspans uses this command internally.
Don’t register / unregister spans. Only print commands used to do so.
For dumpconfig − The key by which to identify the hardware in the generated configuration. Legal values:
Hardware identifier (e.g.: software-readable serial number). This is the default. If the device has no hwid, devpath is used.
The location field (file) in the SysFS device node (directory) for the DAHDI device. If not available (typically: DAHDI version <= 2.7.x), devpath is used.
Path in SysFS to the device node.
pinned-spans.conf is a file with lines specifying registration of spans.
Empty lines or lines beginning with ’#’ are ignored.
Each line is in the format of:
The ID field specifies the DAHDI device and the spanspecs define how to register its spans. A line may have multiple spanspecs in a single line (though dumpconfig generates a configuration with one per line).
A DAHDI device may be specified either by a hardware identifier (a software readable serial number or whatever) or the location in which it is installed on the system. The former makes it simpler to change connector / slot whereas the latter makes it simpler to replace a unit.
The value in this field is matched (when the commands add and remove) are used) to the following values:
See above for their descriptions. The value may include shell wildcards: *, ? and , which are used in the match. The values to be matched are first cleaned up: ’!’ is replaced with ’/’ and any character beyond "a-zA-Z0-9/:.-" is removed.
Each line should have one or more span specifications: this is the value used to register a span with DAHDI in the SysFS interface. A specification has three colon-separated numbers:
for instance, the following are four span specifications for a quad-E1 device: 1:6:53 2:7:84 3:8:115 4:9:146 occupying spans 6-9 and channels 53-176.
The relative number of the span in the device. E.g.: port number.
The desired DAHDI span number. Must be available.
The desired DAHDI channel number for the first DAHDI channel in the span. All channels of the span will be registered following it and hence that space must be available.
The directory in which pinned-spans.conf resides. /etc/dahdi if not overridden from the environment.
The path to pinned-spans.conf resides. /etc/dahdi/pinned-spans.conf if not overridden from the environment.
The default value for −k . Defaults to "hwid" if not overridden from the environment.
The default location for the configuration file.
SysFS node for the device. In this directory reside the following files, among others:
The value of the device’s location field.
assign_span, unassign_span, auto_assign
Write only files for the operations. Used by add, remove and auto, respectively.
span_types(8), dahdi_genconf(8), dahdi_cfg(8)
span_assignments was written by Oron Peled. This manual page was written by Tzafrir Cohen. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.