In an earlier thread Andrew Kohlsmith enlightened me on the use of qualify in sip.conf to deal with a peer that is down. Since then I have been searching for information on how the behavior of qualify can be tuned. The wiki is vague on this; " Syntax: qualify=xxx|no|yes 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. " So; qualify=1000|yes means query for SIP OPTIONS, then take then unregister the peer if no response in 1000ms. But, how do you set/determine the frequency at which a peer is queried? Does this go on indefinitely after a peer fails to respond to make sure the peer is re-registered when available again? Can the interval be set on a per peer basis? Any documentation on this that you can point me to? Thx!
On 1/27/06, Damon Estep <damon@suburbanbroadband.net> wrote:> In an earlier thread Andrew Kohlsmith enlightened me on the use of > qualify in sip.conf to deal with a peer that is down. > > Since then I have been searching for information on how the behavior of > qualify can be tuned. > > The wiki is vague on this; > > " Syntax: > > qualify=xxx|no|yes > > 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. " > > So; > qualify=1000|yes > means query for SIP OPTIONS, then take then unregister the peer if no > response in 1000ms. > > But, how do you set/determine the frequency at which a peer is queried? > Does this go on indefinitely after a peer fails to respond to make sure > the peer is re-registered when available again? Can the interval be set > on a per peer basis? > > Any documentation on this that you can point me to?It should actually be qualify=1000 if you'd like for the peer to be made unavailable when we don't get a response to SIP OPTIONs within 1000ms (1 second). If the host is reachable, the next SIP OPTION attempt will not come until 60 seconds later. If the host isn't reachable, it will proceed to schedule SIP OPTION attempts every 10 seconds. These are defined constants in chan_sip.c -- Bird's The Word Technologies, Inc. http://www.btwtech.com/
> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] On Behalf Of BJ Weschke > Sent: Friday, January 27, 2006 6:18 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [Asterisk-Users] sip qualify=yes interval > > On 1/27/06, Damon Estep <damon@suburbanbroadband.net> wrote: > > In an earlier thread Andrew Kohlsmith enlightened me on the use of > > qualify in sip.conf to deal with a peer that is down. > > > > Since then I have been searching for information on how the behaviorof> > qualify can be tuned. > > > > The wiki is vague on this; > > > > " Syntax: > > > > qualify=xxx|no|yes > > > > where XXX is the number of milliseconds used. If yes the defaulttimeout> > is used, 2 seconds. > > > > If you turn on qualify in the configuration of a SIP device insip.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. " > > > > So; > > qualify=1000|yes > > means query for SIP OPTIONS, then take then unregister the peer ifno> > response in 1000ms. > > > > But, how do you set/determine the frequency at which a peer isqueried?> > Does this go on indefinitely after a peer fails to respond to makesure> > the peer is re-registered when available again? Can the interval beset> > on a per peer basis? > > > > Any documentation on this that you can point me to? > > It should actually be qualify=1000 if you'd like for the peer to be > made unavailable when we don't get a response to SIP OPTIONs within > 1000ms (1 second).Figured that out, thanks.> > If the host is reachable, the next SIP OPTION attempt will not come > until 60 seconds later. If the host isn't reachable, it will proceed > to schedule SIP OPTION attempts every 10 seconds. > > These are defined constants in chan_sip.cSeems silly to make these constant, I can think of many situations where you might want to change them (heavily loaded system, many, many peers), but I assume the sip options exchange is only a few packets... easy enough to change the constants in chan_sip.c I suppose.>Thanks for the info!
> So; > qualify=1000|yes > means query for SIP OPTIONS, then take then unregister the peer if no > response in 1000ms. > > But, how do you set/determine the frequency at which a peer is queried? > Does this go on indefinitely after a peer fails to respond to make sure > the peer is re-registered when available again? Can the interval be set > on a per peer basis?There are no hard and fast rules in terms of what value is used. It all depends 100% on the "reliability" of your sip connections, and what might be good for me may not even come close to addressing your needs. In other words, the more reliable your sip connections are (end-to-end), the greater the value can be. I've got multiple remote sip phones where reliability is "usually" not an issue, and setting qualify=10000 (ten seconds) is fine. The trade-off is the lower the value, the more sip traffic generated. If your asterisk box is behind a low speed dsl connection or on a broadband connection that gets charged for usage exceeding a certain traffic volume limit, you might want to use a larger qualify value. If bandwidth is not an issue and reliability is a major issue, then use a low value. It is sort of like setting rx and tx gains on analog pstn cards; there is no such thing as a standard value that works for everyone.