1DAHDI_SPAN_TYPES(8)                                        DAHDI_SPAN_TYPES(8)
2
3
4

NAME

6       dahdi_span_types - set line modes of DAHDI spans before assignment
7

SYNOPSIS

9       dahdi_span_types [options] <list|dumpconfig|set> [devpath ...]
10
11

DESCRIPTION

13       The  span  type  (the line mode: E1/T1/J1) must be set to a span before
14       DAHDI assigns it  a  span  number,  as  E1  spans  use  more  channels.
15       dahdi_span_types  applies the span type configuration to an un-assigned
16       span.
17
18       Using  it  only  makes  sense  when   the   kernel   module   parameter
19       dahdi.auto_assign_span  is  unset, otherwise DAHDI automatically assign
20       span numbers during device registration.
21
22       dahdi_span_types takes a command and an optional list of devices. If no
23       device is given, the command is applied to all devices.
24
25       The device is marked as a path in the SysFS tree.
26
27

OPTIONS

29       -h|--help
30              Output usage message and exit
31
32       -n|--dry-run
33              During  "set"  operation,  only show what would be done, without
34              actually changing anything.
35
36       -v|--verbose
37              During "set" operation, show the actions  that  are  being  per‐
38              formed.
39
40       --line-mode=<E1|T1|J1>
41              During "dumpconfig" operation, force special generation mode:
42
43              ·  First, generates a "wildcard" entry with the fiven line-mode.
44
45              ·  Comment  out  all  span entries. Each of them may be manually
46                 un-commented to override the "wildcard".
47
48

SUB-COMMANDS

50       set
51              Reads settings from span-types.conf  and  applies  them  to  the
52              device(s) specified in the command line (or all devices, if none
53              specified).
54
55       list
56              List line modes for all spans in the system  which  may  be  set
57              with dahdi_span_types (E1/T1/J1 spans).
58
59       dumpconfig
60              List  types  for  the  spans  in  a  format  fit  to  be used in
61              span-types.conf. Use this to generate a configuration file after
62              you have (perhaps manually) set all existing spans.
63
64              dahdi_genconf spantypes uses this command internally.
65
66

CONFIGURATION

68   General structure
69       span-types.conf is a file with lines specifying line modes of spans.
70
71       Empty lines or lines beginning with '#' are ignored.
72
73       Each line is in the format of:
74
75       ID        spanspec ...
76
77       The  ID  field  specifies the DAHDI device and the spanspecs define the
78       line modes of its spans. A line may have multiple spanspecs in a single
79       line (though dumpconfig generates a configuration with one per line).
80
81
82   Span Identifier
83       A  DAHDI  device  may  be  specified either by a hardware identifier (a
84       software readable serial number or whatever) or the location  in  which
85       it  is  installed  on the system. The former makes it simpler to change
86       connector / slot whereas the latter makes it simpler to replace a unit.
87
88       The value in this field is matched (when the command set  is  used)  to
89       the following values:
90
91        hwid
92        @location
93        devpath
94
95       See  above  for  their  descriptions. The value may include shell wild‐
96       cards: *, ? and [], which are used in  the  match.  The  values  to  be
97       matched  are first cleaned up: '!' is replaced with '/' and any charac‐
98       ter not in "a-zA-Z0-9/:.-" is replaced by "_".
99
100       Note that while span-types.conf allows an arbitrarily-complex  combina‐
101       tion of E1, J1 and T1 ports, it would normally have just a single wild‐
102       card line setting the line mode (the first line in the example below).
103
104
105   Span Specification
106       Each line should have one or more  span  specifications:  this  is  the
107       value used to set span type with DAHDI in the SysFS interface. A speci‐
108       fication has two colon-separated fields:
109
110       rel_span_no:span_type
111
112       for instance, the following are four span specifications specify  ports
113       1 and 2 as E1 and ports 3 and 4 as T1: [12]:E1 [34]:T1 .
114
115       rel_span_no
116              The  relative  number of the span in the device. E.g.: port num‐
117              ber.  This field may contain shell wildcards (*, ? and [])
118
119       span_type
120              E1/T1/J1
121
122
123   Multiple matches
124       During set operation, the dahdi_span_types applies  all  matching  set‐
125       tings  to  a span. This is done in the order of lines in the configura‐
126       tion files.
127
128       Thus, if there are multiple matches to a span -- the  last  match  will
129       win  (all  will  be applied to the kernel in order. The last one in the
130       file will be applied last).
131
132       Example:
133       *             *:T1      # All spans on all devices will be T1
134       usb:X1234567  [34]:E1   # Except spans 3,4 on the device which will be E1
135
136
137

ENVIRONMENT

139       DAHDICONFDIR
140              The directory in which span-types.conf  resides.  /etc/dahdi  if
141              not overridden from the environment.
142
143       DAHDISPANTYPESCONF
144              The  path to span-types.conf resides. /etc/dahdi/span-types.conf
145              if not overridden from the environment.
146
147
148

FILES

150       /etc/dahdi/span-types.conf
151              The default location for the configuration file.
152
153       /sys/bus/dahdi_devices/devices/device
154              SysFS node for the device. In this directory reside the  follow‐
155              ing files, among others:
156
157              spantype
158                     read/write file. Reading from it returns current configu‐
159                     ration for spans of the device.  Span-specifications  can
160                     be  written  to  it  to change line modes (but only for a
161                     span that is not assigned yet).
162
163
164

SEE ALSO

166       dahdi_span_assignments(8), dahdi_genconf(8), dahdi_cfg(8)
167
168

AUTHOR

170       dahdi_span_types was written by Oron Peled.  This manual page was writ‐
171       ten  by Tzafrir Cohen. Permission is granted to copy, distribute and/or
172       modify this document under the terms of the GNU General Public License,
173       Version 2 any  later version published by the Free Software Foundation.
174
175
176
177
178                                  23 Jan 2014              DAHDI_SPAN_TYPES(8)
Impressum