OpenWrt Forum Archive

Topic: SIP conntrack and nat modules patches

The content of this topic has been archived on 9 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

The following patch will provide ip_conntrack_sip.o and ip_nat_sip.o modules as found in Linksys sources v3.17.4.

The buildroot-*-tainted.patch is needed to let busybox's insmod load modules using GPLONLY exported symbols from the kernel or other modules. Since the Linksys (CyberTan) sources for theese modules do not state any specific licenses, I assumed GPL v2 would apply and added MODULE_AUTHOR, MODULE_DESCRIPTION and MODULE_LICENSE headers to the modules.

Any happy SIP device users and WRT owners willing to test ?

IMPORTANT: you need to apply both patches or insmod won't load the ip_nat_sip.o module.

--
Nico

Hi Nico,

Can you please let me know how to apply these patches?

I have the latest cvs and pull various programs from the old archive. When I applied your patch, I got this,

Thanks,

----------------------------------
~/openwrt/04-11-04/buildroot$ patch <../src/buildroot-20041031-tainted.patch.txt 1-tainted.patch.txt
can't find file to patch at input line 4i ../src/buildroot-20041031-tainted.patch
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ruN buildroot/sources/openwrt/busybox/busybox.config buildroot-tainted/sources/openwrt/busybox/busybox.config
|--- buildroot/sources/openwrt/busybox/busybox.config   2004-09-20 03:40:52.000000000 +0200
|+++ buildroot-tainted/sources/openwrt/busybox/busybox.config   2004-11-02 20:30:58.000000000 +0100
--------------------------
File to patch:

Thanks Nico, the patches work like a charm (the hunk is due to a personal busybox.config):

coder@batman buildroot $ patch -p1 <../../mods/buildroot-20041031-tainted.patch.txt
patching file sources/openwrt/busybox/busybox.config
Hunk #1 succeeded at 290 (offset -1 lines).
coder@batman buildroot $ patch -p1 <../../mods/buildroot-20041031-
buildroot-20041031-nf_sip.patch.txt   buildroot-20041031-tainted.patch.txt
coder@batman buildroot $ patch -p1 <../../mods/buildroot-20041031-nf_sip.patch.txt
patching file sources/openwrt/kernel/linux.config
patching file sources/openwrt/kernel/patches/931-nf_sip.patch
coder@batman buildroot $

Those patches are cool big_smile

Hi Nico,

Can you please let me know how to apply these patches?

I have the latest cvs and pull various programs from the old archive. When I applied your patch, I got this,

Thanks,

----------------------------------
~/openwrt/04-11-04/buildroot$ patch <../src/buildroot-20041031-tainted.patch.txt 1-tainted.patch.txt
can't find file to patch at input line 4i ../src/buildroot-20041031-tainted.patch
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ruN buildroot/sources/openwrt/busybox/busybox.config buildroot-tainted/sources/openwrt/busybox/busybox.config
|--- buildroot/sources/openwrt/busybox/busybox.config   2004-09-20 03:40:52.000000000 +0200
|+++ buildroot-tainted/sources/openwrt/busybox/busybox.config   2004-11-02 20:30:58.000000000 +0100
--------------------------
File to patch:

`patch -p1`, not just `patch`.

Hi,

I've patched the CVS source with these patches ->

buildroot-20040830-ipsec-natt-patch.txt
buildroot-20041031-nf_sip.patch.txt
buildroot-20041031-tainted.patch.txt
buildroot-20041031-update.patch

And everything compiled correctly, updated my WRT54G with the new firmware, but the SIP modules didn't get to be included in my firmware automaticly.....
Or maybe i don't know where to look, and configure it.

What did i miss smile

Regards,

Dennis.

You need to update the linux.config or make a menuconfig, etc. The modules will be available inside the kmodules tar.

Ofcuz.. me stupid smile

Thanks

What does the SIP conntrack module do in detail? Can you maybe describe shortly?

I have the problem that my Asterisk server is behind the WRT54G router.
And Asterisk always sends out the internal NAT IP (192.168.1.x).

So I need some NAT module, which replaces inside the SIP message the internal IP with the ppp0 IP.

Can SIP conntrack module do that for me?

Blackvel

Yesterday I found some informations about this topic. Check out this document:
http://www.voip-info.org/wiki-Asterisk+ … +solutions

With the excellent package tracker of Nico I also found an ipkg package of a sip proxy: http://nthill.free.fr/openwrt/tracker/p … me=siproxd

You can find more infos about siproxd at their homepage:
http://siproxd.sourceforge.net/

Siproxd is a proxy/masquerading daemon for the SIP protocol. It handles registrations of SIP clients on a private IP network and performs rewriting of the SIP message bodies to make SIP connections work via an masquerading firewall (NAT).

It allows SIP software clients (like kphone, linphone) or SIP hardware clients (Voice over IP phones which are SIP-compatible, such as those from Cisco, Grandstream or Snom) to work behind an IP masquerading firewall or NAT router.

Please post your experiences.

Asterisk does not support STUN or SIP outgoing proxies.

The discussion might have continued from here.