[Asterisk-Users] Re: qualify and NAT....

Brian McCrary bmccrary at lwav.net
Mon Mar 14 14:07:29 MST 2005


Eric Wieling wrote:

> Qualify will make Asterisk send an OPTIONS packet.  This allows 
> Asterisk to see latency of the response to the OPTIONS packet (this 
> does NOT test ICMP latency like ping does).  This gives Asterisk a 
> GENERAL idea of how lagged the device is.
> 
> Since Qualify sends packets every once in a while (every 2 seconds?) 
> it will also cause the dynamic port forwarding of your NAT router to 
> keep the UDP translation active.  You could set the registration 
> interval for your SIP device to some really low number like 60 seconds 
> and that will accomplish the same thing as the qualify=yes option.

Ok, I think I see what is going on from that standpoint, basically all
qualify does is send the OPTIONS packet to keep the NAT up and running
between the ATA and the NAT router.

> Remember clients send packets from a random high port number which 
> changes.  Port forwarding on your router is pretty useless.  nat=yes 
> combined with qualify=yes should cause enough traffic on the right 
> ports to keep the NAT translations open on your NAT router.

In theory, it sounds as if should work pretty easily, since there is a
connection already established between the ATA and Asterisk.  One big
think I forgot to mention is my NAT device is a MC3810 with a PRI
attached to it, so it already is running it's own SIP user agent.  So,
when the ATA gets a call, Asterisk forwards it to the MC3810 (since it's
IP registered with the ATA through NAT.)  Since the MC3810 doesn't know
about the ATAs it just returns "404 Not Found", and that's the end of
it.

So, I'm guessing, perhaps having a SIP user agent running on the NAT
router itself could be causing some of the problem?  It's frustrating to
see Asterisk talking to the phone with OPTIONS packets, but then not be
able to send a call to it, seems like I must be close.

> Now, if ASTERISK is behind NAT it's a whole other set of issues and 
> fixes, but you don't mention that so I won't cover it.

Nope, the Asterisk server itself isn't, it has a direct path to the
MC3810, but then the ATAs are behind it.

Brian



More information about the asterisk-users mailing list