summaryrefslogtreecommitdiff
path: root/xpp/utils/genzaptelconf.8
diff options
context:
space:
mode:
Diffstat (limited to 'xpp/utils/genzaptelconf.8')
-rw-r--r--xpp/utils/genzaptelconf.8184
1 files changed, 122 insertions, 62 deletions
diff --git a/xpp/utils/genzaptelconf.8 b/xpp/utils/genzaptelconf.8
index 0ec62a2..081b52d 100644
--- a/xpp/utils/genzaptelconf.8
+++ b/xpp/utils/genzaptelconf.8
@@ -5,10 +5,10 @@
.SH SYNOPSIS
.PP
.B genzaptelconf
-[-sdv] [-c <country_code>] [-r |-e <base_exten>] [ -F ]
+[-sRdv] [-c <country_code>] [-e <base_exten>] [ -F ]
.B genzaptelconf
-[-sdv] -l -- only list to standard output
+[-sRdv] -l -- only list to standard output
.B genzaptelconf
-su -- only unload zaptel modules
@@ -65,7 +65,7 @@ as extension
.I exten_num
+
.I i
-. This is mostly for the caller-id values. Crude, but may be good enough.
+ . This is mostly for the caller-id values. Crude, but may be good enough.
See also
.I -r
.RE
@@ -99,11 +99,11 @@ This triggers the
option as well.
.RE
-.B -r
+.B -R
.RS
-Try to guess a useful
-.I zapata-channels
-configuration for Xorcom Rapid .
+Don't restart asterisk even if it was stopped using
+.I -s
+ .
.RE
.B -s
@@ -115,7 +115,6 @@ work if nobody uses the zaptel channels:
* to allow reading configuration files.
-By default the script will check if asterisk is running and alert if so.
This option tells the script to stop asterisk (if it was running) and to
try to start it after the end of the test.
.RE
@@ -127,61 +126,29 @@ Be verbose. lists the detected modules if
is used. Lists detected channls. In the end tries to connect to asterisk
to get a list of configured zaptel channels.
.RE
-.SH FILES
-.I /etc/zaptel.conf
-.RS
-The configuration file used by
-.I ztcfg
-to configure zaptel devices. re-written by
-.I genzaptelconf
-.RE
-
-.I /etc/zaptel.conf.bak
-.RS
-When
-.I zaptel.conf
-The original zaptel.conf
-.RE
-
-.I /etc/asterisk/zapata.conf
-.RS
-The configuration file of Asterisk's
-.I chan_zap.
-Not modified directly by
-.I genzaptelconf.
-If you want genzaptelconf's setting to take effect, add the following
-line at the end of
-.I zapata.conf:
-.RS
-#include "zapata-channels.conf"
-.RE
-.RE
-
-.I /etc/asterisk/zapata-channels.conf
-.RS
-This is the snippet of
-.I chan_zap
-configuration file that
-.I genzaptelconf generates.
-.RE
+.SH CONFIGURATION
+Look at the beginning of the script for a number of variables that can
+be overriden through the configuraion file. Some variables can also be
+overriden through the environment. The configuration file is sourced by
+bash but for compatibility expected to have only 'var=VALUE' lines and
+comments or empty lines.
+
+The configuration will first be read from
+.I /etc/default/zaptel
+if it exists, and
+.I /etc/sysconfig/zaptel
+otherwise (But those file names may be overriden, see
+.I ZAPTEL_BOOT_DEBIAN
+and
+.I ZAPTEL_BOOT_FEDORA
+below). Variables set in those files will override the default settings
+and setting rom the environment.
-.I /etc/asterisk/zapata-channels.conf.bak
-.RS
-The backup copy of
-.I zapata-channels.conf
-.RE
+The following variables may be set from the environment:
+ZAPCONF_FILE, ZAPATA_FILE, ZAPTEL_BOOT_DEBIAN, ZAPTEL_BOOT_FEDORA,
+DEVZAP_TIMEOUT, ZTCFG
-.I /etc/default/zaptel
.RS
-This file holds configuration for both
-.I genzaptelconf
-and
-.I /etc/init.d/zaptel .
-It is sourced by both scripts and can thus be used to override settings
-of variables from those scripts.
-Some of the variables that can be set in /etc/default/zaptel and affect
-genzaptelconf:
-
.I lc_country
.RS
The default country. Can be also overriden by the option -c
@@ -227,6 +194,94 @@ The group number for zaptel phones.
modules list. Used for unloading and modules detection. The order of modules
is the same for both.
.RE
+
+.I ZAPCONF_FILE
+.RS
+ztcfg's configuration file. The sane default is /etc/zaptel.conf .
+.RE
+
+.I ZAPATA_FILE
+.RS
+The generated partial zapata.conf snippet. Default:
+/etc/asterisk/zapata-channels.conf .
+.RE
+
+.I ZAPTEL_BOOT_DEBIAN
+.RS
+The Debian Zaptel defaults file. Normally
+.I /etc/default/zaptel
+.
+.RE
+
+
+.I ZAPTEL_BOOT_FEDORA
+.RS
+The Zaptel defaults file on various other distributions. Normally
+.I /etc/sysconfig/zaptel
+ .
+.RE
+
+.I DEVZAP_TIMEOUT
+.RS
+Maximal number of seconds to wait for /dev/zap to be initializaed by
+udev.
+.RE
+
+.I ZTCFG
+.RS
+The full path to the ztcfg tool. Default:
+.I /sbin/ztcfg
+genzaptelconf will also explicitly test for
+.I /usr/sbin/ztcfg
+as a last resort.
+.RE
+.RE
+
+.SH FILES
+.I /etc/zaptel.conf
+.RS
+The configuration file used by
+.I ztcfg
+to configure zaptel devices. re-written by
+.I genzaptelconf
+ . A backup copy is saved to
+.I /etc/zaptel.conf.bak
+ .
+.RE
+
+.I /etc/asterisk/zapata.conf
+.RS
+The configuration file of Asterisk's
+.I chan_zap.
+Not modified directly by
+.I genzaptelconf.
+If you want genzaptelconf's setting to take effect, add the following
+line at the end of
+.I zapata.conf:
+.RS
+#include "zapata-channels.conf"
+.RE
+.RE
+
+.I /etc/asterisk/zapata-channels.conf
+.RS
+This is the snippet of
+.I chan_zap
+configuration file that
+.I genzaptelconf generates.
+ . A backup copy is saved to
+.I /etc/asterisk/zapata-channels.conf.bak
+ .
+.RE
+
+.I /etc/default/zaptel
+.RS
+This file holds configuration for both
+.I genzaptelconf
+and
+.I /etc/init.d/zaptel .
+It is sourced by both scripts and can thus be used to override settings
+of variables from those scripts.
.RE
.I /etc/modules
@@ -237,9 +292,9 @@ boot time. When the option
(detect) is used, genzaptelconf will write in this file zaptel modules
to be loaded. If you want to use a different file, set
.I MOD_FILELIST
-.RE
-
+ . If it is rewritten, a backup copy is saved to
.I /etc/modules.bak
+ .
.RS
The backup copy of
.I /etc/modules
@@ -248,6 +303,11 @@ The backup copy of
.SH "SEE ALSO"
ztcfg(8) asterisk(8).
+.SH BUGS
+If you override a configuration variable both through the environment
+and through the configuration file, the value from the configuration
+file wins.
+
.SH "AUTHOR"
This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Permission is granted to copy, distribute and/or modify this document under