siproxd is already in the package repository, just install it on your WRT. I've configured my WRT to act as a transparent SIP proxy which works really fine so far (tested with Siemens SL75 WLAN and several softphones).
BTW: siproxd doesn't work out of the box yet, you still have to change a few configurations:
- in /etc/siproxd.conf change if_inbound from eth0 to br0, set if_outbound (if necessary) and change registration_file to /tmp/siproxd_registrations
- rename /etc/init.d/siproxd to S95siproxd so that it is automatically started. You also have to change a few lines here.By default siproxd runs as user nobody who doesn't have write permissions in /var/run. So it's best to create a /var/run/siproxd directory owned by nobody and use that to store the pid file:
Change $RUN_D to /var/run/siproxd and add a "chown nobody:nogroup $RUN_D" line just after "mkdir -p $RUN_D".
Patch for siproxd.init:
--- files/siproxd.init (revision 6280)
+++ files/siproxd.init (working copy)
@@ -2,13 +2,14 @@
BIN=siproxd
DEFAULT=/etc/default/$BIN
-RUN_D=/var/run
+RUN_D=/var/run/siproxd
PID_F=$RUN_D/$BIN.pid
[ -f $DEFAULT ] && . $DEFAULT
case $1 in
start)
mkdir -p $RUN_D
+ chown nobody:nogroup $RUN_D
$BIN $OPTIONS
;;
stop)
siproxd.conf patch: create siproxd/patches directory, add a new patch file (I named it 100-interface-and-registration-file.patch.gz) with the following patch (this one is uncompressed :-)
--- siproxd-0.5.11.orig/doc/siproxd.conf.example 2005-04-19 21:00:20.000000000 +0200
+++ siproxd-0.5.11/doc/siproxd.conf.example 2007-02-10 12:31:51.000000000 +0100
@@ -17,7 +17,7 @@
# or a hostname that resolves to that address (use a dyndns address for
# example).
#
-if_inbound = eth0
+if_inbound = br0
if_outbound = ppp0
# uncomment the following line ONLY IF YOU KNOW WHAT YOU ARE DOING!
# READ THE FAQ FIRST!
@@ -88,7 +88,7 @@
# Where to store the current registrations.
# An empty value means we do not save registrations. Make sure that
# the specified directory path does exist!
-registration_file = /var/lib/siproxd/siproxd_registrations
+registration_file = /tmp/siproxd_registrations
######################################################################
# Automatically save current registrations every 'n' seconds
And here's a patch to the Makefile so that siproxd is automatically started (not wise in general since the default outbound interface is set to ppp0 in the siproxd.conf file). Better leave the Makefile as is and rename /etc/init.d/siproxd to S95siproxd after you changed your siproxd.conf
--- Makefile (revision 6280)
+++ Makefile (working copy)
@@ -61,7 +61,7 @@
$(CP) $(PKG_INSTALL_DIR)/etc/siproxd.conf.example $(IDIR_SIPROXD)/etc/siproxd.conf
$(CP) $(PKG_INSTALL_DIR)/etc/siproxd_passwd.cfg $(IDIR_SIPROXD)/etc/
install -d -m0755 $(IDIR_SIPROXD)/etc/init.d
- install -m0755 files/siproxd.init $(IDIR_SIPROXD)/etc/init.d/siproxd
+ install -m0755 files/siproxd.init $(IDIR_SIPROXD)/etc/init.d/S95siproxd
install -d -m0755 $(IDIR_SIPROXD)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/siproxd $(IDIR_SIPROXD)/usr/sbin/
$(RSTRIP) $(IDIR_SIPROXD)
Configuring the WRT as a transparent proxy is easy, too. Just add the following lines to your /etc/firewall.user file
# transparently redirect SIP traffic to siproxd
iptables -t nat -A prerouting_rule -p udp -i $LAN --dport 5060 -j REDIRECT
# allow incoming SIP and RTP traffic
iptables -A input_rule -p udp -i $WAN --dport 5060 -j ACCEPT
iptables -A input_rule -p udp -i $WAN --dport 7070:7089 -j ACCEPT
HTH, Hias