1 ================================================================================
3 Siplog -- A Simple SIP Logging Plugin for ulogd
5 (c) 2008 Martin Mares <mj@ucw.cz>
7 You can use and distribute this program under the terms of GPLv2.
9 ================================================================================
12 This program sits at a router over which a SIP box (tested with Linksys PAP2)
13 sends its packets. Whenever a phone call is attempted, it sends an e-mail to
14 a specified address with the status of the call. I use it for reporting of
15 lost calls when I am not at home. Besides that, it's a nice example of passive
18 Siplog is a plugin for the ulogd user-space packet logging daemon. You should
19 add the following items to /etc/ulogd.conf:
22 plugin="/usr/local/lib/ulogd/siplog.so"
25 file="/var/log/ulog/sip.log"
26 debuglog="/var/log/ulog/sip.debug"
27 mailto="where-to-send-reports@example.net"
29 Then it remains to configure iptables to pass the SIP packets to ulogd. Add the
30 following rules to the FORWARD chain:
32 -s $YOUR_SIP_GW -p udp --sport 5060 -j ULOG --ulog-prefix phone-out
33 -d $YOUR_SIP_GW -p udp --dport 5060 -j ULOG --ulog-prefix phone-in