[Asterisk-Users] Strange SIP behavior w/NAT Keepalive

Olle E. Johansson oej at edvina.net
Sun Apr 11 02:50:53 MST 2004


Steven Kokinos wrote:
> Hello- 
>   
> I have several Sipura SPA-2000's at different locations (all behind Linksys WRT54G boxes). When setting: 
>   
> nat=yes 
> qualify=yes 
>   
> Things work properly about 90% of the time, however, if a remote end loses the connection briefly, then asterisk can't see the adapter until the next registration attempt. Outbound calls will still function, but inbound obviously won't since asterisk can't see the remote client anymore. 
>   
> The better way (in my book anyway) is to enable keepalive on the remote end, so that it can keep the hole open in the NAT. However, if I enable this with the Sipura using the NOTIFY method, I get the following error: 
>   
> Apr 10 23:24:25 NOTICE[1116941120]: chan_sip.c:5648 handle_request: Unknown SIP command 'NOTIFY' from 'xx.xxx.xx.143' 
Well, this is just a debug message, nothing that really matters. You can happily use NOTIFY for keepalive.

A better choice would be OPTIONS that everyone else seems to use.
REGISTER starts a lot of checking within Asterisk, so that loads the system a tiny bit more than
NOTIFY...

Remember that all of these packets you send are workarounds to keep NAT's alive. It's not really
part of the protocol. Some devices send empty packets with just a few linefeeds, some send
OPTIONS... Life with NAT's.


/O



More information about the asterisk-users mailing list