MHSpot.com
SipToSis Linux Tips
STS Home FAQ ATA Setup Skype Trunk Setup Troubleshooting Forum Downloads

Here is some info for setting up Linux. I don't get into PBX or ATA details here.
Modify username and folders as needed.
Most instructions are for CentOS, some also apply to other distributions.

Install CentOS 5.4 x64
If you don't choose a GUI option you will have to deal with any missing packages and start x yourself.
Create a user called stsuser
I disabled the firewall for this setup example.

update first
yum update

login as stsuser
mkdir downloads

Install Skype
Download Skype - static version 2.1.0.81 to /home/stsuser/downloads
su (use sudo for Ubuntu)
cd /opt
tar jxvf /home/stsuser/downloads/skype_static-2.1.0.81.tar.bz2
ln -s skype_static-2.1.0.81 skype
ln -s /opt/skype /usr/share/skype
ln -s /opt/skype/skype /usr/bin/skype

On a CentOS Server some additional packages are needed:
yum install libXv
yum install libXScrnSaver
yum groupinstall "X Window System"
yum install alsa-lib

On a Server twm will be used during the configuration process so some changes are needed to make it work:
vi /etc/X11/twm/system.twmrc - add RandomPlacement above NoGrabServer line.
cp /etc/X11/twm/system.twmrc /home/stsuser/.twmrc
chown stsuser:stsuser /home/stsuser/.twmrc

exit

Ubuntu 64 bit distros need 32 bit libraries (file not found error)
Install getlibs-all.deb package from here
cd /opt/skype_static-2.1.0.81
sudo getlibs skype

Setup snd-dummy - required if no sound hardware
su (or sudo)
/sbin/modprobe snd-dummy
gedit (or vi) /etc/rc.local
add /sbin/modprobe snd-dummy before exit 0:
exit

Test that skype works on it's own.
cd /home/stsuser
For a Server, first startx
skype &

Install Sun/Oracle's Java - Do NOT use openjdk
Ubuntu: sudo apt-get install sun-java6-jre
CentOS and Ubuntu can use following procedure:
Download file: jre-6u18-linux-x64.bin to /home/stsuser/downloads from Java (Linux JRE x64 version.)
su - (Don't miss the minus, use sudo on Ubuntu)
cd /opt
/bin/sh /home/stsuser/downloads/jre-6u18-linux-x64.bin

Method 1:
alternatives --install /usr/bin/java java /opt/jre1.6.0_18/bin/java 2
alternatives --config java
select correct java install if incorrect.

Method 2:
ln -s /opt/jre1.6.0_18/bin/java /usr/bin/java

java -version
confirm correct version.
exit

Install Xvfb
su
CentOS: yum install Xvfb
Ubuntu: sudo apt-get install Xvfb
exit

Add stsuser to audio group - Needed for automatic bootup.
su
usermod -a -G audio stsuser
exit

Install SipToSis
Download SipToSis to /home/stsuser/downloads
mkdir /home/stsuser/siptosis
cd /home/stsuser/siptosis
unzip /home/stsuser/downloads/tmp_SipToSis.zip (fix file name as needed)
chmod +x SipToSis_linux
skype &
login or create your skype account.
./SipToSis_linux
accept API request.
At this point you should be able to make echo test from an ATA,Softphone or PBX using the 55 shortcut and the SipToSis contact url.
PBX users should setup SipToSis to register with the PBX before going further.

Single channel users only
chmod +x stsTrunk_linux
gedit (or vi) stsTrunk_linux
runuser=stsuser
scriptpath=/home/stsuser/siptosis
displayMethod=XVFB

Single channel boot setup
su
gedit (or vi) /etc/rc.local
Add following line before exit 0:
su -l stsuser -c "/home/stsuser/siptosis/stsTrunk_linux boot"
Note: if using snd-dummy, make sure modprobe is before siptosis startup command.
exit

Pulseaudio removal
sudo apt-get remove pulseaudio then reboot.
If you didn't have a sound card when installing Ubuntu run:
sudo alsactl init

Patching snd-dummy for more streams:

Ubuntu Procedure
Alsa dummy.c modification:
Get package Driver (alsa-driver) 1.0.22.1 from Alsa Project Download
cd /usr/src
sudo tar jxvf /pathtodownload/alsa-driver-1.0.22.1.tar.bz2
cd /usr/src/alsa-driver-1.0.22.1/alsa-kernel/drivers
Change line 152:
static int pcm_substreams[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 8};
to:
static int pcm_substreams[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 128};
cd /usr/src/alsa-driver-1.0.22.1
sudo ./configure
sudo make
sudo make install
reboot
more /proc/asound/version - should show Alsa Driver version 1.0.22.1
This patch also works on 1.0.23/1.0.24 driver except it's line 66 instead.

There is some good info for compiling Alsa here.

Once the new snd-dummy is in place configure all skype clients (Mic/Spkrs/Ring) - set to Dummy, Dummy PCM (hw:1,0) or whatever it ends up as.