[OpenSIPS-Users] OpenSIPS ALG

John Morris john at zultron.com
Thu May 7 11:45:12 CEST 2009


After several days of playing with OpenSIPS 1.5.0 and RTPProxy 1.2.0, I
have a partially working SIP+RTP ALG configuration, and have gotten stuck.
 I could use some general advice from the list.

The company has an Asterisk/FreePBX server on an internal network, and the
CEO wants to use a SIP phone from outside.  Because the sip alg iptables
module isn't working, and in preparation for another project, I started
investigating OpenSIPS for use as a border proxy to connect phones across
NAT (and, the next project, to route a SIP trunk over a VPN from the
network of a DSL+phone company that intermittently blocks SIP traffic in
hopes of plugging revenue leaks).

The network looks like this:

SIP UA <-> home NAT gateway <-> Internet <-> OpenSIPS server/NAT router
<-> Asterisk

The standard opensips.cfg file doesn't work as is.  The SIP phone needs to
register to the Asterisk server directly.  In addition, it seems there is
extra logic needed to support multiple network interfaces (mhomed=1 only
partially solves the problem).

The way I've gone with this in testing is to relay REGISTERs to Asterisk,
but after a save("location","0x02") to enable a lookup("location") on
messages originating from the PBX.  The phone is configured with an
outbound proxy, and all packets to the proxy matching "uri==myself" are
thrown away.  This worked great on the single-interfaced, internal test
installation.  Now that there are multiple interfaces involved, things are
breaking again; ACKs and BYEs are sent out the wrong interface, and
RTPProxy is behaving strangely in bridged mode.

There seem to be no good configuration examples for either multi-homed
proxies or for proxies that relay REGISTERs.  This makes me think that I'm
going about this the wrong way.

Also, I have looked at other software, like siproxd, opensbc and uh, that
other b2bua that functions as an SBC, but none of those seem to allow this
REGISTER pass-through function.

What is the best approach for this scenario?  The above approach of
relaying REGISTERs to Asterisk?  Is there maybe another approach where
phones register to OpenSIPS directly, and OpenSIPS in turn somehow sends
another REGISTER to Asterisk?  Or am I missing the idea completely?

I'd appreciate general pointers about how to proceed.  I've been putting
some Asterisk and FreePBX tutorials and CentOS RPMs on
http://www.zultron.com, mostly aimed at small office-like environments.
Looking through various lists, this seems a highly sought-after
configuration.  If I succeed, I'll document it in hopes of filling the gap
in this sort of example.

Thanks

    John




More information about the Users mailing list