🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: uk.telecom
Article #343

Re: Looking for a decent VOIP provider for a small business, 4 phones and 1 remote one

#343
From: Theo
Date: Tue, 03 Nov 2026 15:34
89 lines
5018 bytes
Postman Pat <at@the-post-office-not.com> wrote:
> Thank you :)
> 
> I enabled SIP ALG, so that is in addition to 5060 forwarding to the
> phone's internal LAN IP (which is also fixed in the phone config) and
> the phone rings OK now.
> 
> I still fail to see how SIP ALG *alone* can forward 5060 on incoming
> calls while allowing in only A&A IPs. This is a Draytek router without
> any remote or internal ("plug and play crap") config.

Roughly speaking, although it may differ from vendor to vendor (and may do
other stuff in addition):

1. Phone on LAN makes outgoing connection to SIP server port 5060, saying it
is available on RTP port range aaaa-bbbb.

2.  NAT rewrites the IP on the packet headers from phone's LAN IP to
public IP, creates an entry in the NAT table to remember the state of this
connection for its duration.  (this is what NAT does for every connection)

3.  SIP ALG rewrites the IP address inside the SIP connection to be the
public IP, not the LAN IP

4.  SIP ALG creates a temporary firewall rule to forward incoming RTP
traffic from the SIP server's source IP to the phone's LAN IP, based on the
ports described in the SIP connection

5.  Incoming audio: SIP server opens an RTP connection to the router in the
appropriate port range, using the same source IP as the initial SIP
connection.

6.  Using the temporary firewall rule, router forwards RTP traffic to the
phone's LAN IP

7. Phone receives and sends audio

8. <phone call happens>

9. Phone deregisters by closing SIP connection (perhaps it was turned off)

10. Server closes RTP connection

10. NAT drops NAT table entries for connections

11. SIP ALG deletes temporary firewall rule

Any point from 4 onwards if an attacker tries to connect, their source
IP will not match the source IP in the temporary firewall rule and
their connection will be blocked.  Before point 4 they would be blocked by
default.

A key issue here is the temporary firewall rule in step 4 only works if this
SIP server is talking to a single SIP endpoint on the LAN.  If you have
multiple SIP clients on the LAN then the firewall sees an incoming
connection and has no means to identify which SIP client it is for,
resulting in one way audio and/or no rings.  That problem is solved by IPv6,
but it's also solved by setting the RTP ports in each client to be
different.  That way the firewall knows that RTP to ports aaaa-bbbb goes to
client 1 and cccc-dddd goes to client 2, ie you end up with two temporary
firewall rules.

(a separate one-way calling issue is clients on mobiles going to sleep and
not being ready to receive the connection when a call is incoming, but
that's not relevant here)

> If I get any more hassle I will move the whole lot to Voipfone.
> Simpler and non-arrogant... I am with them at another location and
> have had zero downtime in 3 years (fibre + Grandstream VOIP).

I've had zero downtime with A&A VOIP in ~10 years...  aside from the
internet connection which they don't control.

TBH, given how much of a hack the above is and the weird stuff the router
vendor could be doing, which is impossible to packet-capture if it's also
your DSL modem in the same ISP-locked-down box, I'm not surprised they would
much rather you use IPv6 and have a limited time to debug IPv4 problems.

I think a lot of it would also be solved if you're running the SIP client on
the router, ie with a public IPv4, like most ISP boxes are running their own
VOIP.  Then you aren't putting it behind NAT and it all works sensibly.  So
a router with maybe a DECT base and an analogue socket avoids a lot of NAT
issues, ie VOIP is never going over the LAN.

That said, I've used A&A with Gigaset boxes behind numerous ISPs and it's
'just worked'; the most I've had to do is turn on the SIP ALG setting in the
ISP router.

Theo
Technical Details
Message-ID: <4Vx*a-NUA@news.chiark.greenend.org.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nntp-feed.chiark.greenend.org.uk!ewrotcd!.POSTED.chiark.greenend.org.uk!not-for-mail
References: <10jlj0m$k2q2$1@dont-email.me> <11bvfqc$3blop$1@dont-email.me> <favbrm-3p95.ln1@q957.zbmc.eu> <bUy*XisUA@news.chiark.greenend.org.uk> <11c2hjm$dlls$1@dont-email.me> <dUy*PxtUA@news.chiark.greenend.org.uk> <11cconk$3pu8v$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nntp-feed.chiark.greenend.org.uk!ewrotcd!.POSTED.chiark.greenend.org.uk!not-for-mail
From: Theo <theom+news@chiark.greenend.org.uk>
Newsgroups: uk.telecom
Subject: Re: Looking for a decent VOIP provider for a small business, 4 phones and 1 remote one
Date: 03 Nov 2026 15:34:24 +0000 (GMT)
Organization: University of Cambridge, England
Message-ID: <4Vx*a-NUA@news.chiark.greenend.org.uk>
References: <10jlj0m$k2q2$1@dont-email.me> <11bvfqc$3blop$1@dont-email.me> <favbrm-3p95.ln1@q957.zbmc.eu> <bUy*XisUA@news.chiark.greenend.org.uk> <11c2hjm$dlls$1@dont-email.me> <dUy*PxtUA@news.chiark.greenend.org.uk> <11cconk$3pu8v$1@dont-email.me>
Injection-Info: chiark.greenend.org.uk; posting-host="chiark.greenend.org.uk:93.93.131.173";
	logging-data="28355"; mail-complaints-to="abuse@chiark.greenend.org.uk"
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/5.10.0-44-amd64 (x86_64))
Originator: theom@chiark.greenend.org.uk ([93.93.131.173])