<div dir="ltr">On Mon, Aug 25, 2008 at 4:05 PM, Al Baker <span dir="ltr">&lt;<a href="mailto:bwentdg@pipeline.com">bwentdg@pipeline.com</a>&gt;</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">&gt; &nbsp; &nbsp; On Thursday 21 August 2008 10:08:53 J.M. wrote:<br>
</div>&gt; &nbsp; &nbsp; &gt; I am running Asterisk <a href="http://1.4.21.2" target="_blank">1.4.21.2</a> &lt;<a href="http://1.4.21.2" target="_blank">http://1.4.21.2</a>&gt; with Realtime.<br>
<div>&gt; &nbsp; &nbsp; &nbsp;I have a phone setup in the<br>
&gt; &nbsp; &nbsp; &gt; database and when I connect that phone to Asterisk there are<br>
&gt; &nbsp; &nbsp; suddenly an<br>
&gt; &nbsp; &nbsp; &gt; endless number of &quot;SELECT * FROM sip WHERE name = &#39;1001&#39; AND host =<br>
&gt; &nbsp; &nbsp; &gt; &#39;dynamic&#39;&quot; queries being run. &nbsp;The only way to stop the flood of<br>
&gt; &nbsp; &nbsp; queries<br>
&gt; &nbsp; &nbsp; &gt; coming from Asterisk to restart the Asterisk process. &nbsp;Even<br>
&gt; &nbsp; &nbsp; disconnecting<br>
&gt; &nbsp; &nbsp; &gt; the phone doesn&#39;t stop Asterisk from running the queries.<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; Has anyone seen this before? &nbsp;Why would Asterisk do that and<br>
&gt; &nbsp; &nbsp; does anyone<br>
&gt; &nbsp; &nbsp; &gt; 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">
&gt;<br>
&gt; Another way, which has worked so far for me, is to set the &quot;qualify&quot;<br>
&gt; field in the &quot;sip&quot; table (or whatever you called the table that<br>
&gt; corresponds to the sip.conf file) to &quot;no&quot;. &nbsp;I found this out from<br>
&gt; reading the following URL:<br>
&gt; <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>
&gt;<br></div>Ok, but WHY is he getting an &quot;ENDLESS&quot; # 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>
&nbsp;HOW is this going to scale up ?<br>
</blockquote><div><br>Those are very good questions and I do not have the answers.&nbsp; 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 &quot;qualify&quot; should default to &quot;no&quot;.&nbsp; It may be possible that if the &quot;qualify&quot; field in the database is left blank or NULL then Realtime assumes it to be a 0.&nbsp; Which would make Asterisk check the client every 0 milliseconds.<br>
<br>However, my &quot;qualify&quot; field was set to &quot;yes&quot;.&nbsp; I have also reproduced the problem, albeit on the same machine, by setting the &quot;qualify&quot; field to &quot;yes&quot;.<br><br>jm<br><br><br><br>
</div></div><br></div>