Karaka™: Skype/XMPP Gateway

Here are some basic installation instructions for installing Karaka on a cluster comprising one Master node and one Slave node. You should be confident installing and maintaining both Linux and an XMPP server before attempting this install. Karaka was developed using Debian 4.0 Linux and the OpenFire XMPP server so instructions below use package names and other parameters relevant to those environments.

Master Node

Install the following packages: python2.4, python-crypto, python-json, python-simplejson, python-pyasn1, python-mysqldb, screen.

XMPP Server Configuration

Install the XMPP Server of your choice and create the following accounts:

API Configuration

Karaka manages user credentials through a set of API functions specialised per-deployment and abstracted into $TRUNK/karaka/api/api.py. The basic distribution comes with an example that stores plaintext credentials in a MySQL database. The code contains a commented example using the KeyCzar library to store encrypted credentials instead. If using the MySQL default, copy the example $TRUNK/conf/karaka-api.conf to /etc/karaka-api.conf and edit as appropriate:

  [default]
  ;; A message which will be prefixed to all mood messages.
  mood=XMPP rocks!
  [mysql]
  server=localhost
  database=karaka
  user=karaka
  password=karaka

Master Configuration

Copy the example $TRUNK/conf/karaka-master.conf to /etc/karaka-master.conf and edit as appropriate:

  [master]
  ;; Components to use for Karaka Master
  component=skype.example.com
  muc=skypemuc.example.com
  ;; Component secret
  secret=mypassword
  ;; Component port
  port=5275
  ;; XMPP server address
  server=master.example.com
  ;; Domain managed by the XMPP server
  domain=example.com
  ;; Account used by bundles to connect to the XMPP server
  dialback=dialback
  dialback_secret=anotherpassword
  ;; A secret known to all slaves to authenticate them to the master
  slave_secret=asharedsecret

Copy the $TRUNK/bin/karaka-master init.d script into place and invoke it to start the master.

Slave Node

Install the following packages: python2.4, python-crypto, python-json, python-simplejson, python-pyasn1, xvfb, xfonts-base, screen

Download Skype4Py 1.0.29.0, apply the $TRUNK/deps/Skype4Py-karaka.diff patch which fixes a couple of issues, and install Skype4Py.

Install Skype — we suggest skype-debian_2.0.0.72-1_i386.deb or above.

Slave Configuration

Copy the example karaka-slave.conf to /etc/karaka-slave.conf and edit as appropriate:

  [slave01]
  ;; XMPP secret for the client account
  secret=xmppaccountsecret
  ;; XMPP client port
  port=5222
  ;; XMPP server
  server=master.example.com
  ;; Domain of XMPP server
  domain=example.com
  ;; Domains used by Master
  component=skype.example.com
  muc=skypemuc.example.com
  ;; Shared slave secret
  slave_secret=asharedsecret
  ;; Capacity prepared to accept
  capacity=100
  ;; Base X server port to use
  base=100

Copy the karaka-slave init.d script into place and invoke it to start the slave, with an additional ‘slave01’ parameter to tell it which config section to read.

Karaka released!
Open-source XMPP-Skype gateway

19-Feb-09

Being Open in a Closed World
VoIP was supposed to be open and enable innovation. Did it?

14-Jan-09