<br><br><div class="gmail_quote">On Fri, Apr 16, 2010 at 5:48 AM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Jock,<br>
<br>
ok, while investigating, I found a small harmless bug in the<br>
ds_next_xxxx() functions - they were trying to populate the ATTR avp<br>
even if it was not set - this was the reason for the err message you<br>
were getting.<br>
<br>
The bug was fixed, so if you update from SVN it should go away.<br>
<div class="im"><br></div></blockquote><div><br></div><div>That&#39;s great, Bogdan - however I&#39;m guessing this doesn&#39;t help the ds_select_domain()&#39;s inability to avoid marked entries.</div><div><br></div><div>
Any thoughts on that one? :/</div><div><br></div><div> - Jock</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
Jock McKechnie wrote:<br>
&gt;<br>
&gt;<br>
&gt; On Thu, Apr 15, 2010 at 8:41 AM, Bogdan-Andrei Iancu<br>
</div><div class="im">&gt; &lt;<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a> &lt;mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     Jock McKechnie wrote:<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt; On Tue, Apr 13, 2010 at 5:04 AM, Bogdan-Andrei Iancu<br>
&gt;     &gt; &lt;<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a> &lt;mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>&gt;<br>
</div><div><div></div><div class="h5">&gt;     &lt;mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a> &lt;mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>&gt;&gt;&gt;<br>
&gt;     wrote:<br>
&gt;     &gt;<br>
&gt;     &gt;     Hi Jock,<br>
&gt;     &gt;<br>
&gt;     &gt;     Jock McKechnie wrote:<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; On Mon, Apr 12, 2010 at 10:48 AM, Bogdan-Andrei Iancu<br>
&gt;     &gt;     &gt; &lt;<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a> &lt;mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>&gt;<br>
&gt;     &lt;mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a> &lt;mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>&gt;&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a><br>
&gt;     &lt;mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>&gt; &lt;mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a><br>
&gt;     &lt;mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>&gt;&gt;&gt;&gt;<br>
&gt;     &gt;     wrote:<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     Hi Jock,<br>
&gt;     &gt;     &gt;     &gt; I&#39;m wondering if the above error is some kind of AVP<br>
&gt;     &gt;     storage thing I<br>
&gt;     &gt;     &gt;     &gt; haven&#39;t set up that is causing it not to properly<br>
&gt;     &quot;mark&quot; the<br>
&gt;     &gt;     &gt;     gateway,<br>
&gt;     &gt;     &gt;     &gt; or more likely, not remember the mark. But I can&#39;t spot<br>
&gt;     &gt;     anything in<br>
&gt;     &gt;     &gt;     &gt; the dispatcher documentation that says as such.<br>
&gt;     &gt;     &gt;     your guess is right - dispatcher module uses AVPs to keep<br>
&gt;     &gt;     the state<br>
&gt;     &gt;     &gt;     (between sequential tries on the same dialog).<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     I guess the ds_mark_dst() fails - can you check this?<br>
&gt;     &gt;     (this function<br>
&gt;     &gt;     &gt;     search for the dst and grp avps to identify the last tried<br>
&gt;     &gt;     &gt;     destination.).<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; Greetings Bogdan, and thanks as always;<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; I tried this:<br>
&gt;     &gt;     &gt;         if( t_check_status(&quot;408&quot;) ){<br>
&gt;     &gt;     &gt;                 xlog( &quot;L_NOTICE&quot;, &quot;[$Tf] FR: $ci --<br>
&gt;     TIMEOUT for<br>
&gt;     &gt;     &gt; Gateway $rd (marking as bad)\n&quot; );<br>
&gt;     &gt;     &gt;                 if (!ds_mark_dst(&quot;p&quot;)) {<br>
&gt;     &gt;     &gt;                         xlog(&quot;L_NOTICE&quot;, &quot;[$Tf] Panic! Not<br>
&gt;     &gt;     marked\n&quot;);<br>
&gt;     &gt;     &gt;                         }<br>
&gt;     &gt;     &gt;                 }<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; No &#39;Panic&#39; in the logs.<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; The dst and grp AVPs are set up, as you saw on my original<br>
&gt;     post,<br>
&gt;     &gt;     &gt; but... that doesn&#39;t mean I&#39;m not missing anything.<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     So, ds_mark does not fail .....<br>
&gt;     &gt;<br>
&gt;     &gt;     Are you 100% sure your script does define the &quot;cnt&quot; &quot;grp&quot;<br>
&gt;     &quot;dst&quot; avp<br>
&gt;     &gt;     params for the dispatcher module ????<br>
&gt;     &gt;<br>
&gt;     &gt; Unless somehow I&#39;m doing it wrong, pretty sure:<br>
&gt;     &gt;<br>
&gt;     &gt; # Set up the dispatcher<br>
&gt;     &gt; modparam(&quot;dispatcher&quot;, &quot;db_url&quot;,<br>
&gt;     &gt; &quot;mysql://<a href="http://openser:password@192.168.0.20/company" target="_blank">openser:password@192.168.0.20/company</a><br>
&gt;     &lt;<a href="http://openser:password@192.168.0.20/company" target="_blank">http://openser:password@192.168.0.20/company</a>&gt;<br>
&gt;     &gt; &lt;<a href="http://openser:password@192.168.0.20/company" target="_blank">http://openser:password@192.168.0.20/company</a>&gt;&quot;)<br>
&gt;     &gt; modparam(&quot;dispatcher&quot;, &quot;table_name&quot;, &quot;dispatcher&quot;)<br>
&gt;     &gt; modparam(&quot;dispatcher&quot;, &quot;flags&quot;, 2 )<br>
&gt;     &gt;<br>
&gt;     &gt; modparam(&quot;dispatcher&quot;, &quot;dst_avp&quot;, &quot;$avp(i:271)&quot;)<br>
&gt;     &gt; modparam(&quot;dispatcher&quot;, &quot;grp_avp&quot;, &quot;$avp(i:272)&quot;)<br>
&gt;     &gt; modparam(&quot;dispatcher&quot;, &quot;cnt_avp&quot;, &quot;$avp(i:273)&quot;)<br>
&gt;     &gt;<br>
&gt;     &gt; modparam(&quot;dispatcher&quot;, &quot;ds_ping_method&quot;, &quot;OPTIONS&quot;)<br>
&gt;     &gt; modparam(&quot;dispatcher&quot;, &quot;ds_ping_interval&quot;, 5)<br>
&gt;     &gt; modparam(&quot;dispatcher&quot;, &quot;ds_ping_from&quot;,<br>
&gt;     &quot;<a href="mailto:sip%3A%2B14109999351@192.168.0.2">sip:+14109999351@192.168.0.2</a><br>
&gt;     &lt;mailto:<a href="mailto:sip%253A%252B14109999351@192.168.0.2">sip%3A%2B14109999351@192.168.0.2</a>&gt;<br>
&gt;     &gt; &lt;mailto:<a href="mailto:sip%253A%252B14109999351@192.168.0.2">sip%3A%2B14109999351@192.168.0.2</a><br>
</div></div>&gt;     &lt;mailto:<a href="mailto:sip%25253A%25252B14109999351@192.168.0.2">sip%253A%252B14109999351@192.168.0.2</a>&gt;&gt;&quot;)<br>
<div class="im">&gt;     &gt; modparam(&quot;dispatcher&quot;, &quot;ds_probing_threshhold&quot;, 3)<br>
&gt;     &gt;<br>
&gt;     &gt; As far as I can tell from the documentation and other people&#39;s<br>
&gt;     &gt; examples, this should be all that is required to make this<br>
&gt;     function...<br>
&gt;     &gt;<br>
&gt;     Could you check and be sure the error:<br>
&gt;<br>
&gt;            ERROR:core:search_first_avp: 0 ID or NULL NAME AVP!<br>
&gt;<br>
&gt;     comes from the ds_mark_dst() ? - put some logs before and after<br>
&gt;     it. Also eabling full debug (level 4) may also help.<br>
&gt;<br>
&gt;<br>
&gt; My apologies, Bogdan, I should have done this better myself. I have<br>
&gt; traced the error to the ds_next_domain():<br>
&gt;<br>
&gt; Config section from inside failure_route[]:<br>
&gt;<br>
&gt; xlog(&quot;L_NOTICE&quot;, &quot;[$Tf] HEREA\n&quot;);<br>
&gt; if (ds_next_domain()) {<br>
&gt;         xlog(&quot;L_NOTICE&quot;, &quot;[$Tf] HEREB\n&quot;);<br>
&gt;         .<br>
&gt;         .<br>
&gt;<br>
&gt; The logs contain:<br>
&gt; [Thu Apr 15 11:23:06 2010] HEREA<br>
&gt; ERROR:core:search_first_avp: 0 ID or NULL NAME AVP!<br>
&gt; DBG:dispatcher:ds_next_dst: using [sip:<a href="http://192.168.0.20:5060" target="_blank">192.168.0.20:5060</a><br>
</div>&gt; &lt;<a href="http://192.168.0.20:5060" target="_blank">http://192.168.0.20:5060</a>&gt;]<br>
<div class="im">&gt; [Thu Apr 15 11:23:06 2010] HEREB<br>
&gt;<br>
&gt;<br>
&gt; So clearly the ds_next_domain() is producing it. However the function<br>
&gt; -is- returning the correct next entry in the dispatcher list, which is<br>
&gt; bizarre. I&#39;m not sure, now, how this related to ds_select_domain()<br>
&gt; incorrectly choosing &quot;marked&quot; entries, alas.<br>
<br>
</div><div class="im">--<br>
Bogdan-Andrei Iancu<br>
<a href="http://www.voice-system.ro" target="_blank">www.voice-system.ro</a><br>
<br>
<br>
_______________________________________________<br>
</div><div><div></div><div class="h5">Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br>