<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>maybe a dedicated module is going to be too complex or better
said, duplicate a lot of code for management of the destinations,
load/reload/keepalive, ... (although I won't have anything against
such approach, if considered better by developer).</p>
<p>However, if done in dispatcher, I think that a new algorithm id
should be used, leaving 8 as it is. Also, there should be a new
field added in the internal structure to keep this "dynamic"
priority -- it can be initialized to the "priority" value.</p>
<p>In some cases I use different algorithms for the same group of
destinations, so it would be good to be able to use algorithm 8
with priority from database and the new algorithm at the same
time.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 27.05.20 21:46, Henning Westerholt
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:AM0PR05MB65956876DDD198E9811CA88CC5B10@AM0PR05MB6595.eurprd05.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
span.E-MailFormatvorlage19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi
Julien,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB">sounds interesting, a “location optimized
routing mode”. What about making it as a dedicated mode, to
not overloading the mode “8”?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB">Henning<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB">-- <o:p>
</o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB">Henning Westerholt –
</span><span style="mso-fareast-language:EN-US"><a
href="https://skalatan.de/blog/" moz-do-not-send="true"><span
style="color:#0563C1" lang="EN-GB">https://skalatan.de/blog/</span></a></span><span
style="mso-fareast-language:EN-US" lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB">Kamailio services –
</span><span style="mso-fareast-language:EN-US"><a
href="https://gilawa.com/" moz-do-not-send="true"><span
style="color:#0563C1" lang="EN-GB">https://gilawa.com</span></a></span><span
style="mso-fareast-language:EN-US">
<span lang="EN-GB"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:35.4pt"><b>From:</b>
sr-dev <a class="moz-txt-link-rfc2396E" href="mailto:sr-dev-bounces@lists.kamailio.org"><sr-dev-bounces@lists.kamailio.org></a>
<b>On Behalf Of </b>Julien Chavanton<br>
<b>Sent:</b> Thursday, May 14, 2020 7:26 PM<br>
<b>To:</b> Kamailio (SER) - Development Mailing List
<a class="moz-txt-link-rfc2396E" href="mailto:sr-dev@lists.kamailio.org"><sr-dev@lists.kamailio.org></a>; Kamailio (SER) - Users
Mailing List <a class="moz-txt-link-rfc2396E" href="mailto:sr-users@lists.kamailio.org"><sr-users@lists.kamailio.org></a><br>
<b>Subject:</b> [sr-dev] congestion control priority for
priority based dispatching<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hi Folks,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:35.4pt"><br>
Just found another simple use case of the dispatcher
latency stats.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt">Just shraing
this idea of a feature I want to contribute.<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><br>
When using dispatcher algorithm 8:<br>
<br>
“8” - select destination sorted by priority attribute
value (serial forking ordered by priority).<br>
<br>
If the gateway as the attribute, the priority becomes the
estimated latency.<br>
<br>
cc-priority<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">- The
dispatcher would automatically prioritize the closest
one.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">- If a
gateway is becoming unresponsive it will automatically
become de prioritize.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><br>
Consider this real life scenario where you have gateways
in East and West Coast <o:p>
</o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Example <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><br>
URI: <a href="sip:28.71.19.140" moz-do-not-send="true">sip:28.71.19.140</a>
<br>
FLAGS: AP<br>
PRIORITY: 10<br>
ATTRS: {<br>
BODY: cc_priority=1<br>
}<br>
LATENCY: {<br>
AVG: 84.001000<br>
STD: 0.062000<br>
EST: 84.001000 (high == low priority)<br>
MAX: 93<br>
TIMEOUT: 0<br>
URI: <a href="sip:28.71.16.140" moz-do-not-send="true">sip:28.71.16.140</a><br>
FLAGS: AP<br>
PRIORITY: 10<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">ATTRS: {<br>
BODY: cc_priority=1<br>
}<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">LATENCY: {<br>
AVG: 29.110000<br>
STD: 2.383000<br>
EST: 31.999000 (low == high priority)<br>
MAX: 1499<br>
TIMEOUT: 1<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Another
major improvement to all of this would be to gather stats
on INVITE <> 100 to have a very accurate latency
estimation even if the gateway does not support SIP
OPTIONS pings<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Development Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.kamailio.org">sr-dev@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a></pre>
</body>
</html>