Oreka
Introduction
What is Oreka ?
Modular and cross-platform system for recording and retrieval of audio streams. The project currently supports VoIP and sound device based capture.
The platform currently comprises of three services:
OrkAudio: the audio capture and storage daemon with pluggable capture modules currently comes with modules for VoIP and sound device recording. This service is written in C++.
OrkTrack: logs all activity from one or more orkaudio services to any mainstream database. This service is implemented as a J2EE servlet based application.
OrkWeb: Web based user interface for retrieval. This service is implemented as a J2EE servlet based application using the Tapestry web development framework.
.
License
This program is free software, distributed under the terms of the GNU General Public License. Please refer to the GNU GPL licence for more information.
Building
If you only want to run Oreka sofware, you can safely skip this section.
Building OrkAudio
Build under Linux
Prerequisites:
install these packages first using your linux distribution packaging system
or download sources tarballs from the listed websites.
log4cxx 0.9.7 - It is important to use this precise version for now
http://logging.apache.org/log4cxx/
ACE 5.4.2
http://www.cs.wustl.edu/~schmidt/ACE.html
libpcap 0.7.2
http://www.tcpdump.org/
boost 1.31.0
http://www.boost.org
xerces-c 2.6
http://xml.apache.org/xerces-c/
libsndfile 1.0.10
http://www.mega-nerd.com/libsndfile/
portaudio v18
http://www.portaudio.com
Build orkbasecxx on the command line:
Go to the root directory of the orkbasecxx
libtoolize --force
make -f Makefile.cvs
./configure
make
make install
Build orkaudio on the command line:
Go to the root directory of the orkaudio
libtoolize --force
make -f Makefile.cvs
./configure
make
For debug binaries: modify above as follows:
./configure --enable-debug=full
CXXFLAGS="-O0 -g3"
make -e
Build using Kdevelop:
Project/import existing project (libtool based c++ project)
Build under Windows
Build using MSVC6 (SP6)
Download the c++ win32 external library pack and unpack into c:\devExt (if you change this location, you need to change all references in the dsp files)
Load orkaudio\OrkAudio.dsw into MSVC
Select orkbase as active project, build
Select orkaudio as active project, build
Building OrkTrack and OrkWeb
Install required software
Install Java 5 JDK
Install Eclipse 3.1 or later
Building using Eclipse
Run Eclipse
/File/Switch workspace/ -> select folder containing this file
Set the compiler compliance for the worskspace to Java 5 (Java 1.5) /Window/preferences/ -> /java/compiler/
Import user libraries:
Get the external java dependencies pack from http://sourceforge.net/projects/oreka and unzip it into {WORKSPACE}/lib
Edit oreka.userlibraries, search and replace the absolute path to jar files with your own.
/Window/preferences/ -> /java/buidpath/user libraries/ -> import -> select your modified oreka.userlibraries file
/File/import existing project into workspace/ -> select 1. orkbasej, 2. orktrack 3. orkweb
/Window/open perspective/java
At this point, all three projects should compile automatically without an error
Installing
Installing Prerequisite Software for OrkAudio
Installing Linux Libraries
Please refer to list of required libraries
Installing Windows Libraries
Download and install winpcap 3.1 (choose the windows installer version). This is a network packet capture library http://www.winpcap.org
Installing OrkAudio from the win32 binary release
Download the win32 binary realease from the oreka sourceforge project page
Unzip the package in a folder of your choice.
If you want to run OrkAudio as a windows service:
Open a cmd box, navigate to the install directory
Issue the followig command: c:\oreka\orkaudio> OrkAudio.exe install
For uninstalling, do: c:\oreka\orkaudio> OrkAudio.exe uninstall
Installing OrkAudio from a fresh build
Follow the procedure in
Make sure you have compiled OrkAudio and OrkBase in release mode
Copy OrkAudio.dll and OrkBase.dll to your install folder, replacing old files
Installing Prerequisite Software for OrkTrack and OrkWeb
Install Java 5 JDK
Install Tomcat 5.5 or later, point it the the Java 5 JDK by setting the JAVA_HOME environment variable to the root of the JDK
Make note of the Tomcat admin password
Get the external java dependencies pakage from http://www.sourceforge.net/projects/oreka
Copy all jar files from the external java dependencies package to {TOMCAT_HOME}/shared/lib
Install MySQL or any database compatible with hibernate
Create a database for storing oreka data
Create a user/password for reading/writing the newly created database
Install Eclipse 3.1 or later
Installing OrkTrack
Create a folder for configuration and logging such as c:\oreka\orktrack
Copy orkbasej/java/log4j.template.properties to this folder and change according to needs
Copy orkbasej/java/mysql.hbm.template.xml to this folder and change according to needs
Copy orktrack/orktrack.config.xml to this folder and change according to needs
Modify orktrack/WEB-INF/web.xml and make it point to those newly created config files
Copy orktrack/deploy-template.xml to orktrack/deploy.xml and change deploy.xml according to your setup.
Run deploy.xml as ant script (Right click/Run as). This should result in the following message:
"[echo] OK - Deployed application at context path /orktrack"
Point your browser to your Tomcat manager (e.g. http://localhost:8080/manager/html) and check that orktrack has started, otherwise, check Tomcat logs
Installing OrkWeb
Create a folder for configuration and logging such as c:\oreka\orkweb
Copy orkbasej/java/log4j.template.properties to this folder and change according to needs
Copy orkbasej/java/mysql.hbm.template.xml to this folder and change according to needs
Modify orkweb/WEB-INF/web.xml and make it point to those newly created config files
Copy orktrack/deploy-template.xml to orktrack/deploy.xml and change deploy.xml according to your setup.
Run deploy.xml as ant script (Right click/Run as). This should result in the following message:
"[echo] OK - Deployed application at context path /orktrack"
Point your browser to your Tomcat manager (e.g. http://localhost:8080/manager/html) and check that orkweb has started, otherwise, check Tomcat logs
Point your browser to the newly deployed application (e.g. http://localhost:8080/orkweb/app)
Running
Running OrkAudio
To run on the command line, open a cmd box, navigate to the install directory and issue the following command: c:\oreka\orkaudio> OrkAudio.exe debug
To run as a service, issue the following command: c:\oreka\orkaudio> OrkAudio.exe install
To uninstall service, issue the following command: c:\oreka\orkaudio> OrkAudio.exe uninstall
Audio files will be written in the OrkAudio install directory in date/time based subfolders according to the following scheme: yyyy/MM/dd/hh. Audio files themselves are named after the following scheme: yyyyMMdd_hhmmss_capturePort.extension.
Configuring OrkAudio
Configuration of OrkAudio is performed by modifying the config.xml file.
Audio compression can be tuned using the StorageAudioFormat config parameter. A value of native turns off compression while values of gsm , ulaw (G.711 standard american telephony encoding) or alaw (G.711 standard european telephony encoding) can be used to enable compression.
The plugin to use for audio capture is selected using the CapturePluginPath and CapturePlugin configuration parameters. CapturePluginPath is relative to the install directory. CapturePlugin is the full plugin name including extension (e.g. .dll or .so)
Reporting to OrkTrack can be enabled by setting EnableReporting to true and by specifying the right TrackerHostname
Configuring the OrkAudio VoIP plugin
VoIP plugin specific configuration is found in the config.xml file under the "VoIpPlugin" tag. It is possible to configure the network device to monitor (i.e. when you have one device dedicated to sniffing). Also for OrkAudio to get voice session direction, remote and local party right, it is necessary to instruct the VoIP plugin how to identify which IP addresses are local telephones (hardphones or softphones) and which are not. To do this, it is possible to give a csv list of IP addresses that are reserved as Media Gateways, i.e. IP addresses that host such services as PBX, PSTN gateway, conferencing or such. Further, it is possible to specify a csv list of local LAN masks (only necessary when LAN masks are not the standard 192.168.x.x or 10.x.x.x or 172.31.x.x). The way the VoIP plugin decides wether an IP address is a local telelephone is as follows: 1. IP Address needs to be on LAN and 2. IP Address cannot be a Media Gateway.
Running OrkTrack and OrkWeb
Deploy the war files to Tomcat as described in and run Tomcat
Testing
Testing OrkAudio
Record a simple SIP session
Install OrkAudio on a windows computer that has a SIP softphone installed. Run it on the command line as described in and make a phone call to any number. The call should be logged to the screen with the right metadata. The associated GSM compressed audio file should be found in the OrkAudio install directory in date/time based subfolders as described in
Generate fake recordings
This involves using the Generator Plugin to create fake audio streams that OrkAudio will record and compress to disk.The CapturePlugin configuration parameter needs to be changed to generator.dll. An existing audio file can be used as the basis of the generated audio streams. This file is specified in the AudioFilename configuration parameter and needs to be a 16 bit samples, mono, 8KHz audio file.
Once configured, run OrkAudio, you should see the generated audio streams logged to the console. Audio files should also start appearing in subfolders as described in
Testing OrkWeb
Browse test data
Edit orkbasej/java/net/sf/oreka/test/FillDatabase.java and point it to your own hibernate config file created earlier
Run FillDatabase.java as a Java application. This will fill your oreka database with test data
Point your browser to orkweb as described above
Browse the test data