~ubuntu-branches/ubuntu/quantal/zaptel/quantal

« back to all changes in this revision

Viewing changes to xpp/utils/genzaptelconf.8

  • Committer: Bazaar Package Importer
  • Author(s): Tzafrir Cohen
  • Date: 2008-08-28 22:58:23 UTC
  • mfrom: (11.1.11 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080828225823-r8bdunirm8hmc76m
Tags: 1:1.4.11~dfsg-2
* Patch xpp_fxs_power: Fixed an issue with hook detection of the Astribank
  FXS module.
* Don't fail init.d script if fxotune fails. This may happen if running it
  when Asterisk is already running.
* Bump standards version to 3.8.0.0 .
* Ignore false lintian warning ("m-a a-i" has "a a").
* Patch xpp_fxo_cid_always: do always pass PCM if that's what the user
  asked.
* Patch vzaphfc_proc_root_dir: fix vzaphfc on 2.6.26.
* Patch wcte12xp_flags: Proper time for irq save flags.
* Patch headers_2627: Fix location of semaphore.h for 2.6.27 .
* Patch xpp_fxs_dtmf_leak: Don't play DTMFs to the wrong channel.
* Patch wctdm_fix_alarm: Fix sending channel alarms.
* Patch device_class_2626: Fix building 2.6.26 (Closes: #493397).
* Using dh_lintian for lintian overrides, hence requiring debhelper 6.0.7.
* Lintian: we know we have direct changes. Too bad we're half-upstream :-(
* Fix doc-base section names. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH GENZAPTELCONF 8 "July 18th, 2005" "Xorcom Rapid Asterisk" "Linux Programmer's Manual"
2
 
.SH "NAME" 
3
 
.B genzaptelconf 
4
 
.SH SYNOPSIS
5
 
.PP 
6
 
.B genzaptelconf 
7
 
[-sRdv] [-c <country_code>] [-e <base_exten>] [ -F ]
8
 
 
9
 
.B genzaptelconf 
10
 
[-sRdv] -l -- only list to standard output
11
 
   
12
 
.B genzaptelconf 
13
 
-su -- only unload zaptel modules
14
 
 
15
 
.B genzaptelconf 
16
 
-h -- Help screen
17
 
    
18
 
.SH DESCRIPTION
19
 
.B genzaptelconf 
20
 
is a script to detect zaptel devices (currently mostly TDM cards are 
21
 
supported). It generates both 
22
 
.I /etc/zaptel.conf
23
 
and 
24
 
.I /etc/asterisk/zapata-channels.conf
25
 
 
26
 
.I PRI
27
 
and 
28
 
.I BRI
29
 
(HFC, with ZapBRI) cards are basically identified as well. However the span
30
 
configiration is a default that I only hope is sane. Looking for feedback
31
 
 
32
 
.SH OPTIONS
33
 
.B -c
34
 
.I country_code
35
 
.RS
36
 
A two-letter country code. Sets the country-code for the zonezone 
37
 
entries in 
38
 
.I zaptel.conf
39
 
, The default is the value of
40
 
.I lc_country
41
 
from 
42
 
.I /etc/default/zaptel
43
 
and failing that, "us".
44
 
.RE
45
 
 
46
 
.B -d
47
 
.RS
48
 
Also try to detect modules. Unloads all zaptel modules and loads them
49
 
one by one. Considers a module useful if it loaded successfully and if 
50
 
loading it has generated at least one zapata channel.
51
 
 
52
 
The list of detected modules is written as the value of 
53
 
.I ZAPTEL_MODS
54
 
in 
55
 
.I /etc/default/zaptel
56
 
.RE
57
 
 
58
 
.B -e
59
 
.I base_exten_num
60
 
.RS
61
 
Configure channel 
62
 
.I i 
63
 
as extension 
64
 
.I exten_num
65
 
+
66
 
.I i 
67
 
 . This is mostly for the caller-id values. Crude, but may be good enough. 
68
 
See also
69
 
.I -r
70
 
.RE
71
 
 
72
 
.B -F
73
 
.RS
74
 
Disable writing FXS extensions in zapata.conf
75
 
.RE
76
 
 
77
 
.B -l
78
 
.RS
79
 
Only list deceted channels and their signalling. Don't write 
80
 
configuration files. Note, however that 
81
 
.I -ld
82
 
will still rewrite the modules line in 
83
 
.I /etc/default/zaptel
84
 
(see 
85
 
.I -d
86
 
above).
87
 
.RE
88
 
 
89
 
.B -M
90
 
.RS
91
 
Update
92
 
.I /etc/modules
93
 
with a list of our modules, thereby
94
 
triggers their loading via modprobe on the next boot.
95
 
 
96
 
This triggers the
97
 
.I -d
98
 
option as well.
99
 
.RE
100
 
 
101
 
.B -R
102
 
.RS
103
 
Don't restart asterisk even if it was stopped using
104
 
.I -s
105
 
 .
106
 
.RE
107
 
 
108
 
.B -s
109
 
.RS
110
 
Stop asterisk for the duration of the test. The detection will only
111
 
work if nobody uses the zaptel channels: 
112
 
 
113
 
* To allow unloading of modules
114
 
 
115
 
* to allow reading configuration files.
116
 
 
117
 
This option tells the script to stop asterisk (if it was running) and to 
118
 
try to start it after the end of the test.
119
 
.RE
120
 
 
121
 
.B -v
122
 
.RS
123
 
Be verbose. lists the detected modules if 
124
 
.I -d
125
 
is used. Lists detected channls. In the end tries to connect to asterisk
126
 
to get a list of configured zaptel channels.
127
 
.RE
128
 
.SH CONFIGURATION
129
 
Look at the beginning of the script for a number of variables that can 
130
 
be overriden through the configuraion file. Some variables can also be 
131
 
overriden through the environment. The configuration file is sourced by
132
 
bash but for compatibility expected to have only 'var=VALUE' lines and
133
 
comments or empty lines.
134
 
 
135
 
The configuration will first be read from 
136
 
.I /etc/default/zaptel
137
 
if it exists, and 
138
 
.I /etc/sysconfig/zaptel
139
 
otherwise (But those file names may be overriden, see 
140
 
.I ZAPTEL_BOOT_DEBIAN
141
 
and 
142
 
.I ZAPTEL_BOOT_FEDORA
143
 
below). Variables set in those files will override the default settings
144
 
and setting rom the environment.
145
 
 
146
 
The following variables may be set from the environment:
147
 
ZAPCONF_FILE, ZAPATA_FILE, ZAPTEL_BOOT_DEBIAN, ZAPTEL_BOOT_FEDORA,
148
 
DEVZAP_TIMEOUT, ZTCFG
149
 
 
150
 
.RS
151
 
.I lc_country
152
 
.RS
153
 
The default country. Can be also overriden by the option -c
154
 
.RE
155
 
 
156
 
.I base_exten
157
 
.RS
158
 
The base number used for automatic numbering
159
 
.RE
160
 
 
161
 
.I context_manual
162
 
.RS
163
 
If set to 'yes', no context changes are made in zapata-channels.conf
164
 
.RE
165
 
 
166
 
.I context_lines
167
 
.RS
168
 
The context into which calls will go from zaptel trunks.
169
 
.RE
170
 
 
171
 
.I context_phones
172
 
.RS
173
 
The context into which calls will go from zaptel phones.
174
 
.RE
175
 
 
176
 
.I context_manual
177
 
.RS
178
 
If set to 'yes', no group settings are made in zapata-channels.conf
179
 
.RE
180
 
 
181
 
.I group_lines
182
 
.RS
183
 
The group number for zaptel trunks.
184
 
.RE
185
 
 
186
 
.I group_phones
187
 
.RS
188
 
The group number for zaptel phones.
189
 
.RE
190
 
 
191
 
.I ALL_MODULES
192
 
.RS
193
 
modules list. Used for unloading and modules detection. The order of modules
194
 
is the same for both.
195
 
.RE
196
 
 
197
 
.I ZAPCONF_FILE
198
 
.RS
199
 
ztcfg's configuration file. The sane default is /etc/zaptel.conf .
200
 
.RE
201
 
 
202
 
.I ZAPATA_FILE
203
 
.RS
204
 
The generated partial zapata.conf snippet. Default:
205
 
/etc/asterisk/zapata-channels.conf .
206
 
.RE
207
 
 
208
 
.I ZAPTEL_BOOT_DEBIAN
209
 
.RS
210
 
The Debian Zaptel defaults file. Normally
211
 
.I /etc/default/zaptel
212
 
.
213
 
.RE
214
 
 
215
 
 
216
 
.I ZAPTEL_BOOT_FEDORA
217
 
.RS
218
 
The Zaptel defaults file on various other distributions. Normally
219
 
.I /etc/sysconfig/zaptel
220
 
 .
221
 
.RE
222
 
 
223
 
.I DEVZAP_TIMEOUT
224
 
.RS
225
 
Maximal number of seconds to wait for /dev/zap to be initializaed by
226
 
udev.
227
 
.RE
228
 
 
229
 
.I ZTCFG
230
 
.RS
231
 
The full path to the ztcfg tool. Default: 
232
 
.I /sbin/ztcfg
233
 
genzaptelconf will also explicitly test for
234
 
.I /usr/sbin/ztcfg 
235
 
as a last resort.
236
 
.RE
237
 
.RE
238
 
 
239
 
.SH FILES
240
 
.I /etc/zaptel.conf
241
 
.RS
242
 
The configuration file used by 
243
 
.I ztcfg
244
 
to configure zaptel devices. re-written by 
245
 
.I genzaptelconf
246
 
 . A backup copy is saved to
247
 
.I /etc/zaptel.conf.bak
248
 
 .
249
 
.RE
250
 
 
251
 
.I /etc/asterisk/zapata.conf
252
 
.RS
253
 
The configuration file of Asterisk's 
254
 
.I chan_zap.
255
 
Not modified directly by 
256
 
.I genzaptelconf.
257
 
If you want genzaptelconf's setting to take effect, add the following 
258
 
line at the end of 
259
 
.I zapata.conf:
260
 
.RS
261
 
#include "zapata-channels.conf"
262
 
.RE
263
 
.RE
264
 
 
265
 
.I /etc/asterisk/zapata-channels.conf
266
 
.RS
267
 
This is the snippet of 
268
 
.I chan_zap
269
 
configuration file that 
270
 
.I genzaptelconf generates.
271
 
 . A backup copy is saved to
272
 
.I /etc/asterisk/zapata-channels.conf.bak
273
 
 .
274
 
.RE
275
 
 
276
 
.I /etc/default/zaptel
277
 
.RS
278
 
This file holds configuration for both 
279
 
.I genzaptelconf
280
 
and
281
 
.I /etc/init.d/zaptel .
282
 
It is sourced by both scripts and can thus be used to override settings 
283
 
of variables from those scripts.
284
 
.RE
285
 
 
286
 
.I /etc/modules
287
 
.RS
288
 
A debian-specific list of kernel modules to be loaded by modprobe at 
289
 
boot time. When the option 
290
 
.I -d
291
 
(detect) is used, genzaptelconf will write in this file zaptel modules
292
 
to be loaded. If you want to use a different file, set 
293
 
.I MOD_FILELIST
294
 
 . If it is rewritten, a backup copy is saved to
295
 
.I /etc/modules.bak
296
 
 .
297
 
.RS
298
 
The backup copy of 
299
 
.I /etc/modules
300
 
.RE
301
 
 
302
 
.SH "SEE ALSO" 
303
 
ztcfg(8) asterisk(8). 
304
 
 
305
 
.SH BUGS
306
 
If you override a configuration variable both through the environment 
307
 
and through the configuration file, the value from the configuration 
308
 
file wins.
309
 
 
310
 
.SH "AUTHOR" 
311
 
This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com> 
312
 
Permission is granted to copy, distribute and/or modify this document under 
313
 
the terms of the GNU General Public License, Version 2 any  
314
 
later version published by the Free Software Foundation. 
315
 
 
316
 
On Debian systems, the complete text of the GNU General Public 
317
 
License can be found in /usr/share/common-licenses/GPL.