Asterisk sip qualify
SIP.conf: device configuration - qualifySyntax:
where XXX is the number of milliseconds used. If yes the default timeout is used, 2 seconds.
If you turn on qualify in the configuration of a SIP device in sip.conf, Asterisk will send a SIP OPTIONS command regularly to check that the device is still online. If the device does not answer within the configured (or default) period (in ms) Asterisk considers the device off-line for future calls. This status can be checked by the SIPPEER function, and inversely this function will only provide status information for peers which have qualify=yes.
This feature may also be used to keep a UDP session open to a device that is located behind a network address translator (NAT). By sending the OPTIONS request, the UDP port binding in the NAT (on the outside address of the NAT/firewall device) is maintained by sending traffic through it. If the binding were to expire, there would be no way for Asterisk to initiate a call to the SIP device. This can be used in conjunction with the nat=yes setting.
By default chan_sip.c sends the qualify every 60 seconds. At least in 1.6.0 you can change this value with qualifyfreq. The value in qualfiy = represents the timeout after a packet is sent before we consider the peer to be unreachable. If the packet is not responded within 1 second, asterisk will keep trying until 7 packets have failed. At this point, asterisk won't try again until the next 60 cycle period completes. If a packet is lost, which can easily happen with UDP, there are 7 more packets which are transmitted. Additionally asterisk will keep trying every 60 seconds. So even if all 7 packets are lost, asterisk tries again at the next 60 second cycle. The number of retransmits and time between each qualify is defined in chan_sip.c,
2008-08-27 - In v1.4 (SVN only) "qualify=yes" is ignored if the peer is realtime and caching is not turned on. See http://bugs.digium.com/view.php?id=13383.
- Asterisk sip nat: The NAT option for SIP devices in sip.conf
- Asterisk sip channels
- Asterisk config sip.conf
- Asterisk iax qualify
- NAT and VOIP
qualifyfreq for 1.4Attached you'll find a backports to 1.4 of qualifyfreq
Patch against 1.4.26 (patch by albert _at_ mediacaster.nl) - qualifyfreq5.backport-1.4.patch :
Patch against 126.96.36.199 (patch by TSM) - qualifyfreq.backport-188.8.131.52.patch
Business SIP Providers
|Provider||Plan Details||Monthly Rate *|
8x8 IP Trunking
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+