<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p><br>
    </p>
    <p>something like that, maybe the parameter value will be only the
      name of the xavp, similar to xavp_cfg for registrar.</p>
    <p><br>
    </p>
    <p>For attrs and extra columns, I was thinking of concatenating all
      of them in 'attrs' field and have also separate those with a
      specific meaning (like socket, weight, ...) -- this is more or
      less what is now with avps, one having all in avp_attrs param and
      then some with dedicated avps.</p>
    <p><br>
    </p>
    <p>Having all of them in a single string is useful when one wants to
      add them to headers, etc. Parsing can be done with {param}
      transformation. However, having them on a dedicated xavp
      sub-field, can be added in the future.<br>
    </p>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 06.06.18 11:40, Luis Azedo wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CY4PR13MB168587792EEBE152619463E9A0650@CY4PR13MB1685.namprd13.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;"
        dir="ltr">
        <p style="margin-top:0;margin-bottom:0">Hi Daniel,</p>
        <p style="margin-top:0;margin-bottom:0"><br>
        </p>
        <p style="margin-top:0;margin-bottom:0">love the idea!</p>
        <p style="margin-top:0;margin-bottom:0"><br>
        </p>
        <p style="margin-top:0;margin-bottom:0">just to be sure i
          understand...,</p>
        <div><br>
        </div>
        <div>current params declaration</div>
        <div>modparam("dispatcher", "dst_avp", "$avp(ds_dst)")</div>
        <div>modparam("dispatcher", "attrs_avp", "$avp(ds_attrs)")</div>
        <div><br>
        </div>
        <div><span style="font-family: Calibri, Helvetica, sans-serif,
            EmojiFont, "Apple Color Emoji", "Segoe UI
            Emoji", NotoColorEmoji, "Segoe UI Symbol",
            "Android Emoji", EmojiSymbols; font-size: 16px;">new
            params declaration</span><br>
        </div>
        <div>modparam("dispatcher", "dst_xavp", "$xavp(ds_dst)")</div>
        <div>##modparam("dispatcher", "attrs_avp", "$avp(ds_attrs)")</div>
        <div><br>
        </div>
        <div><span>instead of using $avp(ds_dst) to get the uri we would
            use <span> $xavp(ds_dst=>uri) ?</span></span><br>
        </div>
        <div><span><span>instead of parsing the <span
                style="font-family: Calibri, Helvetica, sans-serif,
                EmojiFont, "Apple Color Emoji", "Segoe UI
                Emoji", NotoColorEmoji, "Segoe UI
                Symbol", "Android Emoji", EmojiSymbols;
                font-size: 16px;">$avp(ds_attrs) to get the required
                param we would use <span style="font-family: Calibri,
                  Helvetica, sans-serif, EmojiFont, "Apple Color
                  Emoji", "Segoe UI Emoji",
                  NotoColorEmoji, "Segoe UI Symbol",
                  "Android Emoji", EmojiSymbols; font-size:
                  16px;">$xavp(ds_dst=>my_extra_column) ?</span></span></span></span></div>
        <div><span><span><span style="font-family: Calibri, Helvetica,
                sans-serif, EmojiFont, "Apple Color Emoji",
                "Segoe UI Emoji", NotoColorEmoji, "Segoe
                UI Symbol", "Android Emoji",
                EmojiSymbols; font-size: 16px;"><span
                  style="font-family: Calibri, Helvetica, sans-serif,
                  EmojiFont, "Apple Color Emoji", "Segoe
                  UI Emoji", NotoColorEmoji, "Segoe UI
                  Symbol", "Android Emoji", EmojiSymbols;
                  font-size: 16px;"><br>
                </span></span></span></span></div>
        <div><span><span><span style="font-family: Calibri, Helvetica,
                sans-serif, EmojiFont, "Apple Color Emoji",
                "Segoe UI Emoji", NotoColorEmoji, "Segoe
                UI Symbol", "Android Emoji",
                EmojiSymbols; font-size: 16px;"><span
                  style="font-family: Calibri, Helvetica, sans-serif,
                  EmojiFont, "Apple Color Emoji", "Segoe
                  UI Emoji", NotoColorEmoji, "Segoe UI
                  Symbol", "Android Emoji", EmojiSymbols;
                  font-size: 16px;">Best</span></span></span></span></div>
        <div><span><span><span style="font-family: Calibri, Helvetica,
                sans-serif, EmojiFont, "Apple Color Emoji",
                "Segoe UI Emoji", NotoColorEmoji, "Segoe
                UI Symbol", "Android Emoji",
                EmojiSymbols; font-size: 16px;"><span
                  style="font-family: Calibri, Helvetica, sans-serif,
                  EmojiFont, "Apple Color Emoji", "Segoe
                  UI Emoji", NotoColorEmoji, "Segoe UI
                  Symbol", "Android Emoji", EmojiSymbols;
                  font-size: 16px;"><br>
                </span></span></span></span></div>
        <div><span><span><span style="font-family: Calibri, Helvetica,
                sans-serif, EmojiFont, "Apple Color Emoji",
                "Segoe UI Emoji", NotoColorEmoji, "Segoe
                UI Symbol", "Android Emoji",
                EmojiSymbols; font-size: 16px;"><span
                  style="font-family: Calibri, Helvetica, sans-serif,
                  EmojiFont, "Apple Color Emoji", "Segoe
                  UI Emoji", NotoColorEmoji, "Segoe UI
                  Symbol", "Android Emoji", EmojiSymbols;
                  font-size: 16px;"><br>
                </span></span></span></span></div>
        <br>
      </div>
      <hr style="display:inline-block;width:98%" tabindex="-1">
      <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
          face="Calibri, sans-serif" color="#000000"><b>From:</b>
          sr-users <a class="moz-txt-link-rfc2396E" href="mailto:sr-users-bounces@lists.kamailio.org"><sr-users-bounces@lists.kamailio.org></a> on behalf
          of Daniel-Constantin Mierla <a class="moz-txt-link-rfc2396E" href="mailto:miconda@gmail.com"><miconda@gmail.com></a><br>
          <b>Sent:</b> Wednesday, June 6, 2018 7:53:24 AM<br>
          <b>To:</b> Kamailio (SER) - Devel Mailing List; Kamailio (SER)
          - Users Mailing List<br>
          <b>Subject:</b> [SR-Users] RFC: dispatcher refactoring to use
          xavp and options for attributes</font>
        <div> </div>
      </div>
      <div class="BodyFragment"><font size="2"><span
            style="font-size:11pt;">
            <div class="PlainText">Hello,<br>
              <br>
              I am starting a discussion here about my plans to do a bit
              of<br>
              refactoring to dispatcher module and gather some feedback
              if people<br>
              think of other improvements.<br>
              <br>
              1) First is about moving from using avps to xavps. It
              should simplify at<br>
              least the config in terms of modparams, but also makes it
              more coherent<br>
              in storing the details of destination record for serial
              forking.<br>
              <br>
              Practically, from a bunch of avp parameters, there will be
              one to set<br>
              the root xavp name, and the old "avps" will be fields
              inside the xavp.<br>
              <br>
              2) The second is about the attributes field. I am
              considering to add the<br>
              option to load additional attributes from dedicated
              columns when using<br>
              database. So besides the attrs column, one can specify via
              a mod param<br>
              additional columns to be loaded and added to attributes,
              like:<br>
              <br>
              modparam("dispatcher", "xattrs", "weight,socket,maxload")<br>
              <br>
              The attributes string will be the value of "attrs" column
              concatenated<br>
              with "weight=val1;socket=val2;maxload=val3" (the valX
              being the<br>
              corresponding values in those columns).<br>
              <br>
              This should make easier the management of the database
              records. For the<br>
              option with a text file, no changes will be done.<br>
              <br>
              3) Anything else that one thinks would be good to add to
              dispatcher?<br>
              <br>
              Cheers,<br>
              Daniel<br>
              <br>
              PS. I wrote to both sr-dev and sr-users, to get the
              attention of the two<br>
              communities. However, you can reply only to sr-users
              (larger community)<br>
              if you are not on sr-dev, because this discussion is about
              features of<br>
              the module, not technical aspects of coding.<br>
              <br>
              -- <br>
              Daniel-Constantin Mierla -- <a
                href="http://www.asipto.com" moz-do-not-send="true">www.asipto.com</a><br>
              <a href="http://www.twitter.com/miconda"
                moz-do-not-send="true">www.twitter.com/miconda</a> -- <a
                href="http://www.linkedin.com/in/miconda"
                moz-do-not-send="true">
                www.linkedin.com/in/miconda</a><br>
              Kamailio World Conference -- <a
                href="http://www.kamailioworld.com"
                moz-do-not-send="true">www.kamailioworld.com</a><br>
              <br>
              <br>
              _______________________________________________<br>
              Kamailio (SER) - Users Mailing List<br>
              <a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
              <a
                href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
                moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
            </div>
          </span></font></div>
    </blockquote>
    <br>
    <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></pre>
  </body>
</html>