1FXOTUNE(8)            System Manager's Manuals: Asterisk            FXOTUNE(8)
2
3
4

NAME

6       fxotune - automatically tune zaptel FXO channels
7

SYNOPSIS

9       fxotune -i [options] - detect mode
10
11       fxotune -d [ options ] - dump mode
12
13       fxotune -s - Startup mode
14
15
16

DESCRIPTION

18       fxotune is a script that fine-tune parameters of the FXO modules of the
19       card. It has three modes of operation:
20
21       Detect mode (-i): it detects and tunes all the available FXO  channels.
22       It  writes  settings  to  a configuration file (/etc/fxotune.conf) from
23       which it can be loaded (e.g: at startup) using -s .
24
25       Dump mode (-d): Runs detection on a single  Zaptel  channel,  and  just
26       dumps waveforms to fxotune_dump.vals is generated in the current direc‐
27       tory.
28
29       Startup mode (-s): fxotune just reads the  settings  from  fxotune.conf
30       into the FXO modules.
31
32       You  are  advised to run fxotune on all FXO ports you have that support
33       it and that are connected. Note that the tunning is  affected  by  e.g.
34       the physical parameters of the connection, and thus if it has been rad‐
35       ically changed, you may need to re-run fxotune.
36
37       FXOTune only works for the Digium TDM400P/800P/2400P cards and compati‐
38       ble  and the Xorcom Astribank devices. Other cards (notably X100P cards
39       and clones) do not have the hardware to support such tuning.
40
41       The tuning process needs a clear line to do the tuning.  In order to do
42       that, it runs in cycles of the following: sets the line off-hook, dials
43       a dial string (which should set the PSTN provider waiting for the  next
44       digit),  and  then  starts tuning. It has a limited ammount of time for
45       tuning before the PSTN gives up and gives a busy tone. So after a while
46       it hangs up and starts a new cycle.
47
48       fxotune  has  two  operation modes: tune (-i) and set (-s). In the tune
49       mode it generates /etc/fxotune.conf, and in  the  set  mode  it  merely
50       applies the parameters from fxotune.conf to device's ports.
51
52

OPTIONS

54       The  following options below except -v (verbose) affect only the detec‐
55       tion process and hence apply only to the detect and dump modes.
56
57       In addition, to maintain compatibility with older versions of  fxotune,
58       if  in  detect or dump mode there is a parameter with option before it,
59       it is considered to be the dialstring parameter (-n).
60
61       -b startdev
62              Start tuning from zaptel channel num.  startdev: skip all previ‐
63              ous channels. By default starting from channel 1.
64
65              In  dump  mode  (-d)  this  is  the  single channel that will be
66              tested.
67
68       -e stopdev
69              Tune only up to zaptel channel num.  stopdev: skip all  previous
70              channels. By default stopping at channel 252.
71
72              In dump mode (-d) this parameter is ignored.
73
74       -l delay-to-silence
75              Time  in  seconds to wait after dialing the dial-string to get a
76              clear line.  The default is 0.  before
77
78       -m silence-good-for
79              Time in seconds which states how long the PSTN will  wait  after
80              we  dialed  the  dial-string until it starts giving a busy tone.
81              You can test this by connecting an analog phone to the line  and
82              dialing.
83
84              The default is 18 (18 seconds).
85
86       -n dial-string
87              Digits  to dial to the PSTN in order to get it stop its dialtone
88              and waiting for the next digit.
89
90              The default is "4" (sending just the digit 4). It should work in
91              most  cases.  Again, this can be tested by connecting a phone to
92              the PSTN line and dialing the dial-string.
93
94       -t detect-type
95              This option allows using the older detection method used by fxo‐
96              tune of zaptel 1.2. use -t 1 for that older method. whereas -t 2
97              (the default) uses the current method.
98
99              This option only applies to detect mode (-i).
100
101       -v[vvvv]
102              Sets debugging on. The more v-s, the higher debug level.
103
104              Note that: -vv -v  will actually set debug level to 1 instead of
105              3.
106
107       -w wave-form
108              The  default:  -1, for multitone waveform. Alternatively: a fre‐
109              quency of a single tone.
110
111              This option only applies to dump mode (-d).
112
113
114

EXAMPLES

116              fxotune -i 9
117       if you need to dial 9 for an external line. If you always get  a  line,
118       you can simply use any digit.
119
120       -s
121              Load settings from the last test. Used at startup.
122
123

FILES

125       /etc/fxotune.conf
126              The  configuration  file generated by fxotune in detect mode and
127              from which configuration is loaded when -s is used.
128
129

NOTES

131       Running fxotune takes approximately a minute per port. If you  wish  to
132       only  run  fxotune for several ports, you can use the options -b and -e
133       to set a specific range of ports. Another useful trick is  to  actually
134       keep  asterisk running, and only "destroy" the zaptel channels you wish
135       to tune (zap destroy channel NNN):  other  channels  will  be  used  by
136       Asterisk,  and  hence  skipped. This can be useful if you have many FXO
137       ports that are not connected.
138
139       fxotune writes immedietly to /etc/fxotune.conf so if you stop it  half-
140       way,  you  may  get a half-configured system. If you have already tuned
141       your FXO channels and wish to test-run fxotune again, you  are  advised
142       to backup /etc/fxotune.conf .
143
144       The  default  for  -m  is 18 seconds. This asusmes that you get a clear
145       line for at least 18 seconds. It is advised that you test that  timeout
146       earlier  by  connecting a phone to the FXO line, dialing 4 (or whatever
147       dial string you put with -n) and see how much time of silence you have.
148
149       If you connect your device to a PSTN provider that is not  in  the  US,
150       there  is  a  similar operation you should apply before even getting to
151       fxotune: setting the opermode. The opermode sets a number  of  country-
152       specific  parameters.  For  the Digium analog cards this is set through
153       the kernel module parameter 'opermode' . For the Xorcom Astribank  this
154       is  set  through  the  variable  'opermode'  in  /etc/default/zaptel or
155       /etc/sysconfig/zaptel .   For  valid  values  of  this  parameter,  see
156       /usr/share/asterisk/init_fxo_modes .
157
158

SEE ALSO

160       ztcfg(8), zttool(8), ztmonitor(8), asterisk(8).
161
162

AUTHOR

164       This  manual  page  was  written  by  Tzafrir Cohen <tzafrir.cohen@xor‐
165       com.com> Permission is granted to copy, distribute and/or  modify  this
166       document  under  the terms of the GNU General Public License, Version 2
167       any later version published by the Free Software Foundation.
168
169       On Debian systems, the complete text of the GNU General Public  License
170       can be found in /usr/share/common-licenses/GPL.
171
172
173
174asterisk                          9 June 2007                       FXOTUNE(8)
Impressum