DAHDI_SPAN_TYPES(8)
β¨ DAHDI_SPAN_TYPES β¨
okay bestie, this is the dahdi_span_types page from section 8 of the manual β the whole thing about setting line modes on DAHDI spans before anybody assigns them a number. buckle up, it's actually so good π
π NAME π
dahdi_span_types β set line modes of DAHDI spans before assignment
π¦ SYNOPSIS π¦
dahdi_span_types [options] <list|dumpconfig|compare|set> [devpath ...]
πΈ DESCRIPTION πΈ
so here's the tea: the span type (that's the line mode β E1, T1 or J1) has to be set on a span before DAHDI assigns it a span number, because E1 spans use more channels. that's just how it is, no cap. and dahdi_span_types is literally the tool that applies your span type configuration to an un-assigned span. π
lowkey important: this only makes sense when the kernel module parameter dahdi.auto_assign_span is unset. if you did set it, DAHDI just automatically assigns span numbers during device registration and this whole vibe is pointless. π
dahdi_span_types takes a command and an optional list of devices. if you don't give it any device, the command gets applied to all devices. main character energy, honestly.
the device is marked as a path in the SysFS tree. periodt.
π OPTIONS π
-h|--helpβ spits out the usage message and dips. that's it, that's the whole thing β¨-n|--dry-runβ during the"set"operation, it only shows you what it would do, without actually changing anything. a little peek, no commitment π«Ά-v|--verboseβ during the"set"operation, it shows the actions that are being performed. narrating its own slay.--line-mode=<E1|T1|J1>β during thedumpconfigoperation, this forces a special generation mode:- first, it generates a
"wildcard"entry with the given line-mode. π - then it comments out all span entries. each of them may be manually un-commented to override the
"wildcard". so iconic.
- first, it generates a
π SUB-COMMANDS π
setβ reads settings fromspan-types.confand applies them to the device(s) specified in the command line (or all devices, if none specified). the classic.compareβ compares the settings on the system to those in the configuration file. for each line that applies to a device on the system, it prints it if the value to be set and the active value on the system differ.- the exit status is
0if there is no difference, and non-zero if a difference was detected. π
- the exit status is
listβ lists line modes for all spans in the system which may be set withdahdi_span_types(that's the E1/T1/J1 spans, iykyk).dumpconfigβ lists types for the spans in a format fit to be used inspan-types.conf. use this to generate a configuration file after you have (perhaps manually) set all existing spans. so handy fr fr.dahdi_genconf spantypesuses 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. (yes bestie, you can comment your config, live your truth.)
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@locationdevpath
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). keep it simple, babes.
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β the relative number of the span in the device. E.g.: port number. this field may contain shell wildcards (*,?and[]).span_typeβE1/T1/J1
multiple matches π₯
during the set operation, dahdi_span_types applies all matching settings to a span. this is done in the order of lines in the configuration files.
so if there are multiple matches to a span β the last match wins. all of them get applied to the kernel in order, and the last one in the file is applied last. the final girl always wins. π
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β the directory in whichspan-types.confresides./etc/dahdiif not overridden from the environment.DAHDISPANTYPESCONFβ the path tospan-types.confresides./etc/dahdi/span-types.confif not overridden from the environment.
π FILES π
/etc/dahdi/span-types.confβ the default location for the configuration file./sys/bus/dahdi_devices/devices/deviceβ the SysFS node for the device. in this directory reside the following files, among others:spantypeβ read/write file. reading from it returns the current configuration for spans of the device. span-specifications can be written to it to change line modes (but only for a span that is not assigned yet). β οΈ
π« SEE ALSO π«
dahdi_span_assignments(8), dahdi_genconf(8), dahdi_cfg(8)
π«Ά 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. π
and that's the whole page, bestie β this version of the manual is dated 23 Jan 2014 and it comes from DAHDI_SPAN_TYPES(8). go forth and set your line modes. slay. β¨ππ
π¦ where this page comes from
- debian bookworm: dahdi 1:3.1.0-2
- debian trixie: dahdi 1:3.1.0-2.1
- ubuntu jammy: dahdi 1:3.1.0-2
- ubuntu noble: dahdi 1:3.1.0-2build1
- ubuntu questing: dahdi 1:3.1.0-2.1
- ubuntu resolute: dahdi 1:3.1.0-2.1build1
- ubuntu stonking: dahdi 1:3.4.0-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms