SvxLink - Multi Purpose Voice Services System


Main Menu

SourceForge.net Logo

These pages are obsolete. Please use the Trac pages instead

Installation from prebuilt binaries

SvxLink has been developed under Fedora Linux. It should be easy to install under Fedora since there are binary packages available. Also, since the development is done under Fedora it's most tested under that distribution.

SvxLink have a few dependencies. Most of them should be installed by default on a normal Linux workstation. The Qtel application requires X/Qt but the svxlink server is a pure console application. Other dependencies: libsigc++ (only version 1.2 will work), libgsm, libtcl, libpopt, libgcrypt and optionally libspeex.

The SvxLink distribution contains a couple of RPM:s:

libasync
Required. Base library functions.
echolib
Required for EchoLink support
svxlink-server
The SvxLink server application
qtel
The Qt EchoLink Client application
xxx-devel packages
Development packages. Only needed if you are going to develop applications based on the libraries in the SvxLink project.

Specific installation instructions for different distributions:

Now continue below reading the post install stuff chapter.

Installation from source

If you are not running one of the distributions that there are prebuilt binaries for, you will have to build the whole thing from source. You will still need to satisfy the dependencies specified above. That is libsigc++ 1.2, gsm, popt, libgcrypt and speex. You can probably find prebuilt binaries for these libs for your distribution. Otherwise you will just have to compile them as well.

To compile Qtel, the Qt widget toolkit and the X window system are needed. There is a good chance that these will already be installed on your system. If Qt is not installed, find a prebuilt package or compile it from source. If the X window system is not installed, you're on your own...

Now download the sources for SvxLink from the sourceforge download area. Find the svxlink-YYMMDD.tar.gz with the latest date. If you are going to run the svxlink-server, you will also need the sounds-YYMMDD.tar.gz with the matching date. Find a good spot to unpack and compile the source and cd into that directory. Then do the following (install must be done as user root):

tar xvzf svxlink-YYMMDD.tar.gz
cd svxlink-YYMMDD
make
make install
If you are going to run the SvxLink server, unpack the sound files in a good location. A good location could for example be /usr/share/svxlink/. As user root, do the following:
cd /usr/share/svxlink
tar xvzf /path-to-wherever-you-put-the-tar-file/sounds-YYMMDD.tar.gz

Specific installation instructions for different distributions:

Now continue below reading the post install stuff chapter.

Post install stuff

Note: For Alsa based systems (like Fedora Core >= 2), the Alsa OSS emulation is used for sound I/O. There is a bug in the emulation layer which will make SvxLink/Qtel fail. To work around this bug, there is an environment variable called ASYNC_AUDIO_NOTRIGGER. This is by default set to 1 to activate the workaround since most modern Linux distributions now use Alsa by default. If you get into trouble with the audio output, try setting it to 0. For the SvxLink server that is done in /etc/sysconfig/svxlink if you are using the provided start script.

For Qtel set it manually on the command line, in a start script or in the login script for your shell. The instructions below assume you are using bash (usually the default).

export ASYNC_AUDIO_NOTRIGGER=0
qtel &
Or on one line:
ASYNC_AUDIO_NOTRIGGER=0 qtel &

The environment variable setting will be lost on logout so the export line is best put into the file ".bash_profile", which can be found in your home directory.

Note that setting this environment variable when it is not needed can make SvxLink/Qtel to stop working. Only set it if you have audio problems.

Note: Make sure that no other audio applications are running at the same time as SvxLink/Qtel. If another application has opened the sound device, SvxLink/Qtel will hang until the device is closed by the other application. Especially, if you are having problems with SvxLink/Qtel hanging, check for sound servers like artsd and the like. However, this is less of a problem now when most distributions are using the Alsa sound layer.

If you only are going to run Qtel, first read the Audio level adjustment chapter and then go directly to the Qtel User Docs.

If you are going to run the svxlink server, read on.

Hardware

To run the SvxLink server, some kind of hardware is needed to connect the computer to the transceiver. At the moment I am using an interface designed by Aleks, s54s, which is fully isolated with transformers and opto-couplers. For a long time I just used a simple direct, non-isolated, connection between the transceiver and the computer. This also work well but I have actually fried one sound card this way.

WB0RXX/Tim has constructed an interface circuit that he use with his SvxLink system. The schematic can be found here.

Typical EchoLink hardware might work with SvxLink as well. Have a look at the EchoLink interfaces page. However, I have not tried any of these so there are no guarantees.
Please tell me if you get any of the interfaces working or if they are not working.

Audio level adjustment

There are no audio level controls in SvxLink server nor Qtel. The levels must be adjusted with an external tool like aumix, kmix, alsamixer or whatever your favourite mixer is. Start one of the mixers and locate the controls to use for adjusting the levels. The output level is adjusted using the two sliders Pcm and Vol. The input level is adjusted using the Capture (sometimes called IGain) slider, not the Mic or Input (line-in) slider. The latter two are used to adjust the monitoring level of the two inputs. Set these two to zero. Select to use either the microphone or the line-in input. Set the Pcm, Vol and Mic/Input sliders half way up. Adjust the levels according to the instructions below.

To adjust the levels in Qtel, start by connecting to the *ECHOTEST* server. This EchoLink server will echo back everything you send to it. Right after the connection has been established, a greeting message will be played back. Adjust the speaker level to a comfortable level using the Pcm and Vol sliders. Press the PTT and say something and listen how it comes back. Adjust the Capture slider until you are satisfied.

To adjust the levels for the SvxLink server, first set the PEAK_METER configuration variable to 1 in the receiver configuration section. Start the SvxLink server up and press *# on the keyboard. This will make the svxlink server identify itself. The # is only needed for the *-command when entering commands on the keyboard. When doing it from the radio, a * followed by a squelch close will trigger an identification. Do this a couple of times and adjust the Pcm and Vol sliders to the highest volume possible without distorsion.

To adjust the audio input level, start by opening the squelch on the receiver so that SvxLink just hear noise. Pull the audio input gain sliders up until you see messages about distorion printed on the console. Then lower the audio gain until no distorsion messages are printed. If you cannot make SvxLink print distorsion messages, the input level is too low. You should try to fix this on the analogue side but it is possible to use the PREAMP configuration variable in the receiver section to fix it.

Now, activate the parrot module by pressing 1# on the keyboard. Use another transmitter to make a short transmission. Listen to the recorded audio and make sure it sounds good. Now try to transmit some DTMF digits and see if the digits are detected. If not, try to adjust the input level up or down and try again. Try all 16 digits: 0-9, *, #, A, B ,C, D.

As a rule of thumb, try to not pull the sliders over 90%. Most sound cards will distort the signal if the level is set too high. Instead, use the PREAMP configuration variable if received audio is too low.

SvxLink server configuration

During the svxlink-server package installation the /etc/svxlink.conf default configuration file is installed. Module configuration files are placed under /etc/svxlink.d. Edit the configuration files to your liking.

There is a voice greeting message sent to connecting echolink stations. This message should be replaced with a personal one. I have used the rec application that is included in the sox package to record the sounds. Lately I have started using audacity to record sound clips. Any tool capable of recording raw sound files using 8kHz sampling rate and 16 bit signed samples is ok to use. Another alternative is to record the sound files using your favorite tool and then convert them to the correct format using the sox application. The rec application should be used as shown below.

  rec -r8000 -sw /usr/share/svxlink/sounds/EchoLink/greeting.raw
  play -r8000 -sw /usr/share/svxlink/sounds/EchoLink/greeting.raw

Further configuration information can be found in the manual page svxlink.conf. There are also manual pages for the svxlink application and its modules (ModuleHelp, ModuleParrot, ModuleEchoLink ModuleDtmfRepeater).

To set up a remote receiver, have a look at the remotetrx and the remotetrx.conf manual pages.

After the configuration has been done, start the server by typing svxlink at the command prompt. It is possible to simulate DTMF input by pressing the 0-9, A-D, *, # keys. Have a look at the user documentation to begin testing the server. To get help about command line options, start the svxlink server with the --help switch.

When everything is configured and working, start the SvxLink server using the /etc/init.d/svxlink start script. A logfile will be put in /var/log/svxlink.

Note: To start the svxlink server in the background, use the --daemon switch. Do not use "&". This will make the server hang when trying to read from standard input.

The Event Handling Subsystem

This chapter can be skipped on the first reading. Come back here to read this chapter when you feel like customizing your SvxLink server or adding your own features.

There are a lot of sounds that should be played as a response to an event in the SvxLink system. To make these sounds as configurable as possible there is a programmable event handling subsystem. The programming language chosen for this is TCL (Tool Command Language). For each event in SvxLink there is a corresponding TCL function that is called when the event occurs. In this function the normal action is to play a sound or a couple of sound clips. It is of course also possible to use the full power of TCL to make all sorts of things happen. For example execution of an external application, reading files with information (e.g. DX, weather data etc), time based events (e.g. only do this when the time is...).

The TCL event scripts are located under /usr/share/svxlink/sounds. The main script is called events.tcl. When this script is loaded by the SvxLink server at startup, it looks in a subdirectory called events.d. Any file that ends in ".tcl" in this directory will be read and should contain a TCL script. If you have a look in this directory you will find files like: Logic.tcl (common events for logic cores), RepeaterLogic.tcl (repeater logic events), SimplexLogic.tcl (simplex logic events), Module.tcl (common module events), Help.tcl (help module events), Parrot.tcl (parrot module events), EchoLink.tcl (echolink module events). There is a comment above each function that says what it does so have a look in these files and let your imagination flow.

There are a couple of functions that can be used within a TCL function to make things happen in the SvxLink core.

playFile filename
Play the file pointed out by filename. The filename may be given with an absolute path or a path relative to the directory where the events.tcl script is at. The format of the file must be 16 bit signed raw samples. A wav-file can be converted to the correct format by using the "sox" application:
sox filename.wav -r8000 -sw filename.raw
playTone fq amplitude length
Play a tone with the specified frequency (Hz), amplitude (0-1000) and length (milliseconds).
playSilence length
Play the specified number of milliseconds of silence. This can be used to trim the spacing between audio clips.
recordStart filename
Start recording of received audio to a file. Only one recording at a time can be active.
recordStop
Stop a previously started recording.
There are also a couple of convenience functions implemented in TCL:
playMsg context name
This function also play a file. It actually use the playFile function to play the file. The path to the file to play is formed as follows: event.tcl directory/context/name.raw. If no matching sound clip is found in the directory specified by "context", the Default directory will be searched.
spellWord word
Spell the specified word using a phonetic alphabet.
playNumber number
Spell the specified number digit by digit.
playTwoDigitNumber number
Play a number consisting of two digits from 00-99.
playTime hour minute
Play the specified time. For example "playTime 13 35" will produce "One Thirtyfive PM".


Copyright © 2003-2008 SM0SVX / Tobias Blomberg