<div dir="ltr">Daniel.  I added 8 algorithm to our server and it works with 2 servers now but it works strange because:<br>While works server with priority 1 - all ok. When this server goes down dispatcher choose next server with lowes priority. But when server with highest priority waking up dispatcher use server with lowes priority until this server not goes down.</div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-12 15:18 GMT+03:00 Yuriy Gorlichenko <span dir="ltr"><<a href="mailto:ovoshlook@gmail.com" target="_blank">ovoshlook@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Daniel. Hello. I see changes at documentation about algorithms at 4.3 documentation for dispatcher. Now I see than 8 algo use priority. Not I set this algorithm to my servers but priority still not worked.<br><br>my dispatcher settings Are<br><br><br><div>modparam("dispatcher", "db_url",DBURL)</div><div>modparam("dispatcher", "table_name", "dispatcher")</div><div>modparam("dispatcher", "setid_col", "setid")</div><div>modparam("dispatcher", "priority_col", "priority")</div><div>modparam("dispatcher", "destination_col", "destination")</div><div>modparam("dispatcher", "force_dst", 1)</div><div>modparam("dispatcher", "flags", 3)</div><div>modparam("dispatcher", "dst_avp", "$avp(i:271)")</div><div>modparam("dispatcher", "grp_avp", "$avp(i:272)")</div><div>modparam("dispatcher", "cnt_avp", "$avp(i:273)")</div><div>modparam("dispatcher", "ds_ping_from", "<a href="mailto:sip%3Akamailio1@10.0.1.12" target="_blank">sip:kamailio1@10.0.1.12</a>")</div><div>modparam("dispatcher", "ds_ping_interval",15)</div><div>modparam("dispatcher", "ds_probing_mode", 1)</div><div>modparam("dispatcher", "ds_ping_reply_codes", "class=2;code=403;code=404;code=484;class=3")</div><div>modparam("tm", "reparse_on_dns_failover", 0)</div><div><br></div><br><br>(!ds_select_dst("$var(setid)", "8")){<br><br><div>sl_send_reply("500", "Service Unavailable");</div><div>            xlog("L_INFO","{$rm} from [$fU@$si:$sp] But NO destinations available for $rd \n");</div><div><span style="white-space:pre-wrap">                    </span>t_on_failure("DISPATCHER_ROLLOVER");</div><br>}<br><br><div>if (!t_relay()) {</div><div><span style="white-space:pre-wrap">            </span>sl_reply_error();</div><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-01-10 2:31 GMT+03:00 Yuriy Gorlichenko <span dir="ltr"><<a href="mailto:ovoshlook@gmail.com" target="_blank">ovoshlook@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Priority bassed? I've read about all algorithms of disatcher and can not find that anone use priority... <br><br><ul style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:medium"><li><p style="font-size:12px;text-align:justify"><span>“<span>0</span>”</span> - hash over callid</p></li><li><p style="font-size:12px;text-align:justify"><span>“<span>1</span>”</span> - hash over from URI.</p></li><li><p style="font-size:12px;text-align:justify"><span>“<span>2</span>”</span> - hash over to URI.</p></li><li><p style="font-size:12px;text-align:justify"><span>“<span>3</span>”</span> - hash over request-URI.</p></li><li><p style="font-size:12px;text-align:justify"><span>“<span>4</span>”</span> - round-robin (next destination).</p></li><li><p style="font-size:12px;text-align:justify"><span>“<span>5</span>”</span> - hash over authorization-username (Proxy-Authorization or "normal" authorization). If no username is found, round robin is used.</p></li><li><p style="font-size:12px;text-align:justify"><span>“<span>6</span>”</span> - random (using rand()).</p></li><li><p style="font-size:12px;text-align:justify"><span>“<span>7</span>”</span> - hash over the content of PVs string. Note: This works only when the parameter hash_pvar is set.</p></li><li><p style="font-size:12px;text-align:justify"><span>“<span>8</span>”</span> - use first destination (good for failover).</p></li><li><p style="font-size:12px;text-align:justify"><span>“<span>9</span>”</span> - use weight based load distribution. You have to set the attribute 'weight' per each address in destination set.</p></li><li><p style="font-size:12px;text-align:justify"><span>“<span>10</span>”</span> - use call load distribution. You have to set the attribute 'duid' (as an unique string id) per each address in destination set. Also, you must set parameters 'dstid_avp' and 'ds_hash_size'.</p><p style="font-size:12px;text-align:justify">The algorithm can be used even with stateless proxy mode, there is no SIP dialog tracking depending on other modules, just an internal lightweight call tracking by Call-Id, thus is fast and suitable even for embedded systems.</p><p style="font-size:12px;text-align:justify">The first destination selected by this algorithm is the one that has the least number of calls associated. The rest of the destination list is taken in order of the entries in set - anyhow, until a re-route to next destination happens, the load on each address can change.</p><p style="font-size:12px;text-align:justify">This algorithm can be used only for dispatching INVITE requests as it is the only SIP method creating a SIP call.</p></li><li><p style="font-size:12px;text-align:justify"><span>“<span>X</span>”</span> - if the algorithm is not implemented, the first entry in set is chosen.</p></li></ul></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-09 20:23 GMT+03:00 Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    You probably look for priority based routing -- see the readme of
    dispatcher module.<br>
    <br>
    Cheers,<br>
    Daniel<div><div><br>
    <br>
    <div>On 09/01/15 17:52, Yuriy Gorlichenko
      wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div>
      <div dir="ltr">I as wrote before - we find dispatcher algorithm
        than can do mechanism something like this:<br>
        Try call to fist server with max priority or weight. OIf this
        server unavailible then call second server with less weight and
        etc.<br>
        <br>
        Does anyone know what ling of algorithm we can use for this?</div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<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><span><font color="#888888">
</font></span></pre><span><font color="#888888">
    </font></span></blockquote><span><font color="#888888">
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a></pre>
  </font></span></div>

<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<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>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>