Kiax Softphone on LTSP 5 Client

Deploying thin client workstations with built-in VOIP soft phones as user workstations reduces the amount of hardware, wiring, power, networking, and maintenance required.  Imagine how easy it would be to setup a new workstation:  plug in the thin-client to power and network (no power if POE!), hook up peripherals including a headset, and walk away.

This method takes a different approach than other proposed solutions, since the softphone will run locally in it’s own virtual terminal so the user has access to the phone without running a particular desktop, essentially turning a thinclient into a VOIP appliance.

Kiax was selected for the softphone since it is available as a pre-compiled binary statically linked to the required QT libraries, so custom LTSP build environments are not required.  Here are steps taken to setup Kiax to run locally on an LTSP client booting from an Ubuntu 8.10 LTSP server.  The first section gets everything going in the Gnome deskop.  The second section describes how to get Kiax running in it’s own virtual terminal.

Like all the information on this site this is not a detailed step-by-step how-to but should at least get you going in the right direction.

Setup and Test in Gnome

  1. Install the  Kiax binary (and icons) into the LTSP chroot (eg. /opt/ltsp/i386/opt/kiax).  The binary is statically linked to QT libraries, so nothing needs to be compiled.  Chown -R root.root.
  2. Setup permissions on audio devices.  The simplest method is to add users to the audio group (/opt/ltsp/i386/etc/group) but depending on how you authenticate users on the client, this may or may not work.  I have setup the LTSP server to authenticate with AD via Likewise Open.  Ideally the clients would also authenticate via Likewise Open, but I don’t want to have the client machines join the domain.  Without joining the domain, the clients cannot map GIDs, so the client has no concept of the user’s group (this is on my to-do list).   The dirty solution then is to have udev create all your sound devices with 666 permissions:  edit /opt/ltsp/i386/etc/udev/rules.d/40-permissions.rules and add MODE=0666 after and devices assigned to GROUP=audio.
  3. Re-build the image (ltsp-update-image) and boot a thinclient.
  4. Login via LDM to a Gnome desktop and Launch Kiax and see if it detects any audio devices.  To run Kiax, open a terminal and run “ltsp-localapps <path to kiax on client>”.  If Kiax fails to load, run an xterm on the client and launch Kiax from there to see what’s going on.  Enter valid IAX account info if this is the first time running Kiax.  Then open VoIp->Settings  and see what Devices are listed.  If there are no devices, re-check permissions and verify sound from other applications is working.  I use /dev/dsp for all three devices on my Dell C640 client.  Note that Kiax ‘hides’ by default, minimizing to a green dot in the system tray.  That caused some frustration.
  5. Configure the LSTP sound daemon.  By default, LTSP clients use the pulse sound daemon, which I have not been able to test (it won’t work on my C640 test client).  To change the sound daemon to ESD, edit lts.conf to include “SOUND_DAEMON = esd” in your client config section.
  6. Make a test call and see how it sounds.

Setup Kiax in it’s own Virtual Terminal

The setup above should get Kiax running on an LTSP client with Gnome, but there may be instances when a user doesn’t use Gnome, but RDP or some other script instead.  By setting up Kiax in it’s own virtual terminal, the user can hit Ctrl-Alt-FNx any time make/take phone calls.

Kiax stores it’s config files in ${HOME}/.kiax, which is fine when a user logs in via LDM, but there is no login or $HOME when you run Kiax on a virtual terminal, so a method is needed to store config files in a per-client and persistent way.  This is done by creating an NFS export from the LTSP server and mounting it on the client, then using a screen script to launch Kiax via lts.conf and create per-machine config files based on hostnames.

  1. Make sure the DHCP server is assigning hostnames to the clients (option 12), otherwise all your clients will be called ltsp and use the same Kiax config.
  2. Create a directory on the server for storing Kiax config files.  Export this directory via NFS.  The export must be read-write.
  3. Setup the clients to automatically mount the NFS export.  Check out the NFS info on the LTSPFatClient page for info on how to NFS mount using /etc/nfsmounts.sh
  4. Create a scripted called ‘kiax’ in /opt/ltsp/i386/usr/share/ltsp/screen based on the following.  You may need to modify CONFIG_DIR and the path to kiax based on  your setup:

#!/bin/sh
# SCREEN script to launch Kiax softphone on LTSP terminal
# (C) 2009 Andrew Bythell <abythell@ieee.org>
#
# Script adapted from the rdesktop script

# specify an NFS mounted directory in which to store kiax config files
CONFIG_DIR=”/opt/kiax/config”

PATH=/bin:$PATH; export PATH
. /usr/share/ltsp/screen-x-common
HOSTNAME=`hostname`
HOME=”$CONFIG_DIR/$HOSTNAME”; export HOME
if [ ! -e "$HOME" ]; then
mkdir “$HOME”
fi
while :; do
/usr/bin/xinit      /opt/kiax/kiax \
– \
${DISP}                     \
vt${TTY}
done

  1. Add “SCREEN_XX = kiax” to lts.conf to start Kiax on the client.
  2. Reboot client and test.  The first time a client runs Kiax, the IAX account information must be entered.

To Do:

  1. Add a small window manager
  2. Add a mixer application
  3. Add a nice background or logo

Comments are closed.