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. ACE 5.4.2 http://www.cs.wustl.edu/~schmidt/ACE.html (Debian/Ubuntu package: libace5.4) boost 1.31.0 http://www.boost.org (Debian/Ubuntu package: libboost-dev) xerces-c 2.6 http://xml.apache.org/xerces-c/ (Debian/Ubuntu package: libxerces26-dev) log4cxx 0.9.7 - It is important to use this precise version for now http://logging.apache.org/log4cxx/ (Debian/Ubuntu package outdated) libsndfile 1.0.10 http://www.mega-nerd.com/libsndfile/ (Debian/Ubuntu package: libsndfile1-dev) libpcap 0.7.2 http://www.tcpdump.org/ (Debian/Ubuntu package: libpcap-dev). Only needed if you want to record VoIP calls portaudio v18 http://www.portaudio.com (Debian/Ubuntu package: libportaudio-dev). Only needed if you want to record from sound devices Build orkbasecxx on the command line: Go to the root directory of the orkbasecxx libtoolize automake -a make -f Makefile.cvs ./configure make make install Build orkaudio on the command line: Go to the root directory of the orkaudio libtoolize automake -a make -f Makefile.cvs ./configure make make install 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 This step is not needed when using the windows installer, the installer automatically installs winpcap. Download and install winpcap 3.1 (choose the windows installer version). This is a network packet capture library http://www.winpcap.org
Installing OrkAudio manually after a fresh win32 build Download the win32 installer from the oreka sourceforge project page Unzip and run the installer. This will set up the environment Build your modified version of OrkAudio, or OrkAudio plugin in release mode Copy the modified OrkAudio.dll, OrkBase.dll, VoIp.dll, SoundDevice.dll or Generator.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 Windows: To run on the windows command line, open a cmd box, navigate to the install directory and issue the following command: c:\Program Files\orkaudio> OrkAudio.exe debug To install as an NT service, issue the following command (not needed if OrkAudio was deployed using the windows installer): c:\Program Files\orkaudio> OrkAudio.exe install To run as an NT service, go start/run and enter services.msc pick the orkaudio service and start it To uninstall service, issue the following command: c:\Program Files\orkaudio> OrkAudio.exe uninstall Linux: To run attached to the tty, issue the following command: # orkaudio debug To run as a daemon, issue the following command: # orkaudio
File locations
Audio Output Files Audio output files those will be written to the [install directory]/AudioRecordings under windows and in /var/log/orkaudio under Linux. They are classified according to the following scheme: yyyy/MM/dd/hh Audio file themselves are named after the following scheme: yyyyMMdd_hhmmss_capturePort.extension
Configuration Files Configuration files are located in the install directory under Windows and in /etc/oreka under Linux. The files are: config.xml: this is the main OrkAudio configuration file. Plugins also read their configration parameters from subsections of this file. logging.properties: this is the log4j logging configuration file which allows for great flexibility in logging scope and output format.
Log Files Log files are located in the install directory under Windows and in /var/log/oreka under Linux. By default, Oreka produces the following output: orkaudio.log: this is the main OrkAudio logfile. tapelist.log: this logfile contains the details (metadata) for each recording that was performed by OrkAudio
Plugins Files Plugins exist as dll files under Windows and as DSO (Dynamic Shared Objects) with .so extensions under Linux. They are located in [install dir]/audiocaptureplugins under Windows and in /usr/lib under Linux. VoIp.dll - libvoip.so: VoIP recording plugin SoundDevice.dll - libsounddevice.so: Sound Card based recording Generator.dll - libgenerator.so: Audio generator for faking audio capture (useful when testing)
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