.TH FXOTUNE 8 "September 10th, 2005" "Xorcom Rapid Asterisk" "Linux Programmer's Manual" .SH NAME .B fxotune \(em automatically tune FXO channels on a Digium TDM400 card .SH SYNOPSIS .B fxotune -i .I OPTIONS \(em detect .B fxotune -s \(em load settings .SH DESCRIPTION .B fxotune is a script that fine-tune parameters of the FXO modules of the TDM400 card. Whene run in .I detect mode (-i) it detects and tunes all the FXO channels of such cards. It needs a dial string after which the line(s) will give dial tone. It writes settings to a configuration file (/etc/fxotune.conf , name is hardwired) from which it can be loaded (e.g: at startup) using -s . 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. .B 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. .SH OPTIONS .B THIS SECTION CURRENTLY DOCUMENTS THE OLD SYNTAX OF FXOTUNE. RUN fxotune WITHOUT ANY PARAMETERS TO GET A USAGE MESSAGE. .B -i .RS .I dialstr Start detecting optimal settings. .I dialstr Is a number needed to dial to get a dial tone. The test can take several minutes, and must be performed when Asterisk is not running. For example: .RS fxotune -i 9 .RE if you need to dial 9 for an external line. If you always get a line, you can simply use any digit. .RE .B -s .RS Load settings from the last test. Used at startup. .RE .SH FILES .I /etc/fxotune.conf .RS The configuration file generated by fxotune in detect mode and from which configuration is loaded when .B -s is used. .SH NOTES Running fxotune takes approximately a minute per port. If you wish to only run fxotune for several ports, you can use the options -b and -e to set a specific range of ports. Another useful trick is to actually keep asterisk running, and only "destroy" the zaptel channels you wish to tune (zap destroy channel NNN): other channels will be used by Asterisk, and hence skipped. This can be useful if you have many FXO ports that are not connected. .B fxotune writes immedietly to .B /etc/fxo.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 ___) 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/default/zaptel or /etc/sysconfig/zaptel . .SH SEE ALSO ztcfg(8), zttool(8), ztmonitor(8), asterisk(8). .SH AUTHOR This manual page was written by Tzafrir Cohen Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.