Since this year March, I had been a heavy user of VoIP. I had been trying various options, asking other users on which service works best and so on. If not for VoIP, I would have been spending massive amount of money on Telephone to call home. One of the hard requrement was that it should run on GNU/Linux and should be Free (as in Freedom). But after trying out afew programs, I decided to relax that condition and decided to be a bit more pragmatic, but this requirement was always in the back of my mind. I had been mainly using Google Talk and occassionally Skype. I like the voice quality provided by Google Talk very much and the simplicity of their client program. The only bad part had been that it works only on Windows. I had to boot into Windows (which came pre-installed) on my laptop. Not anymore..
Google released the library called libjingle. I (together with my friend Anoop) was one of the first to try it out way back in 2006 if I remember – in vain. But last week I started looking into libjingle again. The inspiration came from this page and after afew late night hacking, it all works and this post will enable the reader equipped with a GNU/Linux machine to do it too. From now on, I am going (if time permits) to maintain a branch of libjingle and hope to release updated versions and also integrate it with a simple chat client. Those are for later.
0. Download the tarball. All the required changes to get libjingle to compile and work, is in this tarball.
1. Install SSL, ALSA libraries, Speex development files (i.e. libssl-dev, libasound2-dev, libspeex-dev). Needless to say, you need to have a working toochain setup. If not install gcc 4.x and its cousins.
2. libjingle 0.4.0 specifically depends on ortp 0.7.1. This will change in future, one of the things in my list is to make it work on the current latest version of ortp. ortp-0.7.1 is included in the above tarball. Do:
./configure && make && make install
This should install ortp libraries and header files into /usr/local.
3. Install iLBC libraries. Do:
$ cd msilbc-2.0.0
$ tar zxvf ilbc-rfc3951.tar.gz
$ cd ilbc-rfc3951
$ ./configure && make
$ sudo make install
iLBC is a royalty free codec, supposedly. But the version of code which is included in the above tarball is not really Free as in Freedom. One can use it only for non-commercial personal use. The specification are however, freely available, for anyone to implement a Free version. Any volunteers?
4. Go into libjingle-0.4.0 directory. Do:
./configure --with-speex=/usr --with-ilbc=/usr/local
After afew minutes of compilation, you will have the library and the programs in the example directories built.
5. Go to talk/examples/call. Run:
$./call
Alternatively, you can do a make install and just invoke call. call -d spits out some of the xmpp traces and debug information which was very valuable in debugging certain stuff.
It will ask you your JID. Give the full gmail ID (for eg: abcdef@gmail.com) and give the password. I think the rest of the things are self-explanatory. It has a very simple command system. Type roster to see who is online or away. Use ‘call’ to call someone. Once you are in a call, it gives you another set of commands to hangup or mute/unmute calls.
6. There are afew issues with the program and occassional crashes. We will fix them on the way.
7. Please report success, problems and fixes to my email ID.
8. I have started maintaining my own svn repository of this code with the aim of improving it a bit. Contributors are welcome. I will publish the repository when I have something to show. One of my goals with libjingle is to do remote amateur radio operation. i.e. Control, recieve and transmit the radio sitting at your house connected to a computer and a broadband connection from anywhere in the world. What has been accomplished is just a baby step.
Surprisingly, I found in the initial xmpp capability exchanges that the latest windows build of google chat client is not using speex. It uses a bunch of propreitary codecs which is not supported by the above code, so it switches to the PCM/U at 8kHz sampling rate. [Update: Looks like I was wrong. Speex seem to be well supported. Sorry for misinformation.]
A big thanks to Google to publish libjingle as free software. The libjingle documentation is also a great piece of work. It will be a shame if no one used it to the maximum.
7 Comments
thanks
will try it out
YEY! Libjingle is now GPLV2 kudos to Ashish too!
Its been a good guide , that helped me towards isntalling that on my suse machine. Thanks. Any IM client that exist that has both chat and voice cappability bundled for gtalk as of now. I still wonder no opensouce / existing IM client havent added support for gtalk voice using this libjingle.
it works!
Just found this, thanks so much!
I have been searching this for several times since libjingle was released. and, this is the only one let me talk with my friend who is using gtalk under windows.
Linux acer 2.6.24-17-generic #1 SMP Thu May 1 14:31:33 UTC 2008 i686 GNU/Linux
ubuntu hardy
beside the package you noticed in the passage
apt-get install libssl-dev libasound2-dev libspeex-dev
there is still something needed
apt-get install libglib2.0-dev libgtk2.0-dev libexpat1-dev
one thing I haven’t tested is to call from the example application. (it failed when i did this on my own box by calling to bkuyang_at_ekiga.net@gtalk2voip.com)
Great thanks!
Dear Ramakrishnan,
I tried the above steps on my Debian Etch 4.0 system. Installation went well. There was a little glitch. When I enter libjingle directory. I had to do “sudo make” and “sudo make install” for building and installing the library. simply doing “make” was giving me some error.
Also when I was running call program, it gave me following errors:
$ ./call
./call: error while loading shared libraries: libilbc.so.0: cannot open shared object file: No such file or directory
So I had to run “sudo ldconfig”. This fixed the problem.
My network is behind a proxy server and I need to give username and password before connecting to internet. I usually do it through HTTP_PROXY variable. Is there anyway I can pass these informations to the call program? I could not get it working. Please see following output:
———————————————————————
$ [Sat Jun 21|ghost@monster:call] ./call
JID: sw….ar@gmail.com
Password:
Logging in as sw….ar@gmail.com
Available commands:
roster Prints the online friends from your roster.
call Initiates a call to the friend with the given name.
quit Quits the application.
[Sat Jun 21|ghost@monster:call]$ roster
bash: roster: command not found
———————————————————-
Please help.
Regards,
Swagat
libjingle sounds interesting, I’ll take a look at it. What flavor of linux are you running it on?
it worked…….amazing
Post a Comment