[Asterisk-Users] Using frequent keepalives to eliminate need for NAT port forwarding?

Tim Panton tim at mexuar.com
Tue May 2 03:18:32 MST 2006


On 2 May 2006, at 01:25, Tom Engleward wrote:

> I have an asterisk system behind NAT, and need to
> connect to public PSTN originators via SIP or IAX2,
> but don't have the option of forwarding any ports
> (4569, 5060, etc) to the asterisk system. However, the
> NAT system does properly establish transient UDP
> forwarding on the basis of outgoing connections, so is
> it possible to configure asterisk to send frequent
> keepalive UDP packets (say every 30 seconds) from
> ports 4569 and 5060 to the PSTN originators in order
> to keep the NAT system's transient forwarding in
> effect, so that when the PSTN originator receives
> inbound calls and attempts to contact my asterisk
> system, the NAT system won't drop the packets?

Yes. That is the way that IAX2 likes to work.
However, not all providers will allow it, some require a fixed IPaddress
and port for them to send calls to.

My home Asterisk is behind a NAT router and is set up like that.

add something like this to iax.conf:

register => username:password at iax2.provider.net


By the way, In case anyone is interested, I've got an NSLU2 running
asterisk 1.0.10 quite nicely. No fan, no moving parts, less that £100  
total
outlay.

Tim.





More information about the asterisk-users mailing list