<div dir="ltr">On Mon, Aug 25, 2008 at 4:05 PM, Al Baker <span dir="ltr"><<a href="mailto:bwentdg@pipeline.com">bwentdg@pipeline.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
J.M. wrote:<br>
</div><div class="Ih2E3d">> On Thursday 21 August 2008 10:08:53 J.M. wrote:<br>
</div>> > I am running Asterisk <a href="http://1.4.21.2" target="_blank">1.4.21.2</a> <<a href="http://1.4.21.2" target="_blank">http://1.4.21.2</a>> with Realtime.<br>
<div>> I have a phone setup in the<br>
> > database and when I connect that phone to Asterisk there are<br>
> suddenly an<br>
> > endless number of "SELECT * FROM sip WHERE name = '1001' AND host =<br>
> > 'dynamic'" queries being run. The only way to stop the flood of<br>
> queries<br>
> > coming from Asterisk to restart the Asterisk process. Even<br>
> disconnecting<br>
> > the phone doesn't stop Asterisk from running the queries.<br>
> ><br>
> > Has anyone seen this before? Why would Asterisk do that and<br>
> does anyone<br>
> > know the fix? <br></div></blockquote><div>[...] <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">
><br>
> Another way, which has worked so far for me, is to set the "qualify"<br>
> field in the "sip" table (or whatever you called the table that<br>
> corresponds to the sip.conf file) to "no". I found this out from<br>
> reading the following URL:<br>
> <a href="http://www.asteriskguru.com/tutorials/peer_is_now_unreachable.html" target="_blank">http://www.asteriskguru.com/tutorials/peer_is_now_unreachable.html</a><br>
><br></div>Ok, but WHY is he getting an "ENDLESS" # of selects.<br>
Sure * needs to get the data, but unless he had an ENDLESS series of<br>
CALLS to/from that phone<br>
should * be making all those queries ??<br>
<br>
and<br>
HOW is this going to scale up ?<br>
</blockquote><div><br>Those are very good questions and I do not have the answers. This page: <a href="http://www.voip-info.org/wiki-Asterisk+config+sip.conf">http://www.voip-info.org/wiki-Asterisk+config+sip.conf</a> says that "qualify" should default to "no". It may be possible that if the "qualify" field in the database is left blank or NULL then Realtime assumes it to be a 0. Which would make Asterisk check the client every 0 milliseconds.<br>
<br>However, my "qualify" field was set to "yes". I have also reproduced the problem, albeit on the same machine, by setting the "qualify" field to "yes".<br><br>jm<br><br><br><br>
</div></div><br></div>