fxotune -d [ options ] - dump mode
fxotune -s - Startup mode
Detect mode (-i): it detects and tunes all the available FXO channels. It writes settings to a configuration file (/etc/fxotune.conf) from which it can be loaded (e.g: at startup) using -s .
Dump mode (-d): Runs detection on a single DAHDI channel, and just dumps waveforms to fxotune_dump.vals is generated in the current directory.
Startup mode (-s): fxotune just reads the settings from fxotune.conf into the FXO modules.
You are advised to run fxotune on all FXO ports you have that support it and that are connected. Note that the tunning is affected by e.g. the physical parameters of the connection, and thus if it has been radically changed, you may need to re-run fxotune.
This program only works for the Digium TDM400P/800P/2400P cards and compatible and the Xorcom Astribank devices. Other cards (notably X100P cards and clones) do not have the hardware to support such tuning.
The tuning process needs a clear line to do the tuning. In order to do that, it runs in cycles of the following: sets the line off-hook, dials a dial string (which should set the PSTN provider waiting for the next digit), and then starts tuning. It has a limited ammount of time for tuning before the PSTN gives up and gives a busy tone. So after a while it hangs up and starts a new cycle.
fxotune has two operation modes: tune (-i) and set (-s). In the tune mode it generates /etc/fxotune.conf, and in the set mode it merely applies the parameters from fxotune.conf to device's ports.
In addition, to maintain compatibility with older versions of fxotune, if in detect or dump mode there is a parameter with option before it, it is considered to be the dialstring parameter (-n).
In dump mode (-d) this is the single channel that will be tested.
In dump mode (-d) this parameter is ignored.
The default is 18 (18 seconds).
The default is "4" (sending just the digit 4). It should work in most cases. Again, this can be tested by connecting a phone to the PSTN line and dialing the dial-string.
This option only applies to detect mode (-i).
Note that: -vv -v will actually set debug level to 1 instead of 3.
This option only applies to dump mode (-d).
fxotune writes immediately to /etc/fxotune.conf so if you stop it half-way, you may get a half-configured system. If you have already tuned your FXO channels and wish to test-run fxotune again, you are advised to backup /etc/fxotune.conf .
The default for -m is 18 seconds. This asusmes that you get a clear line for at least 18 seconds. It is advised that you test that timeout earlier by connecting a phone to the FXO line, dialing 4 (or whatever dial string you put with -n) and see how much time of silence you have.
If you connect your device to a PSTN provider that is not in the US, there is a similar operation you should apply before even getting to fxotune: setting the opermode. The opermode sets a number of country-specific parameters. For the Digium analog cards this is set through the kernel module parameter 'opermode' . For the Xorcom Astribank this is set through the variable 'opermode' in /etc/dahdi/xpp.conf . For valid values of this parameter, see /usr/share/asterisk/init_fxo_modes (FIXME: this has changed and will change. Tzafrir).
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.