Ηι Carsten,<br><br>I added in my failure route the following :<br><br>if (t_check_status(&quot;408&quot;)) {<br>
   ds_mark_dst(&quot;i&quot;);<br>
}<br><br>and everything works fine.<br><br>Thank you very much for your help<br><br>Alex<br><br><br><br><div class="gmail_quote">On Tue, Nov 16, 2010 at 6:03 PM, Carsten Bock <span dir="ltr">&lt;<a href="mailto:lists@bock.info">lists@bock.info</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Alex,<br>
<br>
you must have set this to ds_mark_dst(&quot;i&quot;) instead of &quot;p&quot;, only &quot;i&quot;<br>
will set the gateway to inactive.<br>
Also you should add a &quot;t_check_status()&quot; before calling ds_mark_dst()<br>
in order to define the codes, which should lead to the required state,<br>
e.g.:<br>
<br>
if (t_check_status(&quot;408|503&quot;)) {<br>
   ds_mark_dst(&quot;p&quot;);<br>
}<br>
<br>
So only in case the ds_mark_dst would only be called, if the status of<br>
the transaction was 408 (Request timeout) or 503 (Service<br>
unavailable).<br>
<br>
Please be aware, that the new setting to probing does only apply to<br>
new requests (retransmits to the disabled destination will still occur<br>
until the transaction does timeout).<br>
<br>
We have been using this functionality for several years now and we<br>
never had problems....<br>
<div><div></div><div class="h5"><br>
Carsten<br>
<br>
2010/11/16 alex pappas &lt;<a href="mailto:rebel.pappas@gmail.com">rebel.pappas@gmail.com</a>&gt;:<br>
&gt; Hi Carsten,<br>
&gt;<br>
&gt; I tried that before but it&#39;s not what I really need. By saying that , when I<br>
&gt; added this function to my failure route then every call failure that<br>
&gt; happened (routing problem let&#39;s say) then immediately this GW was set to<br>
&gt; Inactive mode and I was not able to use it.<br>
&gt;<br>
&gt; What I&#39;m asking is to understand why Dispatcher module is sending calls to a<br>
&gt; GW in P state?<br>
&gt;<br>
&gt; Thanks<br>
&gt;<br>
&gt; Alex<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Nov 16, 2010 at 3:54 PM, Carsten Bock &lt;<a href="mailto:lists@bock.info">lists@bock.info</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi Alex,<br>
&gt;&gt;<br>
&gt;&gt; do you have a &quot;ds_mark_dst(&quot;p&quot;)&quot; in your failure route? This needs to<br>
&gt;&gt; be called &quot;threshhold&quot; times in order to set the gateway to probing...<br>
&gt;&gt; And please be aware of timeouts: If you have a Transaction-timeout of<br>
&gt;&gt; e.g. 60 seconds, then the failure-route would be executed after 60<br>
&gt;&gt; seconds and for this time the gateway would stay &quot;active&quot;.<br>
&gt;&gt;<br>
&gt;&gt; Carsten<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; 2010/11/16 alex pappas &lt;<a href="mailto:rebel.pappas@gmail.com">rebel.pappas@gmail.com</a>&gt;:<br>
&gt;&gt; &gt; Hi Daniel,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I have configured that option before i send it the email.<br>
&gt;&gt; &gt; modparam(&quot;dispatcher&quot;, &quot;ds_probing_threshhold&quot;, 2)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I have gateways A,A,B,C. (A and A is the same gw. I want to send more<br>
&gt;&gt; &gt; calls<br>
&gt;&gt; &gt; that&#39;s why is added twice)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; C is the dead gateway. It never responds back to the options because is<br>
&gt;&gt; &gt; not<br>
&gt;&gt; &gt; a real IP.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; When Dispatcher is sending the Invites it always includes the dead gw C<br>
&gt;&gt; &gt; which by the way is in probing mode.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Doing some test calls i have the following results in send it Invites:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; A, B, A, C<br>
&gt;&gt; &gt; B, A, C, A<br>
&gt;&gt; &gt; A, C, A, B<br>
&gt;&gt; &gt; A, B , A ,C<br>
&gt;&gt; &gt; B, A, C, A<br>
&gt;&gt; &gt; A, C, A, B<br>
&gt;&gt; &gt; A, B , A ,C<br>
&gt;&gt; &gt; B, A, C, A<br>
&gt;&gt; &gt; A, C, A, B<br>
&gt;&gt; &gt; A, B, A, C<br>
&gt;&gt; &gt; B, A, C, A<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; As you can see the C dead gw is always included to the Invites send.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Am i missing something in the configuration?<br>
&gt;&gt; &gt; I also tried to use “9” - use weight based load distribution but with no<br>
&gt;&gt; &gt; success. i got in the logs that this algorithm is not implemented. I&#39;m<br>
&gt;&gt; &gt; doing<br>
&gt;&gt; &gt; something wrong here or is not implemented in this version of Kamailio.<br>
&gt;&gt; &gt; (<br>
&gt;&gt; &gt; 3.0.1)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thank you in advance for your help.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Regards<br>
&gt;&gt; &gt; Alex<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Fri, Nov 12, 2010 at 10:14 PM, Daniel-Constantin Mierla<br>
&gt;&gt; &gt; &lt;<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Hi Alex,<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; dispatcher module does not send new invites to inactive gateways. But<br>
&gt;&gt; &gt;&gt; in<br>
&gt;&gt; &gt;&gt; case a destination became inactive while some INVITEs were already<br>
&gt;&gt; &gt;&gt; through<br>
&gt;&gt; &gt;&gt; dispatcher, these recent inactive gateways may still be used for them.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Regarding the probing mode, dispatcher will never select a probing<br>
&gt;&gt; &gt;&gt; gateway<br>
&gt;&gt; &gt;&gt; as first option to route the call, but they are kept as alternative.<br>
&gt;&gt; &gt;&gt; This is<br>
&gt;&gt; &gt;&gt; the current implementation, we may add a module parameter to skip<br>
&gt;&gt; &gt;&gt; gateways<br>
&gt;&gt; &gt;&gt; in probing mode even for secondary alternatives.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Non-responsive gateways change the state after a while, see:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; <a href="http://kamailio.org/docs/modules/stable/modules_k/dispatcher.html#id2567110" target="_blank">http://kamailio.org/docs/modules/stable/modules_k/dispatcher.html#id2567110</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Cheers,<br>
&gt;&gt; &gt;&gt; Daniel<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On 11/12/10 12:58 PM, alex pappas wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Dear all,<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Does anyone can explain how Dispatcher module is sending calls to the<br>
&gt;&gt; &gt;&gt; gateways in the different states?<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I mean if I have 3 gateways and the one of them is in Probing mode why<br>
&gt;&gt; &gt;&gt; Dispatcher is continuing sending there calls? Why this gateway is not<br>
&gt;&gt; &gt;&gt; changing from Probing to Inactive since is not replaying to OPTIONS<br>
&gt;&gt; &gt;&gt; messages<br>
&gt;&gt; &gt;&gt; send by Kamailio?<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Configuration:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; modparam(&quot;dispatcher&quot;, &quot;flags&quot;, 2)<br>
&gt;&gt; &gt;&gt; modparam(&quot;dispatcher&quot;, &quot;ds_ping_interval&quot;, 5)<br>
&gt;&gt; &gt;&gt; modparam(&quot;dispatcher&quot;, &quot;ds_probing_mode&quot;, 1)<br>
&gt;&gt; &gt;&gt; modparam(&quot;dispatcher&quot;, &quot;ds_probing_threshhold&quot;, 2)<br>
&gt;&gt; &gt;&gt; modparam(&quot;dispatcher&quot;, &quot;dst_avp&quot;, &quot;$avp(s:dst_avp)&quot;)<br>
&gt;&gt; &gt;&gt; modparam(&quot;dispatcher&quot;, &quot;grp_avp&quot;, &quot;$avp(dsgrp)&quot;)<br>
&gt;&gt; &gt;&gt; modparam(&quot;dispatcher&quot;, &quot;cnt_avp&quot;, &quot;$avp(i:202)&quot;)<br>
&gt;&gt; &gt;&gt; modparam(&quot;dispatcher&quot;, &quot;ds_append_branch&quot;, 0)<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; using db for gw:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; setid 123,destination sip:xxx.xxxx.xxx, flag 0 ...<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; in ROUTE:<br>
&gt;&gt; &gt;&gt; if(ds_select_domain(&quot;$avp(s:disp_dstgrp)&quot;, &quot;4&quot;))<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; in Failure Route<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; if(!ds_next_domain())<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I want Dispatcher when it sees a node gateway that is dead , to Not<br>
&gt;&gt; &gt;&gt; send<br>
&gt;&gt; &gt;&gt; any other calls.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Thank you in advance<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Alex<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
&gt;&gt; &gt;&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt;&gt; &gt;&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; Daniel-Constantin Mierla<br>
&gt;&gt; &gt;&gt; <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
&gt;&gt; &gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt;&gt; &gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Carsten Bock<br>
&gt;&gt; Schomburgstr. 80<br>
&gt;&gt; 22767 Hamburg<br>
&gt;&gt; Germany<br>
&gt;&gt;<br>
&gt;&gt; Mobile +49 179 2021244<br>
&gt;&gt; Home +49 40 34927217<br>
&gt;&gt; Fax +49 40 34927218<br>
&gt;&gt; mailto:<a href="mailto:carsten@bock.info">carsten@bock.info</a><br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">Carsten Bock<br>
Schomburgstr. 80<br>
22767 Hamburg<br>
Germany<br>
<br>
Mobile +49 179 2021244<br>
Home +49 40 34927217<br>
Fax +49 40 34927218<br>
mailto:<a href="mailto:carsten@bock.info">carsten@bock.info</a><br>
</div></div></blockquote></div><br>