1DAHDI_SPAN_ASSIGNMENTS(8) DAHDI_SPAN_ASSIGNMENTS(8)
2
3
4
6 dahdi_span_assignments - handle DAHDI spans assignments
7
9 dahdi_span_assignments [-v|--verbose] [-n|--dry-run] <add|remove|auto>
10 [devpath...]
11
12 dahdi_span_assignments [-v|--verbose] list [devpath...]
13
14 dahdi_span_assignments [-v|--verbose] [-k|--key key] dumpconfig
15
16 dahdi_span_assignments -h|--help
17
18
20 Channels in DAHDI devices (such as DAHDI PCI cards) are groups to logi‐
21 cal units called "spans" (for example: a port in a digital card is a
22 span). When the kernel module parameter dahdi.auto_assign_span is
23 unset, DAHDI devices that register with DAHDI don't cause their spans
24 to be automatically assigned.
25
26 This allows user-space to order DAHDI to assign them to specific span
27 and channel numbers. That way, specific spans on specific DAHDI devices
28 may be assigned with specific span and channel numbers regardless of
29 the registration order of the hardware (or if all hardware is present
30 at all).
31
32 dahdi_span_assignments is used to assign those spans or to help creat‐
33 ing the configuration file used in their assignment:
34 /etc/dahdi/assigned-spans.conf .
35
36
38 There are several sub-commands.
39
40 All sub-commands take an optional list of paths to SysFS nodes of
41 devices. If given, the command will only operate on those DAHDI
42 devices. The default is to operate on all devices (which would normally
43 be the sane case when running from the command-line).
44
45 add [devpath ...]
46 Applies to all devices or to those listed on the command line.
47 Parameters are paths (in SysFS) to DAHDI devices with unassigned
48 spans.
49
50 The command will assign spans with DAHDI according to configura‐
51 tion in assigned-spans.conf.
52
53 If no line matches the span, or if the assignment for it fails
54 (it is not available) it will remain unassigned.
55
56 If any of the span settings fails (the span number or range of
57 channels is already in use), the program will print a message,
58 but continue applying the others. In such a case you should fix
59 assigned-spans.conf and re-run add (or run auto to give those
60 channels the first available range and regenerate the file with
61 'dahdi_genconf assignedspans').
62
63 remove [devpath ...]
64 Applies to all devices or to those listed on the command line.
65 Parameters are paths (in SysFS) to DAHDI devices with assigned
66 spans.
67
68 The command will un-assign them.
69
70 auto [devpath ...]
71 Applies to all devices or to those listed on the command line.
72 Parameters are paths (in SysFS) to DAHDI devices with unassigned
73 spans.
74
75 Each span is assigned to first available span number and channel
76 numbers, as if dahdi.auto_assign_span was set. The configuration
77 file doesn't affect these assignments.
78
79 list
80 List all spans in the system.
81
82 dumpconfig
83 List all assigned spans in the system in a format fit to be used
84 in assigned-spans.conf. Use this to generate a configuration
85 file after you have (automatically or manually) assigned all
86 existing spans.
87
88 dahdi_genconf assignedspans uses this command internally.
89
90
92 -v --verbose
93 Verbose output.
94
95 -n --dry-run
96 Don't assign / un-assign spans. Only print commands used to do
97 so.
98
99 -k key
100 For dumpconfig - The key by which to identify the hardware in
101 the generated configuration. Legal values:
102
103 hwid
104 Hardware identifier (e.g.: software-readable serial num‐
105 ber). This is the default. If the device has no hwid,
106 devpath is used.
107
108 location
109 The location field (file) in the SysFS device node
110 (directory) for the DAHDI device. If not available (typi‐
111 cally: DAHDI version <= 2.7.x), devpath is used.
112
113 devpath
114 Path in SysFS to the device node.
115
116
118 /etc/dahdi/assigned-spans.conf is a file with lines specifying assign‐
119 ment of spans.
120
121 Empty lines or lines beginning with '#' are ignored.
122
123 Each line is in the format of:
124
125 ID spanspec ...
126
127 The ID field specifies the DAHDI device and the spanspecs define how to
128 assign its spans. A line may have multiple spanspecs in a single line
129 (though dumpconfig generates a configuration with one per line).
130
131
132 Span Identifier
133 A DAHDI device may be specified either by a hardware identifier (a
134 software readable serial number or whatever) or the location in which
135 it is installed on the system. The former makes it simpler to change
136 connector / slot whereas the latter makes it simpler to replace a unit.
137
138 The value in this field is matched (when the commands add and remove)
139 are used) to the following values:
140
141 hwid
142 @location
143 devpath
144
145 See above for their descriptions. The value may include shell wild‐
146 cards: *, ? and [], which are used in the match. The values to be
147 matched are first cleaned up: '!' is replaced with '/' and any charac‐
148 ter beyond "a-zA-Z0-9/:.-" is removed.
149
150
151 Span Specification
152 Each line should have one or more span specifications: this is the
153 value used to assign a span with DAHDI in the SysFS interface. A speci‐
154 fication has three colon-separated numbers:
155
156 rel_span_no:span_no:first_chan
157
158 for instance, the following are four span specifications for a quad-E1
159 device: 1:6:53 2:7:84 3:8:115 4:9:146 occupying spans 6-9 and channels
160 53-176.
161
162 rel_span_no
163 The relative number of the span in the device. E.g.: port num‐
164 ber.
165
166 span_no
167 The desired DAHDI span number. Must be available.
168
169 first_chan
170 The desired DAHDI channel number for the first DAHDI channel in
171 the span. All channels of the span will be assigned following
172 it and hence that space must be available.
173
174
175
177 DAHDICONFDIR
178 The directory in which assigned-spans.conf resides. /etc/dahdi
179 if not overridden from the environment.
180
181 DAHDISASSIGNEDSPANSCONF
182 The path to assigned-spans.conf resides.
183 /etc/dahdi/assigned-spans.conf if not overridden from the envi‐
184 ronment.
185
186 SPAN_ASSIGNMENTS_KEY
187 The default value for -k . Defaults to "hwid" if not overridden
188 from the environment.
189
190
191
193 /etc/dahdi/assigned-spans.conf
194 The default location for the configuration file.
195
196 /sys/bus/dahdi_devices/devices/device
197 SysFS node for the device. In this directory reside the follow‐
198 ing files, among others:
199
200 location
201 The value of the device's location field.
202
203 assign_span, unassign_span, auto_assign
204 Write only files for the operations. Used by add, remove
205 and auto, respectively.
206
207
208
210 dahdi_span_types(8), dahdi_genconf(8), dahdi_cfg(8)
211
212
214 dahdi_span_assignments was written by Oron Peled. This manual page was
215 written by Tzafrir Cohen. Permission is granted to copy, distribute
216 and/or modify this document under the terms of the GNU General Public
217 License, Version 2 any later version published by the Free Software
218 Foundation.
219
220
221
222
223 23 Jan 2014 DAHDI_SPAN_ASSIGNMENTS(8)