<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<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:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I don’t think the second parameter (algorithm) will accept multiple values as you have. You are indicating that you want to hash over both the call-id and the from uri, which I don’t think is possible. You must choose one.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">For the failover, it is described in the documentation [1]: “If the character 'f' in 'flags' is set, the rest of the addresses from the destination set is stored in AVP list. You can use 'ds_next_dst()' to use next address to achieve serial
forking to all possible destinations.” So you need to use a failure_route [2] and arm it before you send the request [3]. Then in the failure route you would check the code that was returned [4] and if appropriate use ds_next_dst to select another endpoint
to try and send the request back out.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I cannot answer about the “first_hit_counter, I’ve never looked at that before. I will say that we use the dispatcher module to send a lot of traffic and we have never had to reset it or anything, so it is either vary large or the module
must handle it.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[1] - <a href="https://opensips.org/html/docs/modules/2.4.x/dispatcher.html#func_ds_select_dst">
https://opensips.org/html/docs/modules/2.4.x/dispatcher.html#func_ds_select_dst</a><o:p></o:p></p>
<p class="MsoNormal">[2] - <a href="https://www.opensips.org/Documentation/Script-Routes-2-4">
https://www.opensips.org/Documentation/Script-Routes-2-4</a><o:p></o:p></p>
<p class="MsoNormal">[3] - <a href="https://opensips.org/html/docs/modules/2.4.x/tm.html#func_t_on_failure">
https://opensips.org/html/docs/modules/2.4.x/tm.html#func_t_on_failure</a><o:p></o:p></p>
<p class="MsoNormal">[4] - <a href="https://opensips.org/html/docs/modules/2.4.x/tm.html#func_t_check_status">
https://opensips.org/html/docs/modules/2.4.x/tm.html#func_t_check_status</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="color:black">Ben Newlin </span><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">Users <users-bounces@lists.opensips.org> on behalf of Алексей Хамстр <homstr@gmail.com><br>
<b>Reply-To: </b>OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Date: </b>Friday, March 29, 2019 at 8:05 AM<br>
<b>To: </b>"users@lists.opensips.org" <users@lists.opensips.org><br>
<b>Subject: </b>[OpenSIPS-Users] Some questions about module dispatcher.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">Hello.<br>
I wanted to ask, if anybody have some extra information about function <br>
<span style="color:black;background:#FEFEEE">ds_select_dst ("part4 : 2,3", "0,1", "fuD M 5, fuS M 2");</span><span style="background:#FEFEEE"><br>
<span style="color:black">Please, any examples will be appreciated. :-)</span></span> <span style="color:black;background:#FEFEEE"><br>
How is this working, when we have such komplex parameters? I need to set up <br>
</span><span style="background:#FEFEEE">failover in case of any error on my "Active" destinations. For example, what if yate1 have an error in isdn channel and giving me back code 480, or 500? I need to try next destination in this case. <br>
<span style="color:black">And another one question. How big could be "first_hit_counter</span></span>"? Maybe i bether sould reset it by cron? <span style="background:#FEFEEE"><br>
<br>
<span style="color:black">lets say, I have a two gateways</span><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="color:black;background:#FEFEEE"> SET:: 1</span><span style="background:#FEFEEE"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black;background:#FEFEEE"> URI:: sip:<a href="http://10.10.128.97:5060">10.10.128.97:5060</a> state=Active first_hit_counter=1828</span><span style="background:#FEFEEE"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black;background:#FEFEEE"> URI:: sip:<a href="http://10.10.128.98:5060">10.10.128.98:5060</a> state=Active first_hit_counter=1849</span><span style="background:#FEFEEE"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black;background:#FEFEEE">root@sipproxy1:/home/it# opensipsctl dispatcher show</span><span style="background:#FEFEEE"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black;background:#FEFEEE">dispatcher gateways</span><span style="background:#FEFEEE"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black;background:#FEFEEE">+----+-------+------------------------+--------+-------+--------+----------+-------+-----------------------+</span><span style="background:#FEFEEE"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black;background:#FEFEEE">| id | setid | destination | socket | state | weight | priority | attrs | description |</span><span style="background:#FEFEEE"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black;background:#FEFEEE">+----+-------+------------------------+--------+-------+--------+----------+-------+-----------------------+</span><span style="background:#FEFEEE"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black;background:#FEFEEE">| 1 | 1 | sip:<a href="http://10.10.128.97:5062">10.10.128.97:5062</a> | | 0 | 0 | 1 | | YATE1 |</span><span style="background:#FEFEEE"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black;background:#FEFEEE">| 3 | 1 | sip:<a href="http://10.10.128.98:5062">10.10.128.98:5062</a> | | 0 | 0 | 1 | | YATE2 |</span><span style="background:#FEFEEE"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black;background:#FEFEEE"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><span style="background:#FEFEEE">Thankyou!</span><o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>