<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">On 9/18/13 4:53 PM, Grant Bagdasarian
      wrote:<br>
    </div>
    <blockquote
cite="mid:FB7D97A214987F458242ACBDF87614073B1C5A5E95@clubvirtual40.ClubMessage.local"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 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
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.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><!--[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="color:#1F497D">My Dispatcher
            table has been extended with more columns and also functions
            as our routing table.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">I’ve modified
            the names of the columns Dispatcher uses to match the
            columns of the routing table. <o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">One of the
            columns contains the address which is used to set the $du
            value. <o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">So, for every
            request I’m executing a stored procedure using sqlops to
            select the address of the SBC (for $du) and the set id to
            use for the dispatcher.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">If I’m correct,
            the dispatcher table is loaded into memory once Kamailio is
            started or the table is reloaded.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">In case the
            first destination fails, how would I get the address of the
            next SBC to reset the $du value in failure_route? <o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">I think I can
            do it using the setid and the next priority, but how do I
            access these two values in failure_route? <o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">Are there any
            other solutions to this, perhaps other modules with similar
            functionality as the dispatcher module?</span></p>
      </div>
    </blockquote>
    <br>
    The setid and next hop address are stored in AVPs, the names of the
    avps are set via module parameters. See readme starting at:<br>
    <br>
<a class="moz-txt-link-freetext" href="http://kamailio.org/docs/modules/stable/modules/dispatcher.html#idp15216488">http://kamailio.org/docs/modules/stable/modules/dispatcher.html#idp15216488</a><br>
    <br>
    In failure route, before calling ds_next_*(), the first avps store
    the values used for next destination. You can probably use them for
    your db query.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <blockquote
cite="mid:FB7D97A214987F458242ACBDF87614073B1C5A5E95@clubvirtual40.ClubMessage.local"
      type="cite">
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #B5C4DF
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
                <a class="moz-txt-link-abbreviated" href="mailto:sr-users-bounces@lists.sip-router.org">sr-users-bounces@lists.sip-router.org</a>
                [<a class="moz-txt-link-freetext" href="mailto:sr-users-bounces@lists.sip-router.org">mailto:sr-users-bounces@lists.sip-router.org</a>] <b>On
                  Behalf Of </b>Alex Balashov<br>
                <b>Sent:</b> Wednesday, September 18, 2013 4:23 PM<br>
                <b>To:</b> Kamailio (SER) - Users Mailing List<br>
                <b>Subject:</b> Re: [SR-Users] dispatcher: set $du in
                failure_route<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal" style="margin-bottom:12.0pt"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman","serif"">Of course. <o:p></o:p></span></p>
        <div>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:"Times New
              Roman","serif"">Grant Bagdasarian <<a
                moz-do-not-send="true" href="mailto:GB@cm.nl">GB@cm.nl</a>>
              wrote:<o:p></o:p></span></p>
          <p class="MsoNormal">Hello,<o:p></o:p></p>
          <p> <o:p></o:p></p>
          <p class="MsoNormal">Can the $du value also be set in a
            failure_route? For instance in the case the first
            destination fails.<o:p></o:p></p>
          <p> <o:p></o:p></p>
          <p class="MsoNormal">I’m currently setting the $du value
            before I’m calling the ds_next_domain function in
            request_route.<o:p></o:p></p>
          <p class="MsoNormal">We have multiple carriers which are
            connected to different SBCs. <o:p></o:p></p>
          <p> <o:p></o:p></p>
          <p class="MsoNormal">In case $du is not re-set in
            failure_route, Kamailio will try to send the INVITE to the
            carrier directly, bypassing the SBC, correct?<o:p></o:p></p>
          <p> <o:p></o:p></p>
          <p class="MsoNormal">Regards,<o:p></o:p></p>
          <p> <o:p></o:p></p>
          <p class="MsoNormal">Grant<o:p></o:p></p>
          <pre style="text-align:center"><hr align="center" size="2" width="100%"></pre>
          <pre>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></pre>
        </div>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman","serif""><br>
            --<br>
            Sent from my mobile, and thus lacking in the refinement one
            might expect from a fully fledged keyboard. <br>
            <br>
            Alex Balashov - Principal <br>
            Evariste Systems LLC<br>
            235 E Ponce de Leon Ave<br>
            Suite 106<br>
            Decatur, GA 30030<br>
            United States<br>
            Tel: +1-678-954-0671<br>
            Web: <a moz-do-not-send="true"
              href="http://www.evaristesys.com">http://www.evaristesys.com</a>/,
            <a moz-do-not-send="true" href="http://www.alexbalashov.com">http://www.alexbalashov.com</a><o:p></o:p></span></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Trainings - Berlin, Oct 21-24; Miami, Nov 11-13, 2013
  - more details about Kamailio trainings at <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a> -
</pre>
  </body>
</html>