table of contents
DAHDI_SPAN_TYPES(8) | DAHDI_SPAN_TYPES(8) |
NAME¶
dahdi_span_types - set line modes of DAHDI spans before assignment
SYNOPSIS¶
dahdi_span_types [options] <list|dumpconfig|compare|set> [devpath ...]
DESCRIPTION¶
The span type (the line mode: E1/T1/J1) must be set to a span before DAHDI assigns it a span number, as E1 spans use more channels. dahdi_span_types applies the span type configuration to an un-assigned span.
Using it only makes sense when the kernel module parameter dahdi.auto_assign_span is unset, otherwise DAHDI automatically assign span numbers during device registration.
dahdi_span_types takes a command and an optional list of devices. If no device is given, the command is applied to all devices.
The device is marked as a path in the SysFS tree.
OPTIONS¶
-h|--help
-n|--dry-run
-v|--verbose
--line-mode=<E1|T1|J1>
- First, generates a "wildcard" entry with the fiven line-mode.
- Comment out all span entries. Each of them may be manually un-commented to override the "wildcard".
SUB-COMMANDS¶
set
compare
The exit status is 0 if there is no difference and non-zero if a difference was detected.
list
dumpconfig
dahdi_genconf spantypes uses this command internally.
CONFIGURATION¶
General structure¶
span-types.conf is a file with lines specifying line modes of spans.
Empty lines or lines beginning with '#' are ignored.
Each line is in the format of:
ID spanspec ...
The ID field specifies the DAHDI device and the spanspecs define the line modes of its spans. A line may have multiple spanspecs in a single line (though dumpconfig generates a configuration with one per line).
Span Identifier¶
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 command set is used) to the following values:
hwid
@location
devpath
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 not in "a-zA-Z0-9/:.-" is replaced by "_".
Note that while span-types.conf allows an arbitrarily-complex combination of E1, J1 and T1 ports, it would normally have just a single wildcard line setting the line mode (the first line in the example below).
Span Specification¶
Each line should have one or more span specifications: this is the value used to set span type with DAHDI in the SysFS interface. A specification has two colon-separated fields:
rel_span_no:span_type
for instance, the following are four span specifications specify ports 1 and 2 as E1 and ports 3 and 4 as T1: [12]:E1 [34]:T1 .
rel_span_no
span_type
Multiple matches¶
During set operation, the dahdi_span_types applies all matching settings to a span. This is done in the order of lines in the configuration files.
Thus, if there are multiple matches to a span -- the last match will win (all will be applied to the kernel in order. The last one in the file will be applied last).
Example:
* *:T1 # All spans on all devices will be T1 usb:X1234567 [34]:E1 # Except spans 3,4 on the device which will be E1
ENVIRONMENT¶
DAHDICONFDIR
DAHDISPANTYPESCONF
FILES¶
/etc/dahdi/span-types.conf
/sys/bus/dahdi_devices/devices/device
spantype
SEE ALSO¶
AUTHOR¶
dahdi_span_types 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.
23 Jan 2014 |