Tom Engleward
2006-May-01 17:25 UTC
[Asterisk-Users] Using frequent keepalives to eliminate need for NAT port forwarding?
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? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Tim Panton
2006-May-02 03:18 UTC
[Asterisk-Users] Using frequent keepalives to eliminate need for NAT port forwarding?
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@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.