Hey,<div><br><div>I haven't thoroughly read the whole of your reply- just a quick answer to your timers question-generally I think you're right. Those timers are property of UAC so you may need to look into the phone configurations.</div>
<div>I'd CISCO 79X0 phones and we wanted those to refresh their registrations at very short intervals of time as well as the INVITES timers was reduced too,...umm..I think that was for DNS-SRV based failovers. Though reducing the default timers from UAC heavily increased SIP traffic but we achieved the target by reducing the SIP timers in all phones.</div>
<div><br></div><div>So that was an example. </div><div><br></div><div>When you are using Asterisk as UAC to register onto another SIP server you can change the registration timeout and retry variables..and yes you can change these SIP timers in Asterisk sip.conf but thats not recommended.(see sip.conf.sample for details too)</div>
<div><br></div><div>PS: with a quick look at sip.conf.sample + <a href="http://voip-info.org">voip-info.org</a> sip.conf details + google you can find lot more information than what you've collected so far.</div><div>
<br></div><div>--</div><div>BR,</div><div>Sammy</div><div><br></div><div><div class="gmail_quote">On Wed, Nov 16, 2011 at 6:11 AM, Douglas Mortensen <span dir="ltr"><<a href="mailto:doug@impalanetworks.com">doug@impalanetworks.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">OK. Thanks everyone for the responses. If I can summarize, I think here’s what’s been discussed:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Asterisk becomes aware of SIP extensions/peers, as soon as they register.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Regarding how asterisk becomes aware of (or determines) that they are unavailable/unreachable, I believe I am hearing two possible scenarios:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p><p><u></u><span style="font-size:11.0pt;color:#1F497D"><span>1.<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-size:11.0pt;color:#1F497D">“The Interval of Registration”. So asterisk has a timeout value that it is expecting the phone to reregister within. If the phone does not reregister within the timeout period, then asterisk determines that the extension/peer is no longer available. A few questions I have on this are:<u></u><u></u></span></p>
<p style="margin-left:1.0in"><u></u><span style="font-size:11.0pt;color:#1F497D"><span>a.<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-size:11.0pt;color:#1F497D">Where does this “timeout” interval come from? Is it a configuration parameter that we configure asterisk with, or is it something that is dynamically determined, or is it something that the phone/peer actually dictates to asterisk?<u></u><u></u></span></p>
<p style="margin-left:1.0in"><u></u><span style="font-size:11.0pt;color:#1F497D"><span>b.<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-size:11.0pt;color:#1F497D">If it is an asterisk configuration parameter, where does it exist (how do I set it & confirm what it is currently set to)? It is a per-extension/peer setting, or is it global?<u></u><u></u></span></p>
<p style="margin-left:1.0in"><u></u><span style="font-size:11.0pt;color:#1F497D"><span>c.<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-size:11.0pt;color:#1F497D">Is there a command I can issue from the asterisk CLI to query it?<u></u><u></u></span></p>
<p><u></u><span style="font-size:11.0pt;color:#1F497D"><span>2.<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-size:11.0pt;color:#1F497D">“qualify=yes” can be configured for any given SIP peer in asterisk. This will send a SIP OPTIONS message/packet to the peer every 1 or 2 minutes (depending on the configuration) that probes the peer to confirm it is still online. The keepalives (SIP OPTIONS packets) are actually sent from asterisk to the SIP peer, correct? But then the SIP peer actually has to respond to each one with its own SIP packet, correct? With this scenario, asterisk will still utilize scenario 1 (reregistration) as a means of determining that the peer is available, but additionally will continue to monitor the peer constantly (every 1-2 seconds) via these keepalives? This way asterisk is able to have a much more rapid discovery of peers that become unavailable (because they are literally no longer reachable, as they’re no longer responding to the keepalives), correct? So my next questions are:<u></u><u></u></span></p>
<p style="margin-left:1.0in"><u></u><span style="font-size:11.0pt;color:#1F497D"><span>a.<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-size:11.0pt;color:#1F497D">Am I wrong with any of the above interpretations of the explanations you guys have given?<u></u><u></u></span></p>
<p style="margin-left:1.0in"><u></u><span style="font-size:11.0pt;color:#1F497D"><span>b.<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-size:11.0pt;color:#1F497D">Is the “no-reply” timer Sammy mentioned [(max time)x(max retries)] a parameter that can be set within asterisk? If so, what are the corresponding configuration parameters called? If not, what are the “max time” and “max retries” values?<u></u><u></u></span></p>
<p style="margin-left:1.0in"><u></u><span style="font-size:11.0pt;color:#1F497D"><span>c.<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-size:11.0pt;color:#1F497D">Is the SIP response the peer is supposed to give also an OPTIONS packet or something else?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Thanks a LOT! I really appreciate all of the input & insight you guys bring!<u></u><u></u></span></p>
<div class="im"><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">-<u></u><u></u></span></p><p class="MsoNormal">
<span style="font-size:11.0pt;color:#1F497D">Doug Mortensen<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Network Consultant<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Impala Networks<u></u><u></u></span></p>
</div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">P: 505.327.7300<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt"> Sammy Govind [mailto:<a href="mailto:govoiper@gmail.com" target="_blank">govoiper@gmail.com</a>] <br><b>Sent:</b> Monday, November 14, 2011 10:36 PM</span></p>
<div><div class="h5"><br><b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion<br><b>Subject:</b> Re: [asterisk-users] How do extensions "stay registered"<u></u><u></u></div></div><p></p></div><div>
<div class="h5"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Continuing eherr here, behind the OPTIONS messages(infact all SIP comm) you definitely to look into SIP timers which tell how many time to resend a packet if no response is received and for how long to wait before thinking that the SIP packet got lost(network disconnected or end-point lost)<u></u><u></u></p>
<div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">so, qualify=yes a peer means to send-keep alives and have the NAT mechanism stay active, as soon as the SIP keep-alive packets reach a no-reply (max time)x(max retries) Asterisk marks the peer as UNREACHABLE.<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">qualify=no wouldn't do all of the above.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">
Another interesting thing to know is that SIP end-points have registrations time-out and refresh Registration timers as well. So if everything is going well, SIP end-points refresh their registration after some defined time.<u></u><u></u></p>
</div><div><p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p><div><p class="MsoNormal">On Tue, Nov 15, 2011 at 3:35 AM, eherr <<a href="mailto:email.eherr9633@gmail.com" target="_blank">email.eherr9633@gmail.com</a>> wrote:<u></u><u></u></p>
<div><div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">I think the wrap up answer is the interval of registration compacted, if used, with the SIP OPTION packet.</span><u></u><u></u></p><p class="MsoNormal">
<span style="font-size:11.0pt;color:#1F497D"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">I like the SIP OPTION packet because we have scripts to monitor the status and lets us know when a phone is up or down.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">--E</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span><u></u><u></u></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt"> <a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a> [mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a>] <b>On Behalf Of </b>Carlos Alvarez<br>
<b>Sent:</b> Monday, November 14, 2011 5:30 PM</span><u></u><u></u></p><div><div><p class="MsoNormal"><br><b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion<br><b>Subject:</b> Re: [asterisk-users] How do extensions "stay registered"<u></u><u></u></p>
</div></div></div><div><div><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">I think the registration part was answered. The de-registration part is different. If the phone is gracefully taken off line it specifically de-registers. If it just can't be reached because it powers off or the router closes NAT, or whatever, then Asterisk won't know this until it times out.<u></u><u></u></p>
<div><p class="MsoNormal" style="margin-bottom:12.0pt"> <u></u><u></u></p><div><p class="MsoNormal">On Mon, Nov 14, 2011 at 3:19 PM, eherr <<a href="mailto:email.eherr9633@gmail.com" target="_blank">email.eherr9633@gmail.com</a>> wrote:<u></u><u></u></p>
<div><div><p class="MsoNormal"><span style="color:#1F497D">I think the question is more along the lines of how does asterisk know immediately when a sip phone becomes on line and when you unplug the phone from the network, how does asterisk essentially know immediately that it status is “UNKNOWN”</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><u></u><u></u></p><p class="MsoNormal"><span style="color:#1F497D">If I am not mistaken.</span><u></u><u></u></p><p class="MsoNormal"><span style="color:#1F497D"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1F497D">--E</span><u></u><u></u></p><p class="MsoNormal"><span style="color:#1F497D"> </span><u></u><u></u></p><div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt"> <a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a> [mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a>] <b>On Behalf Of </b>Danny Nicholas<br>
<b>Sent:</b> Monday, November 14, 2011 5:01 PM<br><b>To:</b> 'Asterisk Users Mailing List - Non-Commercial Discussion'<br><b>Subject:</b> Re: [asterisk-users] How do extensions "stay registered"</span><u></u><u></u></p>
</div></div><div><div><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal"><span style="color:#1F497D">“Extensions” do not register – peers do. A peer can register itself or be registered by Asterisk. In most cases the “extension” is equivalent to the “peer” (301 = 301) but it can be quite different (301 = sipuser1) or (301 = <a href="mailto:doug@impalanetworks.com" target="_blank">doug@impalanetworks.com</a>).</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><u></u><u></u></p><div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt"> <a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a> [mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a>] <b>On Behalf Of </b>Douglas Mortensen<br>
<b>Sent:</b> Monday, November 14, 2011 3:52 PM<br><b>To:</b> '<a href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.com</a>'<br><b>Subject:</b> [asterisk-users] How do extensions "stay registered"</span><u></u><u></u></p>
</div></div><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">I know this is probably a very basic question for many on this list. But in troubleshooting an issue, I wanted to take a step back & ask the question. In Asterisk (or maybe all SIP), how do extensions stay registered with the SIP server?<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Do the extensions simply register repeatedly as a means of telling asterisk “I’m still here”, or are there actual keepalive packets that are transmitted to actually keep a TCP session alive? My guess is the former.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">But am I oversimplifying it? Is there more to the process?<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">-<u></u><u></u></p><p class="MsoNormal"><span style="font-size:14.0pt">Doug Mortensen</span><u></u><u></u></p><p class="MsoNormal">Network Consultant<u></u><u></u></p><p class="MsoNormal"><b>Impala Networks Inc</b><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt">CCNA, MCSA, Security+, A+</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10.0pt">Linux+, Network+, Server+</span><u></u><u></u></p><p class="MsoNormal">
.<u></u><u></u></p><p class="MsoNormal"><span style="font-size:10.0pt"><a href="http://www.impalanetworks.com" target="_blank">www.impalanetworks.com</a></span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10.0pt">P: <a href="tel:%28505%29%20327-7300" target="_blank">(505) 327-7300</a></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt">F: <a href="tel:%28505%29%20327-7545" target="_blank">(505) 327-7545</a></span><u></u><u></u></p><p class="MsoNormal">.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p>
</div></div></div></div><p class="MsoNormal"><br>--<br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br> <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><u></u><u></u></p></div><p class="MsoNormal"><br><br clear="all"><u></u><u></u></p>
<div><p class="MsoNormal"> <u></u><u></u></p></div><p class="MsoNormal">-- <u></u><u></u></p><div><p class="MsoNormal">Carlos Alvarez<u></u><u></u></p></div><div><p class="MsoNormal">TelEvolve<u></u><u></u></p></div><div>
<p class="MsoNormal">602-889-3003<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><p class="MsoNormal"> <u></u><u></u></p></div></div></div></div></div><p class="MsoNormal"><br>--<br>_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>New to Asterisk? Join us for a live introductory webinar every Thurs:<br> <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><u></u><u></u></p>
</div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div></div><br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div></div>