This tutorial is intended to help people setup the Red5Plugin in Openfire on a generic Linux install. (FYI, I have dont my setup on a SUSE Linux Enterprise Server 10 system, but it should work on all Linux machines.)
Just so you know I'm quite new to Openfire and the red5plugin so I had trouble setting it up, and I put this up to help people also having trouble.
Getting Java 1.6
Its possible that Red5Plugin will work with an earlier version of Java, but you really should have 1.6 installed, because you may end up having to compile from source, in which case you need 1.6.
If you already have 1.6 skip this part. (If you are not sure, try running "which java" or "java -version")
Download the Java 1.6 JDK
Goto...
http://java.sun.com/javase/downloads/index.jsp
The version you want is Java 6 update 6.
Open a terminal and navigate to the downloaded file
You may need to change the permissions to run the file...
chmod +x jdk-6-linux-i586.bin
This binary should automatically install and take care of everything.
When it's done try running "java -version" and it should report running version 1.6
Getting OpenFire
If you don't already have OpenFire installed on your system its a VERY simple install. Download the tar.gz from...
http://www.igniterealtime.org/downloads/download-landing.jsp?file=openfire/openf ire_3_5_1.tar.gz
Open a terminal and navigate to the downloaded file. Extract the file to an appropriate directory (e.g., /opt/openfire)
tar xfz openfire_3_5_1.tar.gz
mv openfire /opt/openfire
Thats it! OpenFire is installed! Now to start it you just need to run the command...
/opt/openfire/bin/openfire start
(to stop it: /opt/openfire/bin/openfire stop)
Getting Red5Plugin
You may have heard of Red5 before and might know that it is an open source flash media server. The Red5 people (http://osflash.org/red5) are doing some really awesome stuff, but there is no need to download the Red5 server and set it up. A stripped-down version of the Red5 server lives inside of the Openfire Red5 plugin!
To get the Red5Plugin download... This is the most updated version. It should be 0.0.18
Do NOT goto the Beta Plugins page... As of 05/05/08 these were way out of date.
http://www.igniterealtime.org/projects/openfire/plugins-beta.jsp
Open a terminal and goto the downloaded file... Now just move the file to the /opt/openfire/plugins/ folder.
mv red5.war /opt/openfire/plugins/
Openfire will magically setup everything for you
Or rather it almost will. You will need to restart before you can do Red5 stuff. Wait a few minutes and then run...
/opt/openfire/bin/openfire stop
/opt/openfire/bin/openfire start
Setup Red5Plugin
Goto the red5 admin page...
(If you are doing this on your local machine then...
Click on the "Server" tab. Now click on the "Server settings" tab. On the left menu select "HTTP Bindings." Be sure it is set as "Enabled". Take note of the bind port (its probably 7070).
Click on the Plugins tab. There should be a "Red5" plugin installed.
If there is then goto http://IP_ADDRESS:7070/red5/
A "Red5 Test" page should pop up. Hooray you have successfully installed Red5Plugin!
If its not there, something's messed up. Try running...
/opt/openfire/bin/openfire stop
/opt/openfire/bin/openfire start
also check that you have the...
/opt/openfire/plugins/red5.war
file on your system AND...
/opt/openfire/plugins/red5
directory. It is automatically created when you put the .war file in that directory.
Setup Red5Phone
If you want to use the Red5Phone things probably wont work right yet. You need to setup the codecs which will process the audio for the phone.
Basically what we want to do it compile the asao2law codec from source and set permission to allow it to execute.
To do this we...
(everything before the # is a terminal command. After it is text explaining what it does)
cd /opt/openfire/plugins/red5/codecs/src/ # goto codec source directory
rm *.o # remove old object files
rm asao2ulaw # remove old executable
make # run make file
This should produce a new "asao2ulaw" file.
cp asao2ulaw .. # copy it up a directory
chmod 755 asaol2ulaw # set permissions on this file to make it executable
Using Red5Phone
On the red5test page (default at http://IP_ADDRESS:7070/red5/) enter the your SIP proxy information.
Username
Password
Realm (if you haven't heard of this before, then do some googlin' but if you use asterisk then it should just be "asterisk")
Server (the IP address of your server)
Note that at the time of this writing (v0.0.18) there MAY be a crazy bug in the SIP application in Red5Plugin or in the SIP stack library it uses (MjSIP). This bug makes it so that the password for your username HAS to be blank of else things wont work.
More
If you don't know what I mean when I say provide your SIP proxy information. I just mean the Asterisk (or other SIP compatible) server that you have a registered user on. If you dont know what THAT means, then you may be in trouble. Start googlin' Asterisk and voip-info.org!
Todo - Compiling in Linux
Theres a bit more stuff involved in being able to compile this plugin from source on linux. Hopefully ill be able to add some info soon.
Thanks to Dele Olajide for making this great plugin!!!
Goodluck,
-Chris