<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,<br>
    </p>
    <div class="moz-cite-prefix">On 04.12.18 15:32, Grant Bagdasarian
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:33ca957631ce4e4bbf1696c870e38ba7@cm.nl">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <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;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 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 lang="NL">Hello,<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="NL"><o:p> </o:p></span></p>
        <p class="MsoNormal">I’m trying to use multiple destination sets
          which may include the same destination.<o:p></o:p></p>
        <p class="MsoNormal">For instance: <o:p></o:p></p>
        <p class="MsoNormal">SET ID: 1<o:p></o:p></p>
        <p class="MsoNormal"><a href="sip:10.0.0.1:5060"
            moz-do-not-send="true">sip:10.0.0.1:5060</a><o:p></o:p></p>
        <p class="MsoNormal"><a href="sip:10.0.0.2:5060"
            moz-do-not-send="true">sip:10.0.0.2:5060</a><o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">SET ID: 2<o:p></o:p></p>
        <p class="MsoNormal"><a href="sip:10.0.0.1:5060"
            moz-do-not-send="true">sip:10.0.0.1:5060</a><o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Whenever a new SIP INVITE is sent to the
          Kamailio instance it will use SET ID 1. If then for some
          reason this call attempt fails, failure_route will trigger and
          SET ID 2 will be used.  At first glance this might not make
          any sense, but there is some business logic behind this, but
          it’s not relevant for this case.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">For some reason, the dst_avp variable still
          contains the destinations of SET ID 1 in failure_route.<o:p></o:p></p>
        <p class="MsoNormal">Is there a built-in way to reset this
          variable for every call to ds_select_domain(), such that only
          the destinations of passed SET ID will be loaded into the avp?<o:p></o:p></p>
        <p class="MsoNormal">I tried setting the avp to $null before
          calling ds_select_domain, but that had some undesirable
          effects.
        </p>
      </div>
    </blockquote>
    <p><br>
    </p>
    <p>If ds_next_*() returns false, then it should be no avp with a
      destination address from dispatcher? Have you printed the avps and
      see how amby are? Also, what where those effects?</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite"
      cite="mid:33ca957631ce4e4bbf1696c870e38ba7@cm.nl">
      <div class="WordSection1">
        <p class="MsoNormal"><o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">The reason I’m asking this is the
          destinations the call is being sent to are Freeswitch
          instances, which will return a 482 Request Merged when the
          same INVITE is sent to the same Freeswitch within 4 seconds
          (default T4 timer).
          <o:p></o:p></p>
        <p class="MsoNormal">I’m trying to match the previously selected
          destination in failure_route with the next destination and
          skip if they’re the same, or stop processing when they are the
          same and no more destinations are available.
          <o:p></o:p></p>
        <p class="MsoNormal">I know I can mess with the T4 timer in
          Freeswitch and perhaps even sleep in failure route to deal
          with the 482 failure, but I rather fix this in a normal way.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Regards,<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <table class="MsoNormalTable" cellspacing="0" cellpadding="0"
          border="0">
          <tbody>
            <tr>
              <td style="padding:0cm 0cm 1.5pt 0cm">
                <p class="MsoNormal"><span
                    style="font-size:16.0pt;color:#1657EA">Grant
                    Bagdasarian</span><span
                    style="font-size:12.0pt;color:#1657EA"><o:p></o:p></span></p>
              </td>
            </tr>
            <tr>
              <td style="padding:0cm 0cm 15.0pt 0cm">
                <p class="MsoNormal"><span
                    style="font-size:12.0pt;color:black">Senior
                    Developer</span><span
                    style="font-size:9.0pt;color:black"><o:p></o:p></span></p>
              </td>
            </tr>
          </tbody>
        </table>
        <p class="MsoNormal"><span lang="NL"><o:p> </o:p></span></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</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>
Kamailio World Conference -- <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a>
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a></pre>
  </body>
</html>