<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<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>
<p style="margin-top:0;margin-bottom:0"></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>
<p></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> sr-users <sr-users-bounces@lists.kamailio.org> on behalf of Daniel-Constantin Mierla <miconda@gmail.com><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">www.asipto.com</a><br>
<a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">
www.linkedin.com/in/miconda</a><br>
Kamailio World Conference -- <a href="http://www.kamailioworld.com">www.kamailioworld.com</a><br>
<br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
sr-users@lists.kamailio.org<br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div>
</span></font></div>
</body>
</html>