[GUIDE]Record VoIp calls using your plug (inst script added)

Make a PKGBUILD? Submit it here for user review and possible placement into the repository.

[GUIDE]Record VoIp calls using your plug (inst script added)

Postby moonman » Thu Jun 09, 2011 3:05 pm

EDIT: I have created a script to install everything, except the DD-WRT configuration. Link is at the bottom of the post. I hope somebody will find it useful.

It took me a while to get everything to compile, whew. But it works. I tested it with magic jack connected to a completely different computer on the same subnet.

Requirements:
1. DD-WRT-enabled router
2. Installed Build essentials
[Install with pacman -S kernel26-headers file base-devel abs]

The idea:
The idea is to have orkaudio, the pocket sniffer, record VoIp calls. Since most networks nowadays don't have hubs (if you don't know the difference hub vs switch, google it), it's required to have DD-WRT router to copy the traffic to our sniffer (OpenWRT, Tomato etc. may work, but I haven't tested them)

orkaudio lists the foollowing deps:
* log4cxx 0.9.7 - It is important to use this precise version for now
* ACE 5.4.2
* libpcap 0.7.2 (only needed if you want to do VoIP recording)
* boost 1.31.0
* xerces-c 2.6
* libsndfile 1.0.10
* portaudio v18 (only needed if you want to do sound device recording)


Installation:

=========LIBRARIES=============
--IN REPO---
$this->bbcode_second_pass_code('', 'pacman -Sy libpcap
pacman -Sy boost
pacman -Sy libsndfile')

--NOT IN REPO--

---log4cxx--
$this->bbcode_second_pass_code('', 'cd ~
wget http://archive.apache.org/dist/logging/log4cxx/log4cxx-0.9.7.tar.gz
tar xvzf log4cxx-0.9.7.tar.gz
cd log4cxx-0.9.7
chmod 777 autogen.sh
./autogen.sh
./configure --prefix=/usr')

Use nano to edit the file, or use WinSCP

in file : ~/log4cxx-0.9.7/src/socketoutputstream.cpp
add #include <cstring>
just below all the other include lines (line 20?)

in file: ~/log4cxx-0.9.7/src/stringtokenizer.cpp
add #include <string.h>
at line 18

in file ~/log4cxx-0.9.7/src/timezone.cpp
add #include <string.h>
at line 19

in file ~/log4cxx-0.9.7/src/xmlsocketappender.cpp
add #include <string.h>
at line 25

$this->bbcode_second_pass_code('', 'make
make install')

--ACE--
$this->bbcode_second_pass_code('', 'cd ~
wget http://download.dre.vanderbilt.edu/previous_versions/ACE-6.0.2.tar.gz
tar xvzf ACE-6.0.2.tar.gz
cd ACE_wrappers
mkdir build
cd build
../configure --disable-ssl --prefix=/usr
make
make install')

--xerces-c-2.8--
$this->bbcode_second_pass_code('', 'cd ~
wget http://apache.mirror.nexicom.net/xerces/c/2/sources/xerces-c-src_2_8_0.tar.gz
tar xvzf xerces-c-src_2_8_0.tar.gz
cd xerces-c-src_2_8_0/src/xercesc
export XERCESCROOT='~/xerces-c-src_2_8_0'
./runConfigure -p linux -c gcc -x g++ -P '/usr'
make
make install')

=========ORKAUDIO========
$this->bbcode_second_pass_code('', 'cd ~
mkdir oreka
cd oreka
wget http://sourceforge.net/projects/oreka/files/oreka/oreka-1.2/Source%20Code/oreka-1.2-675.tar.gz/download
mv download oreka.tar.gz
tar xvzf oreka.tar.gz

cd orkbasecxx
libtoolize --force
automake -a #<= you may have to run this command 2 times
automake -a #running it second time, just in case...
make -f Makefile.cvs
./configure --prefix=/usr
make
make install

cd ../orkaudio
libtoolize --force
automake -a #<= you may have to run this command 2 times
automake -a #running it second time, just in case...
make -f Makefile.cvs
./configure --prefix=/usr
make
make install')


========DD-WRT CONFIG=========
Put these 2 line in firewall script
This will copy all the driver that goes through the router, to our sniffer-plug. Router's have switches built-in, not hubs, remember? <sniffer ip> = your plug ip (setup static DHCP for your plug?)

iptables -A PREROUTING -t mangle -j ROUTE --gw <sniffer ip> --tee
iptables -A POSTROUTING -t mangle -j ROUTE --gw <sniffer ip> --tee

EDIT: To reduce load on the plug (orkaudio processees everything that comes to its LAN port), instead of the 2 lines above, add these 4. Now dd-wrt will only "copy" rtp and sip traffic to the plug, not all the traffic.

iptables -A PREROUTING -t mangle -m layer7 --l7proto rtp -j ROUTE --gw <sniffer ip> --tee
iptables -A POSTROUTING -t mangle -m layer7 --l7proto rtp -j ROUTE --gw <sniffer ip> --tee
iptables -A PREROUTING -t mangle -m layer7 --l7proto sip -j ROUTE --gw <sniffer ip> --tee
iptables -A POSTROUTING -t mangle -m layer7 --l7proto sip -j ROUTE --gw <sniffer ip> --tee


========RUNNING ORKAUDIO=========
orkaudio

config.xml is here => /etc/orkaudio/config.xml
records and logs =>/var/log/orkaudio/

To run at boot:
add "/usr/sbin/orkaudio" to /etc/rc.local



SIMPLE INSTALLATION USING SCRIPT
get it here: http://members.shaw.ca/shareme/instork.sh

OR

do
$this->bbcode_second_pass_code('', 'cd ~
wget http://members.shaw.ca/shareme/instork.sh
perl -pi -e 's/\r\n/\n/g' instork.sh #convert DOS to UNIX format (my hosting does UNIX->DOS) :(
chmod 777 instork.sh
./instork.sh')

and go for a coffee, it'll take a while. :)
The script does all the steps except the DD-WRT CONFIG.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: [GUIDE]Record VoIp calls using your plug (inst script ad

Postby moonman » Fri Dec 16, 2011 2:22 am

Hello Charlie,

Sorry for taking so long to reply, but I haven't checked this forum for a while.
To answer your question it really depends how many phone calls you will be recording at a time. Arch Linux ARM install is pretty slow as is and will probably not be able to handle more than 2-3 calls at a time. Linux/Winows x86 machine will be able to do more.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: [GUIDE]Record VoIp calls using your plug (inst script ad

Postby WarheadsSE » Fri Dec 16, 2011 1:35 pm

The v7h system would do a better job, since they don't have to emulate floating point.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: [GUIDE]Record VoIp calls using your plug (inst script ad

Postby moonman » Fri Dec 30, 2011 9:51 am

$this->bbcode_second_pass_quote('WarheadsSE', 'T')he v7h system would do a better job, since they don't have to emulate floating point.


Are there any plugs with v7h?
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: [GUIDE]Record VoIp calls using your plug (inst script ad

Postby WarheadsSE » Fri Dec 30, 2011 1:25 pm

Beagle, Panda, Trimslice
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: [GUIDE]Record VoIp calls using your plug (inst script ad

Postby moonman » Sat Dec 31, 2011 2:43 am

Well. Those are... boards, and are not readily available in the stores and quite expensive. One is almost better off with buying an atom. Pogoplug for example is like 40 bucks here in Canada.
But you are right at pointing out that they do exist. It's just that I was thinking about simpler (cheaper) devices.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am


Return to User-Submitted Packages

Who is online

Users browsing this forum: No registered users and 8 guests