forked from voipmonitor/sniffer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Implement configuration file. See config/voipmonitor.org
- Implement generic init script. See config/init.d/voipmonitor (thanks Telephonic http://telephonic.ca for sponsoring this work) - Change core dump to unlimited
- Loading branch information
Martin Vit
committed
May 7, 2011
1 parent
7fbc3af
commit 6492fd8
Showing
25 changed files
with
7,195 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#!/bin/sh | ||
|
||
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin | ||
TERM="linux"; | ||
ARGS="-i eth0" | ||
PIDFILE=/var/run/voipmonitor.pid | ||
|
||
case "$1" in | ||
start) | ||
if [ -f $PIDFILE ]; then | ||
PID=`cat $PIDFILE` | ||
NAME=`ps -o comm= $PID` | ||
if [ "$NAME" == "voipmonitor" ]; then | ||
echo "Voipmonitor is already running" | ||
else | ||
rm $PIDFILE | ||
echo -n "Starting voipmonitor: " | ||
voipmonitor --pid-file /var/run/voipmonitor.pid $ARGS | ||
fi | ||
else | ||
echo -n "Starting voipmonitor: " | ||
voipmonitor --pid-file /var/run/voipmonitor.pid $ARGS | ||
fi | ||
;; | ||
stop) | ||
if [ -f $PIDFILE ]; then | ||
PID=`cat $PIDFILE` | ||
NAME=`ps -o comm= $PID` | ||
if [ "$NAME" == "voipmonitor" ]; then | ||
echo "Sending kill signal to voipmonitor" | ||
kill $PID | ||
else | ||
echo "voipmonitor is not running"; | ||
rm $PIDFILE | ||
fi | ||
else | ||
echo "voipmonitor is not running"; | ||
fi | ||
;; | ||
force-stop) | ||
if [ -f $PIDFILE ]; then | ||
PID=`cat $PIDFILE` | ||
NAME=`ps -o comm= $PID` | ||
if [ "$NAME" == "voipmonitor" ]; then | ||
echo "Sending kill signal to voipmonitor" | ||
kill -9 $PID | ||
else | ||
echo "voipmonitor is not running"; | ||
rm $PIDFILE | ||
fi | ||
else | ||
echo "voipmonitor is not running"; | ||
fi | ||
;; | ||
*) | ||
echo "Usage: /etc/init.d/voipmonitor {start|stop|force-stopn}" | ||
;; | ||
esac | ||
|
||
exit 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# | ||
# voipmonitor.org configuration file | ||
# | ||
# location of this file is at ~/.voipmonitor.conf or /etc/voipmonitor.conf | ||
# command line parameters overrides configuration directives in this file | ||
# allowed comments are ; or # | ||
# | ||
|
||
[general] | ||
|
||
#listening interface. Can be 'any' which will listen on all interfaces | ||
;interface = eth0 | ||
|
||
#if yes, voipmonitor will not save CDR to MySQL | ||
nocdr = yes | ||
|
||
#save SIP packets to pcap file | ||
;savesip = no | ||
|
||
# save RTP packets to pcap file | ||
;savertp = no | ||
|
||
# save extracted WAV file | ||
;savewav = no | ||
|
||
# save RAW packet data from RTP | ||
;saveraw = no | ||
|
||
# save graph data for web GUI. If you want to complress it, put here gzip | ||
;savegraph = plain | ||
|
||
# Pcap filter. If you want to sniff only UDP SIP, put here 'udp'. Warning: If you set protocol to 'udp' pcap discards VLAN packets. Maximum size is 2040 chars | ||
;filter = udp | ||
|
||
# directory where all files (pcap|wav|graph) are stored | ||
;spooldir = /var/spool/voipmonitor | ||
|
||
# put interface to promiscuouse mode so it can sniff packets which are not routed directly to us | ||
;promisc = yes | ||
|
||
# mysql server | ||
;myqslhost = localhosta | ||
|
||
# mysql database | ||
;mysqldb = voipmonitor | ||
|
||
# mysql table | ||
;mysqltable = cdr | ||
|
||
# mysql username | ||
;mysqlusername = root | ||
|
||
# mysql password | ||
;mysqlpassword = | ||
|
||
|
Oops, something went wrong.