UPDATE

Audio and video now works. I have also sent some patches to the Jitsi project in order to make the work of the port easier. I will update the port soon. As soon as everything is done, this page will be probably deleted.

Jitsi on FreeBSD

Jitsi is an open source VoIP and IM application. It supports several popular protocols (most notable SIP and XMPP), and offers encrypted chat (OTR) and encrypted voice and video calls (ZRTP). It is mostly written in Java (Swing for the GUI also) with some parts written in C because it uses a plethora of third-party libraries in order to be multiplatform (when Java fails, the third-party libraries come to the rescue).

The purpose of this page is to serve as a starting and coordination point for anyone that wants to help in the process of integrating Jitsi into FreeBSD. Throughout the years, the Jitsi mailing lists have received emails from several people who were trying to port Jitsi on FreeBSD with working audio/video calls, but as far as I know, at the moment we don't have such a thing.

Current State

Jitsi 2.2 (latest stable version) exists in the Ports tree under net-im/jitsi.

Current Problems

Unfortunately, the new version (2.2) that exists in the Ports tree, does not solve any of the existing problems. The current problems are:

Audio System

I think that this is the issue with the highest priority. If we fix the audio, probably we will be able to make encrypted voice calls - one of the most useful features.

Jitsi supports 3 audio systems:

On a Debian GNU/Linux system, Jitsi offers 2 audio systems: PortAudio and PulseAudio. On a Windows 7 system it also offers WASAPI (Windows only). In FreeBSD, I assume that it is possible to have both PortAudio and PulseAudio.

The reason that the number of features of Jitsi differs from one platform to another is that in the lib/native directory of the source of Jitsi, there are directories for every platform (i.e. freebsd, freebsd-64, linux, linux-64, mac, solaris, solaris-sparc, windows, windows-64). Every platform has a different number of libraries inside. For example, the freebsd directory has 5 libraries whereas the linux directory has 24 (including both the libjnportaudio.so and the libjnpulseaudio.so that are responsible for the available audio systems in Jitsi). If you are on a Debian GNU/Linux amd64 system running Jitsi from source, and you remove the libjnportaudio.so library from the linux-64 directory, you won't be able to have the PortAudio option in the available audio systems of Jitsi.

So there are 2 options (that I can see):

  1. Build a native libjnportaudio.so and a native libjnpulseaudio.so for FreeBSD
  2. Use the libjnportaudio.so and the libjnpulseaudio.so of Linux in FreeBSD utilizing the linuxulator

Building the libjnportaudio.so under FreeBSD

In order to build the libjnportaudio.so library, you have to download the source of libjitsi (https://jitsi.org/Projects/LibJitsi). Then, the procedure can be summarized in the following steps:

  1. Download the hotplug branch of PortAudio (check src/native/portaudio/README), patch it with the src/native/portaudio/portaudio-hotplug-os.patch, configure and make.

  2. Download the latest source of speex, configure and make.
  3. In the root directory of libjitsi (ls: lib, src, build.xml) invoke ant with the following parameters: ant -Dportaudio=/path/to/portaudio/source -Dspeex=/path/to/speex/source portaudio

If you follow the above procedure in an officially Jitsi supported platform (ex. Debian GNU/Linux i386), the chances are that you will end up with a libjnportaudio.so file under the lib/native/linux directory of libjitsi.

Building the libjnpulseaudio.so under FreeBSD

The procedure is a lot easier than in libjnportaudio.so. It basically needs three things:

  1. Install the /usr/ports/audio/pulseaudio port
  2. Some minor changes to the target pulseaudio of the src/native/build.xml in order to compile under FreeBSD

  3. Invoke the command ant pulseaudio inside the root directory of libjitsi

I have produced the libjnpulseaudio.so library but when I placed it under the directory lib/native/freebsd-64 of Jitsi I did not get PulseAudio in the drop down menu of Audio Systems. Probably it needs some changes in the Java files in order to detect it (TODO)?

Jitsi (last edited 2013-09-13 13:35:05 by TzanetosBalitsaris)